Suppose I would like to draw a graph with the CPU “clicks” (or wall clock time) along the x axis and running the threads along the y axis. So, for example, if I have 4 cores, I have 4 y-axis, the x-axis is the time, and I would like to build, say, in red when the kernel executes this thread: how can I programmatically collect information for this? I would like to fully understand this problem, so I don’t need to use TBB or stream visualization of any IDE, Intel or otherwise ... I just would like to understand the simple part of the code that does this. Language is not a problem, in fact, but if it is C, then much better. I don’t need to draw a graph, I just need to know which processor is running which thread and for how long. Thank!
EDIT : I found the nptl trace tool , if anything I see what they do, and customize to my needs.
source
share