I'm using perf to do some optimization work. By using perf script
to show my perf records and get results like this:
MyServer 13631 [015] 2611179.755027: probe_app:stat_timer: (52bbe0)
......
I write a script to analysis the results and need to change timestamp to epoch timestamp (at least accurate in second).
To to this, I first get the host start up epoch timestamp
$ date -d "`uptime -s`" +%s
1562557105
And verified by adding the uptime
$ cat /proc/uptime
2612552.50 36615651.34
The the start epoch timestamp is correct.
But I found the perf timestamp 211179.755027 is not the elapsed seconds since system startup as document said, there are some error about 100s+. How to get accurate timestamp while exec "perf record"? I tried "-T" but it seems not work.