summaryrefslogtreecommitdiff
path: root/profcollectd/libprofcollectd/logging_trace_provider.rs
diff options
context:
space:
mode:
authorYabin Cui <yabinc@google.com>2022-01-10 15:35:59 -0800
committerYabin Cui <yabinc@google.com>2022-02-07 13:08:55 -0800
commitf158a752cf96f9d710314731c6cdc407230a80f6 (patch)
tree812c7d04acdc9d6ba9ae9de39110f39d5d893481 /profcollectd/libprofcollectd/logging_trace_provider.rs
parentb3ca35e01abb8e6b91f3908e79b8ef57321d507d (diff)
downloadextras-f158a752cf96f9d710314731c6cdc407230a80f6.tar.gz
profcollectd: add interface to wait for ETM after boot.
ETM device may not be ready when profcollectd is started. So this CL adds interface to wait for ETM after boot: 1. In simpleperf_profcollect, split has_support() into has_driver_support() and has_device_support(). 2. In ProfcollectdBinderService and Scheduler, add interface to register ProviderStatusCallback, which is called when the trace provider is ready. 3. In profcollectd, register ProviderStatusCallback after boot. Then record boot profile and schedule periodic recording in the callback. Bug: 213519191 Test: on oriole EVT and DVT devices, profcollectd can record boot Test: profile and periodic profiles. Test: run simpleperf_unit_test. Change-Id: I87befcd372ad85a0131116a7925f303b4990ec47
Diffstat (limited to 'profcollectd/libprofcollectd/logging_trace_provider.rs')
-rw-r--r--profcollectd/libprofcollectd/logging_trace_provider.rs4
1 files changed, 4 insertions, 0 deletions
diff --git a/profcollectd/libprofcollectd/logging_trace_provider.rs b/profcollectd/libprofcollectd/logging_trace_provider.rs
index 1325855d..fda4c66a 100644
--- a/profcollectd/libprofcollectd/logging_trace_provider.rs
+++ b/profcollectd/libprofcollectd/logging_trace_provider.rs
@@ -32,6 +32,10 @@ impl TraceProvider for LoggingTraceProvider {
"logging"
}
+ fn is_ready(&self) -> bool {
+ true
+ }
+
fn trace(&self, trace_dir: &Path, tag: &str, sampling_period: &Duration) {
let trace_file = trace_provider::get_path(trace_dir, tag, LOGGING_TRACEFILE_EXTENSION);