diff options
author | android-build-team Robot <android-build-team-robot@google.com> | 2020-02-25 02:23:24 +0000 |
---|---|---|
committer | android-build-team Robot <android-build-team-robot@google.com> | 2020-02-25 02:23:24 +0000 |
commit | d7e1d06546b2ea207cf499f582fb4086d4b3950e (patch) | |
tree | ed568817b0c6f5f5e2f4dd259836a5d3fcc3658c | |
parent | 69494e01a53806d7e8268c5211c5408ed4e4c8db (diff) | |
parent | 618afdc057b897383c3ca16b68cc4e8b9a4c7ed0 (diff) | |
download | perfetto-android10-d4-s1-release.tar.gz |
Snap for 6233321 from 618afdc057b897383c3ca16b68cc4e8b9a4c7ed0 to qt-d4-releaseandroid-10.0.0_r45android-10.0.0_r44android-10.0.0_r43android-10.0.0_r42android10-d4-s1-releaseandroid10-d4-release
Change-Id: Ie1face5dc820f55780eceb47b7c99acb91934e22
-rw-r--r-- | perfetto.rc | 4 | ||||
-rw-r--r-- | src/perfetto_cmd/rate_limiter.cc | 3 |
2 files changed, 6 insertions, 1 deletions
diff --git a/perfetto.rc b/perfetto.rc index 8d077131e..a33bd036d 100644 --- a/perfetto.rc +++ b/perfetto.rc @@ -62,3 +62,7 @@ on property:persist.traced.enable=1 on property:persist.traced.enable=0 stop traced stop traced_probes + +# Reset the Perfetto guard rail state on boot: +on post-fs-data + rm /data/misc/perfetto-traces/.guardraildata diff --git a/src/perfetto_cmd/rate_limiter.cc b/src/perfetto_cmd/rate_limiter.cc index 3b018bc54..56f34c417 100644 --- a/src/perfetto_cmd/rate_limiter.cc +++ b/src/perfetto_cmd/rate_limiter.cc @@ -106,7 +106,8 @@ bool RateLimiter::ShouldTrace(const Args& args) { } // If we've uploaded in the last 5mins we shouldn't trace now. - if ((now_in_s - state_.last_trace_timestamp()) < kCooldownInSeconds) { + if (state_.last_trace_timestamp() != 0 && + (now_in_s - state_.last_trace_timestamp()) < kCooldownInSeconds) { PERFETTO_ELOG("Guardrail: Uploaded to DropBox in the last 5mins."); if (!args.ignore_guardrails) return false; |