

The perf command was actually in /usr/bin/perf_3.16. On my Raspberry Pi these tools were in package perf-tools-unstable.

I don't have an answer but you might find one amongst the tools, examples and resources written or listed byīrendan Gregg on the perf command and Linux kernel ftrace and debugfs. Or, a slight improvement to avoid enormous logs: use an algorithm that eliminates consecutive times if they are close enough together that it can be deduced they were not pre-empted by some other process. Hacky: make the program repeatedly get and store the current time (and save it to a file once the log reaches a certain limit).Command to list in real time all the actions of a process.Obviously the data should be stored in RAM to minimise overhead This previous question answers how to see how many context switches are made in some period of time for a given process, but is there a way of logging the precise timing of switches, and perhaps for every process, not just one? Obviously this would create overhead, but could still be useful. I was going to do this by writing a simple C program that toggles a pin repeatedly as fast as possible, and monitoring it with a logic analyser.īut perhaps there's another way, by writing the above program but simply logging context switches to see exactly when that thread/process has control over a sample period of say a couple of seconds. I want to get a "feel" for the kind of performance I can expect. I'm trying to get the nearest to real-time processing I can with a Raspbian distribution on a Raspberry Pi for manipulating its GPIO pins.
