summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYabin Cui <yabinc@google.com>2022-02-17 21:54:34 +0000
committerAutomerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>2022-02-17 21:54:34 +0000
commita0f810f494346fcba0882c0a53e89b2f9636c4bf (patch)
treef0254b92ab26de40ff128f804b159cf67fea24eb
parent087d1f6d59d6cc1bd48fb69a2892665980ac95a2 (diff)
parentf9c04779daaa7fd7030b62c2ca665fc81d56f2d6 (diff)
downloadextras-a0f810f494346fcba0882c0a53e89b2f9636c4bf.tar.gz
Merge "simpleperf: change default aux buffer size to 1M." am: f9c04779da
Original change: https://android-review.googlesource.com/c/platform/system/extras/+/1990770 Change-Id: I962762198a555634336820851aa7420778d09616
-rw-r--r--simpleperf/cmd_record.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/simpleperf/cmd_record.cpp b/simpleperf/cmd_record.cpp
index b84bcfab..f206b808 100644
--- a/simpleperf/cmd_record.cpp
+++ b/simpleperf/cmd_record.cpp
@@ -114,7 +114,9 @@ constexpr size_t DEFAULT_CALL_CHAIN_JOINER_CACHE_SIZE = 8 * 1024 * 1024;
static constexpr size_t kRecordBufferSize = 64 * 1024 * 1024;
static constexpr size_t kSystemWideRecordBufferSize = 256 * 1024 * 1024;
-static constexpr size_t kDefaultAuxBufferSize = 4 * 1024 * 1024;
+// If the kernel needs to allocate continuous DMA memory for ETR (like when IOMMU for ETR isn't
+// available), requesting 4M ETR buffer may fail and cause warning. So use 1M buffer here.
+static constexpr size_t kDefaultAuxBufferSize = 1 * 1024 * 1024;
// On Pixel 3, it takes about 1ms to enable ETM, and 16-40ms to disable ETM and copy 4M ETM data.
// So make default period to 100ms.
@@ -221,7 +223,7 @@ class RecordCommand : public Command {
"--aux-buffer-size <buffer_size> Set aux buffer size, only used in cs-etm event type.\n"
" Need to be power of 2 and page size aligned.\n"
" Used memory size is (buffer_size * (cpu_count + 1).\n"
-" Default is 4M.\n"
+" Default is 1M.\n"
"--no-inherit Don't record created child threads/processes.\n"
"--cpu-percent <percent> Set the max percent of cpu time used for recording.\n"
" percent is in range [1-100], default is 25.\n"