perf_counter: add more context information