Merge "Check /sys/kernel/tracing for tracefs" am: a6c834f960 am: 73a3552047 am: cd5ee4246f

Change-Id: I3fe8e36a890791342aff0630bf694ec9ed1f2092
This commit is contained in:
Automerger Merge Worker 2020-02-01 07:26:01 +00:00
commit 200fdd3138

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;