Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 0551cfc0 authored by Kalesh Singh's avatar Kalesh Singh
Browse files

atrace: Remove funcgraphFlatPath option

atrace -k <kernel function(s)> depended on an out of tree patch
that added funcgraph-flat option to flatten the function graph
output. This patch is no longer maintained since android 4.14,
and causes tracing kernel functions with atrace to fail with:

error opening /sys/kernel/tracing/options/funcgraph-flat

Fix by removing this option from atrace, which allows using atrace
with the function graph hierarchical output.

Bug: 185858163
Test: atrack -k do_mmap

capturing trace... done
TRACE:
 1052.716680 |   7)  atrace-9238   |               |  /* trace_event_clock_sync: parent_ts=1052.716675 */
 1052.716687 |   7)  atrace-9238   |               |  /* trace_event_clock_sync: realtime_ts=1619031487907 */
 1052.717302 |   4)  lmkd_un-9237  |   5.534 us    |  do_mmap();
 1052.718858 |   4)  lmkd_un-9237  |   2.767 us    |  do_mmap();
 1052.720411 |   4)  lmkd_un-9237  |   2.726 us    |  do_mmap();
 1052.721997 |   4)  lmkd_un-9237  |   2.970 us    |  do_mmap();
 1052.723580 |   4)  lmkd_un-9237  |   3.011 us    |  do_mmap();
 1052.725172 |   4)  lmkd_un-9237  |   3.255 us    |  do_mmap();
. . .

Change-Id: I5ba1571da188c2b1abe693fa76ffc3877331aaf6
parent 64eff6c1
Loading
Loading
Loading
Loading
+0 −4
Original line number Diff line number Diff line
@@ -320,9 +320,6 @@ static const char* k_funcgraphCpuPath =
static const char* k_funcgraphProcPath =
    "options/funcgraph-proc";

static const char* k_funcgraphFlatPath =
    "options/funcgraph-flat";

static const char* k_ftraceFilterPath =
    "set_ftrace_filter";

@@ -700,7 +697,6 @@ static bool setKernelTraceFuncs(const char* funcs)
        ok &= setKernelOptionEnable(k_funcgraphAbsTimePath, true);
        ok &= setKernelOptionEnable(k_funcgraphCpuPath, true);
        ok &= setKernelOptionEnable(k_funcgraphProcPath, true);
        ok &= setKernelOptionEnable(k_funcgraphFlatPath, true);

        // Set the requested filter functions.
        ok &= truncateFile(k_ftraceFilterPath);