3

I'm using linux perf tool to monitor the performance of some processes. The documentation tells that you can flag it to collect profiles on per-thread, per-process and per-cpu basis.

I get that the processor would have performance registers collecting event-counts for a given physical-core and it's resources (e.g. L1-caches).

How does perf or any such performance monitoring tool, measure counters per-process or per-thread basis? For example, let's say I'm monitoring L1-cache-misses, now since the cache is shared for all processes running on that CPU, how does perf determine how many misses came from a given process or a given thread?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.