Add option for specifying wall-clock in method profiling.
Normally you want to use the per-thread CPU clock rather than the wall
clock, because (a) it's more useful and (b) traceview goes a little nuts
if you don't. However, it's useful for some performance testing.
The command-line option allows you to switch modes like this:
% adb shell stop
% adb shell setprop dalvik.vm.extra-opts -Xprofile:wallclock
% adb shell start
This also changes the somewhat nebulous "clock=global" trace header line
to "clock=wall". Nothing looks at this anyway so I'm not worried
about breaking compatibility.
While I was in here, I fixed a couple of problems caused by failure to
initialize data structures that made dmtracedump crash (yay valgrind).
Bug 2943229.
(cherry-pick from dalvik-dev)
Change-Id: I2f6657f7abe02f2a17784588d922b88397639a47
4 files changed