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

Commit 1ac1d86b authored by Treehugger Robot's avatar Treehugger Robot Committed by Gerrit Code Review
Browse files

Merge "trace-container: Check /sys/kernel/tracing for tracefs"

parents 2157b206 5cdb5d46
Loading
Loading
Loading
Loading
+21 −17
Original line number Diff line number Diff line
@@ -87,6 +87,9 @@ void atrace_set_tracing_enabled(bool enabled)

static void atrace_init_once()
{
    atrace_marker_fd = open("/sys/kernel/tracing/trace_marker", O_WRONLY | O_CLOEXEC);
    if (atrace_marker_fd < 0) {
        // try debugfs
        atrace_marker_fd = open("/sys/kernel/debug/tracing/trace_marker", O_WRONLY | O_CLOEXEC);
        if (atrace_marker_fd < 0) {
            // We're in container, ftrace may be disabled. In such case, we use the
@@ -107,6 +110,7 @@ static void atrace_init_once()
                goto done;
            }
        }
    }
    atrace_enabled_tags = atrace_get_property();

done: