Use monotonic clock to record the start time of the trace
Android Studio uses monotonic clock timestamps obtained from other
places to match against the timestamps provided by ART's method traces
to construct a CPU profile. So specify the initial start time obtained
from the monotonic timer. The rest of the timestamps are time elapsed
from this start point and it is okay to use the timestamp counters to
compute the elapsed time. Both monotonic clock and the timestamp
counters give the same elapsed time from the given start time.
Bug: 318052824
Test: art/test.py -t 2246
(cherry picked from https://android-review.googlesource.com/q/commit:e67193fe33f6aaf336715aab04bdca8bf95acdb6)
Merged-In: I33ec06d951c2203111060c6e6100bfcfffdc4b83
Change-Id: I33ec06d951c2203111060c6e6100bfcfffdc4b83
Cherrypick a CL to fix Android Studio CPU profile tab
1 file changed