OSDN Git Service

simpleperf: calculate perf clock based on system clock.
authorYabin Cui <yabinc@google.com>
Thu, 15 Sep 2016 17:43:20 +0000 (10:43 -0700)
committerYabin Cui <yabinc@google.com>
Fri, 16 Sep 2016 01:47:04 +0000 (18:47 -0700)
commitaa65c8b250b99f1684f46e2c40b77e42bf7c5f31
tree98076608b0afb20e68bb4f5d94ac55a47b596d2a
parent812d0a9a51201845b82426da581bfed27cb03194
simpleperf: calculate perf clock based on system clock.

The timestamps of perf event records are not generated
by MONOTONIC system clock. However, we can calculate
perf clock based on MONOTONIC system clock.
See http://www.gossamer-threads.com/lists/linux/kernel/1970811

Bug: http://b/30975131
Test: run `simpleperf record -a --log verbose ls` and check the result.
Change-Id: I78ef28b501aa45a4696c05ec76f6d04363082c5d
simpleperf/Android.mk
simpleperf/cmd_record.cpp
simpleperf/perf_clock.cpp [new file with mode: 0644]
simpleperf/perf_clock.h [new file with mode: 0644]