Skip to content

Commit

Permalink
Merge "atrace: allow tracefs/buffer_percent RW use + remove dead code…
Browse files Browse the repository at this point in the history
…" into main am: 0829ece am: 910618a

Original change: https://android-review.googlesource.com/c/platform/frameworks/native/+/2975539

Change-Id: I826a6624f63dfaf6948f5f6cdc9fb005900386d3
Signed-off-by: Automerger Merge Worker <[email protected]>
  • Loading branch information
Treehugger Robot authored and android-build-merge-worker-robot committed Feb 28, 2024
2 parents c8c97d5 + 910618a commit f9f6c62
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 20 deletions.
20 changes: 0 additions & 20 deletions cmds/atrace/atrace.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -313,12 +313,6 @@ static const char* k_traceClockPath =
static const char* k_traceBufferSizePath =
"buffer_size_kb";

#if 0
// TODO: Re-enable after stabilization
static const char* k_traceCmdlineSizePath =
"saved_cmdlines_size";
#endif

static const char* k_tracingOverwriteEnablePath =
"options/overwrite";

Expand Down Expand Up @@ -545,18 +539,6 @@ static bool setTraceBufferSizeKB(int size)
return writeStr(k_traceBufferSizePath, str);
}

#if 0
// TODO: Re-enable after stabilization
// Set the default size of cmdline hashtable
static bool setCmdlineSize()
{
if (fileExists(k_traceCmdlineSizePath)) {
return writeStr(k_traceCmdlineSizePath, "8192");
}
return true;
}
#endif

// 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
Expand Down Expand Up @@ -870,8 +852,6 @@ static bool setUpKernelTracing()
ok &= setCategoriesEnableFromFile(g_categoriesFile);
ok &= setTraceOverwriteEnable(g_traceOverwrite);
ok &= setTraceBufferSizeKB(g_traceBufferSizeKB);
// TODO: Re-enable after stabilization
//ok &= setCmdlineSize();
ok &= setClock();
ok &= setPrintTgidEnableIfPresent(true);
ok &= setKernelTraceFuncs(g_kernelTraceFuncs);
Expand Down
2 changes: 2 additions & 0 deletions cmds/atrace/atrace.rc
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ on late-init
# Access control to these files is now entirely in selinux policy.
chmod 0666 /sys/kernel/debug/tracing/trace_clock
chmod 0666 /sys/kernel/tracing/trace_clock
chmod 0666 /sys/kernel/debug/tracing/buffer_percent
chmod 0666 /sys/kernel/tracing/buffer_percent
chmod 0666 /sys/kernel/debug/tracing/buffer_size_kb
chmod 0666 /sys/kernel/tracing/buffer_size_kb
chmod 0666 /sys/kernel/debug/tracing/options/overwrite
Expand Down

0 comments on commit f9f6c62

Please sign in to comment.