diff options
author | Yabin Cui <yabinc@google.com> | 2024-05-08 17:22:41 -0700 |
---|---|---|
committer | Yabin Cui <yabinc@google.com> | 2024-05-08 17:26:08 -0700 |
commit | 1684aa5147a27c89e610bae78799d68b87e64790 (patch) | |
tree | 75d47703ff8f568189242ccf920887bba6e6a9a8 /simpleperf | |
parent | e04e4a20c8d4fb1de37123bf7ff2957f9b41e4b7 (diff) | |
download | extras-1684aa5147a27c89e610bae78799d68b87e64790.tar.gz |
simpleperf: Fix default value for --etm-flush-interval
options.PullUintValue() returns true even when --etm-flush-interval
isn't used. In this case, interval is still set to etm_flush_interval_,
which makes it 0.
Bug: 336375740
Test: run simpleperf manually
Change-Id: I95fafcf24b9ae821d8b19782813c7b2f312bf317
Diffstat (limited to 'simpleperf')
-rw-r--r-- | simpleperf/cmd_record.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/simpleperf/cmd_record.cpp b/simpleperf/cmd_record.cpp index e08b153b..cb9ad884 100644 --- a/simpleperf/cmd_record.cpp +++ b/simpleperf/cmd_record.cpp @@ -1057,7 +1057,7 @@ bool RecordCommand::ParseOptions(const std::vector<std::string>& args, etm_branch_list_generator_ = ETMBranchListGenerator::Create(system_wide_collection_); } uint32_t interval = 0; - if (options.PullUintValue("--etm-flush-interval", &interval)) { + if (options.PullUintValue("--etm-flush-interval", &interval) && interval != 0) { etm_flush_interval_ = std::chrono::milliseconds(interval); } |