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

Commit 80a6844a authored by Joel Fernandes's avatar Joel Fernandes Committed by Android (Google) Code Review
Browse files

Merge "atrace: Set saved_cmdline_size to 8192"

parents 1fdfea5a ed80bd04
Loading
Loading
Loading
Loading
+10 −0
Original line number Diff line number Diff line
@@ -219,6 +219,9 @@ static const char* k_traceClockPath =
static const char* k_traceBufferSizePath =
    "buffer_size_kb";

static const char* k_traceCmdlineSizePath =
    "saved_cmdlines_size";

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

@@ -439,6 +442,12 @@ static bool setTraceBufferSizeKB(int size)
    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
@@ -756,6 +765,7 @@ static bool setUpTrace()
    ok &= setCategoriesEnableFromFile(g_categoriesFile);
    ok &= setTraceOverwriteEnable(g_traceOverwrite);
    ok &= setTraceBufferSizeKB(g_traceBufferSizeKB);
    ok &= setCmdlineSize();
    ok &= setClock();
    ok &= setPrintTgidEnableIfPresent(true);
    ok &= setKernelTraceFuncs(g_kernelTraceFuncs);