summaryrefslogtreecommitdiff
path: root/simpleperf/cmd_record.cpp
diff options
context:
space:
mode:
authorYabin Cui <yabinc@google.com>2019-09-04 15:49:19 -0700
committerYabin Cui <yabinc@google.com>2019-09-04 17:06:50 -0700
commitfbbffcd9e3f55de26049f9054af7f96b7967c8e2 (patch)
tree109ec31cdd80d5581ffbf20a1afd7e73a492a073 /simpleperf/cmd_record.cpp
parent5422a2d3ec6eec3b9e6cd73ccdda4d7f807678e7 (diff)
downloadextras-fbbffcd9e3f55de26049f9054af7f96b7967c8e2.tar.gz
simpleperf: support profiling art interpreter on linux host.
Bug: 140300587 Test: run simpleperf_unit_test. Test: run simpleperf on host. Change-Id: Ia2e21cabf2661c82bb611c525d5277b1e4d13a23
Diffstat (limited to 'simpleperf/cmd_record.cpp')
-rw-r--r--simpleperf/cmd_record.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/simpleperf/cmd_record.cpp b/simpleperf/cmd_record.cpp
index 41775cdd..ede1a97a 100644
--- a/simpleperf/cmd_record.cpp
+++ b/simpleperf/cmd_record.cpp
@@ -466,7 +466,8 @@ bool RecordCommand::PrepareRecording(Workload* workload) {
need_to_check_targets = true;
}
// Profiling JITed/interpreted Java code is supported starting from Android P.
- if (GetAndroidVersion() >= kAndroidVersionP) {
+ // Also support profiling art interpreter on host.
+ if (GetAndroidVersion() >= kAndroidVersionP || GetAndroidVersion() == 0) {
// JIT symfiles are stored in temporary files, and are deleted after recording. But if
// `-g --no-unwind` option is used, we want to keep symfiles to support unwinding in
// the debug-unwind cmd.
@@ -541,7 +542,7 @@ bool RecordCommand::PrepareRecording(Workload* workload) {
if (!jit_debug_reader_->RegisterDebugInfoCallback(loop, callback)) {
return false;
}
- if (!app_package_name_.empty()) {
+ if (!system_wide_collection_) {
std::set<pid_t> pids = event_selection_set_.GetMonitoredProcesses();
for (pid_t tid : event_selection_set_.GetMonitoredThreads()) {
pid_t pid;