gprof2dot
gprof2dot copied to clipboard
Q: How to show absolute time in graph from Linux perf?
I have been using this with Linux's perf for a long time but recently I want the dot graph to show all of the four labels:
labels = {
'self-time': TIME,
'self-time-percentage': TIME_RATIO,
'total-time': TOTAL_TIME,
'total-time-percentage': TOTAL_TIME_RATIO,
}
https://github.com/jrfonseca/gprof2dot/blob/2245ac568b4bb0b97762eca71061075a709d7d86/gprof2dot.py#L152
I tried with --node-label="total-time" --node-label="total-time-percentage" --node-label="self-time" --node-label="self-time-percentage" but it did not work.
Hello,
Have you found how to show absolute time in graph? I want to show absolute time in graph from gprof.
@TuoLi96 afaik gprof seems to work with absolute time according to my previous attempts (if my memory serves me right)
@jerryc05 Thank you very much and I will try with --node-label="total-time" --node-label="total-time-percentage" --node-label="self-time" --node-label="self-time-percentage" for gprof.
Sorry for the silence.
Yes, the perf parser doesn't support absolute times.
The only absolute quantity available from perf is number of samples. So the closest thing with perf is using the --show-samples. Assuming the sampling frequency is constant, it should allow apples-to-apples comparisons across different runs.