OSDN Git Service

simpleperf: fix calculating cpu frequency.
authorYabin Cui <yabinc@google.com>
Tue, 6 Mar 2018 19:35:22 +0000 (11:35 -0800)
committerYabin Cui <yabinc@google.com>
Tue, 6 Mar 2018 19:35:22 +0000 (11:35 -0800)
commit900ea0706e16bd2afc99f95a56b67b364800ad60
treee8dbf7301ce48eb51299fbe8c17555e29d98620d
parent8e57dc74b071793296389d0d936f385d0949df76
simpleperf: fix calculating cpu frequency.

When calculating cpu frequency and other frequencies, use time
running on cpu instead of total passed time. This is to be
consistent with linux-tools-perf.

This is reported in https://github.com/android-ndk/ndk/issues/644.

Bug: none
Test: run simpleperf_unit_test.
Change-Id: Ic385939c189fb86c6b3c648d2c0a4e9636c13c93
simpleperf/cmd_debug_unwind_test.cpp
simpleperf/cmd_stat.cpp
simpleperf/cmd_stat_test.cpp
simpleperf/test_util.h