bionic: Check /sys/kernel/tracing for tracefs
tracefs will be mounted at /sys/kernel/tracing when debugfs is not mounted. Bug: 134669095 Test: atest bionic-unit-tests-static Change-Id: Ic224cf13500efc570da8b6a27ce925bbcf068fdd
This commit is contained in:
parent
f7c40da307
commit
ad5f772dba
|
@ -46,7 +46,10 @@ static bool should_trace() {
|
|||
static int get_trace_marker_fd() {
|
||||
g_lock.lock();
|
||||
if (g_trace_marker_fd == -1) {
|
||||
g_trace_marker_fd = open("/sys/kernel/debug/tracing/trace_marker", O_CLOEXEC | O_WRONLY);
|
||||
g_trace_marker_fd = open("/sys/kernel/tracing/trace_marker", O_CLOEXEC | O_WRONLY);
|
||||
if (g_trace_marker_fd == -1) {
|
||||
g_trace_marker_fd = open("/sys/kernel/debug/tracing/trace_marker", O_CLOEXEC | O_WRONLY);
|
||||
}
|
||||
}
|
||||
g_lock.unlock();
|
||||
return g_trace_marker_fd;
|
||||
|
|
Loading…
Reference in New Issue