Merge "Check /sys/kernel/tracing for tracefs"

This commit is contained in:
Treehugger Robot 2020-02-01 06:50:45 +00:00 committed by Gerrit Code Review
commit a6c834f960
1 changed files with 4 additions and 0 deletions

View File

@ -31,6 +31,10 @@ void atrace_set_tracing_enabled(bool enabled)
static void atrace_init_once()
{
atrace_marker_fd = open("/sys/kernel/debug/tracing/trace_marker", O_WRONLY | O_CLOEXEC);
if (atrace_marker_fd == -1) {
atrace_marker_fd = open("/sys/kernel/tracing/trace_marker", O_WRONLY | O_CLOEXEC);
}
if (atrace_marker_fd == -1) {
ALOGE("Error opening trace file: %s (%d)", strerror(errno), errno);
atrace_enabled_tags = 0;