diff options
author | Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com> | 2023-05-31 20:17:34 +0000 |
---|---|---|
committer | Gerrit Code Review <noreply-gerritcodereview@google.com> | 2023-05-31 20:17:34 +0000 |
commit | 7650777c5f4fab90981af0a8509fe2821d613592 (patch) | |
tree | 65dbe6dae9bdd3ccda0816c93fe11ad8aec87fdb | |
parent | 6779e405d045a782356c7b98ce6f7d2a459a4cca (diff) | |
parent | a47ea2c41c17099329598d483a64f0e65eb2f119 (diff) | |
download | extras-7650777c5f4fab90981af0a8509fe2821d613592.tar.gz |
Merge "Merge "Merge "Merge "arc: Fix CTS tests for grunt" into android11-tests-dev am: b19afd3d01" into android12-tests-dev am: 886dfe2c36" into android12L-tests-dev am: 66f20d311e" into android13-tests-dev
-rw-r--r-- | simpleperf/environment.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/simpleperf/environment.cpp b/simpleperf/environment.cpp index 8e95d449..9d698924 100644 --- a/simpleperf/environment.cpp +++ b/simpleperf/environment.cpp @@ -332,9 +332,10 @@ bool SetPerfEventLimits(uint64_t sample_freq, size_t cpu_percent, uint64_t mlock } // Wait for init process to change perf event limits based on properties. const size_t max_wait_us = 3 * 1000000; + const size_t interval_us = 10000; int finish_mask = 0; - for (size_t i = 0; i < max_wait_us && finish_mask != 7; ++i) { - usleep(1); // Wait 1us to avoid busy loop. + for (size_t i = 0; i < max_wait_us && finish_mask != 7; i += interval_us) { + usleep(interval_us); // Wait 10ms to avoid busy loop. if ((finish_mask & 1) == 0) { uint64_t freq; if (!GetMaxSampleFrequency(&freq) || freq == sample_freq) { |