diff options
author | Wei Jin <wejin@google.com> | 2014-06-09 16:19:15 -0700 |
---|---|---|
committer | Calin Juravle <calin@google.com> | 2014-06-19 13:05:44 +0100 |
commit | a93b0bb9abfbd19fc40ff8ced8818aec1a3464b9 (patch) | |
tree | 5ce3679ab53691e97a8971e29f85742a7f95666f /runtime/runtime.cc | |
parent | 995b32cc8e94a9730d6cf663a23afc9c997c1771 (diff) | |
download | art-a93b0bb9abfbd19fc40ff8ced8818aec1a3464b9.zip art-a93b0bb9abfbd19fc40ff8ced8818aec1a3464b9.tar.gz art-a93b0bb9abfbd19fc40ff8ced8818aec1a3464b9.tar.bz2 |
Add an option to enable collecting dex pc in ART profiler
This CL allows the ART profiler to collect both method signature and
dex pc. The type of the profile data is controlled by the option
"-Xprofile-type:{method,dexpc}". To avoid conflicting with the
original profile data based on method signatures, the new profile
data are stored in files with extension ".pc".
Change-Id: I8afb2541d386bff77c5b07fc9367d817a79f58e1
Diffstat (limited to 'runtime/runtime.cc')
-rw-r--r-- | runtime/runtime.cc | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/runtime/runtime.cc b/runtime/runtime.cc index 717381c..8aa7ea1 100644 --- a/runtime/runtime.cc +++ b/runtime/runtime.cc @@ -421,6 +421,9 @@ bool Runtime::Start() { int fd = open(profile_output_filename_.c_str(), O_RDWR|O_CREAT|O_EXCL, 0660); if (fd >= 0) { close(fd); + } else if (errno != EEXIST) { + LOG(INFO) << "Failed to access the profile file. Profiler disabled."; + return true; } StartProfiler(profile_output_filename_.c_str()); } |