atrace: Set saved_cmdline_size to 8192
am: efb73a96b5
Change-Id: I96758a6d56d5478b3287ead6c3d4e43fb7e61524
diff --git a/cmds/atrace/atrace.cpp b/cmds/atrace/atrace.cpp
index d87d8fa..563b41f 100644
--- a/cmds/atrace/atrace.cpp
+++ b/cmds/atrace/atrace.cpp
@@ -215,6 +215,9 @@
static const char* k_traceBufferSizePath =
"buffer_size_kb";
+static const char* k_traceCmdlineSizePath =
+ "saved_cmdlines_size";
+
static const char* k_tracingOverwriteEnablePath =
"options/overwrite";
@@ -435,6 +438,12 @@
return writeStr(k_traceBufferSizePath, str);
}
+// Set the default size of cmdline hashtable
+static bool setCmdlineSize()
+{
+ return writeStr(k_traceCmdlineSizePath, "8192");
+}
+
// Set the clock to the best available option while tracing. Use 'boot' if it's
// available; otherwise, use 'mono'. If neither are available use 'global'.
// Any write to the trace_clock sysfs file will reset the buffer, so only
@@ -752,6 +761,7 @@
ok &= setCategoriesEnableFromFile(g_categoriesFile);
ok &= setTraceOverwriteEnable(g_traceOverwrite);
ok &= setTraceBufferSizeKB(g_traceBufferSizeKB);
+ ok &= setCmdlineSize();
ok &= setClock();
ok &= setPrintTgidEnableIfPresent(true);
ok &= setKernelTraceFuncs(g_kernelTraceFuncs);