diff options
author | Primiano Tucci <primiano@google.com> | 2021-06-18 09:56:16 +0100 |
---|---|---|
committer | Primiano Tucci <primiano@google.com> | 2021-06-22 20:50:25 +0100 |
commit | f3f948836e49963a93f9348369adb6aceaaa1638 (patch) | |
tree | bd5f7cceb352df8c782403fb067cd969519dfe41 | |
parent | 45cdfe44d3502cf7820ee5b07b4240760181a5e5 (diff) | |
download | perfetto-f3f948836e49963a93f9348369adb6aceaaa1638.tar.gz |
tracing service: improve logging for --save-for-bugreport
Adding some extra logging to debug --save-for-bugreport emitting
zero length files occasionally.
Bug: 188008375
(cherry picked from commit 167d67c2e7d38922c1c616f77a12510c4835c7f4)
Change-Id: I1f8b0385b3c3956bd8b8209ebb36ce3878ec42be
Merged-In: I1f8b0385b3c3956bd8b8209ebb36ce3878ec42be
-rw-r--r-- | src/tracing/core/tracing_service_impl.cc | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/src/tracing/core/tracing_service_impl.cc b/src/tracing/core/tracing_service_impl.cc index 7084dec91..472bb319d 100644 --- a/src/tracing/core/tracing_service_impl.cc +++ b/src/tracing/core/tracing_service_impl.cc @@ -1808,8 +1808,9 @@ void TracingServiceImpl::FlushAndDisableTracing(TracingSessionID tsid) { PERFETTO_DLOG("Triggering final flush for %" PRIu64, tsid); auto weak_this = weak_ptr_factory_.GetWeakPtr(); Flush(tsid, 0, [weak_this, tsid](bool success) { - PERFETTO_DLOG("Flush done (success: %d), disabling trace session %" PRIu64, - success, tsid); + // This was a DLOG up to Jun 2021 (v16, Android S). + PERFETTO_LOG("FlushAndDisableTracing(%" PRIu64 ") done, success=%d", tsid, + success); if (!weak_this) return; TracingSession* session = weak_this->GetTracingSession(tsid); @@ -3173,6 +3174,12 @@ bool TracingServiceImpl::MaybeSaveTraceForBugreport( if (!max_session) return false; + PERFETTO_LOG("Seizing trace for bugreport. tsid:%" PRIu64 + " state:%d wf:%d score:%d name:\"%s\"", + max_tsid, max_session->state, !!max_session->write_into_file, + max_session->config.bugreport_score(), + max_session->config.unique_session_name().c_str()); + auto br_fd = CreateTraceFile(GetBugreportTmpPath(), /*overwrite=*/true); if (!br_fd) return false; |