OSDN Git Service

Fix the problem of not shutting down the profiler in ART properly
authorWei Jin <wejin@google.com>
Wed, 21 May 2014 23:07:40 +0000 (16:07 -0700)
committerWei Jin <wejin@google.com>
Tue, 27 May 2014 16:13:52 +0000 (09:13 -0700)
commit6a58691356979164249c63cb3f98f5dbd75cc4bb
tree259f792efd88017cf36f69df552ea002ec77a282
parent89bfb2be91b1b4db1ef62e82e9b9ae13dc975264
Fix the problem of not shutting down the profiler in ART properly

This CL fixes the problem of not saving the last batch of profile data to the
external file when the runtime exits before the end of the current iteration of
profile sampling. This problem was fixed by shutting down the ART profiler
when the runtime exits and allowing the profiler to write the last batch of
data even it was signaled to shut down. This CL increases the precision of
profile data and fixes the bug that no data is saved if the duration of profile
sampling specified by VM arguments (by default 20 seconds) is longer than the
length of a single execution because the profiler was never signaled when the
runtime exits.

Change-Id: I7cc4805b7e2a22a990d04a5b9724ad1d931d7152
Signed-off-by: Wei Jin <wejin@google.com>
runtime/profiler.cc
runtime/runtime.cc