OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "base/debug/trace_event_impl.h" | 5 #include "base/debug/trace_event_impl.h" |
6 | 6 |
7 #include <fcntl.h> | 7 #include <fcntl.h> |
8 | 8 |
9 #include "base/debug/trace_event.h" | 9 #include "base/debug/trace_event.h" |
10 #include "base/format_macros.h" | 10 #include "base/format_macros.h" |
11 #include "base/logging.h" | 11 #include "base/logging.h" |
12 #include "base/stringprintf.h" | 12 #include "base/strings/stringprintf.h" |
13 | 13 |
14 namespace { | 14 namespace { |
15 | 15 |
16 int g_atrace_fd = -1; | 16 int g_atrace_fd = -1; |
17 const char* kATraceMarkerFile = "/sys/kernel/debug/tracing/trace_marker"; | 17 const char* kATraceMarkerFile = "/sys/kernel/debug/tracing/trace_marker"; |
18 | 18 |
19 void WriteEvent( | 19 void WriteEvent( |
20 char phase, | 20 char phase, |
21 const char* category_group, | 21 const char* category_group, |
22 const char* name, | 22 const char* name, |
(...skipping 126 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
149 const char* category_group = GetCategoryGroupName(category_group_enabled); | 149 const char* category_group = GetCategoryGroupName(category_group_enabled); |
150 if (strncmp(category_group, TRACE_DISABLED_BY_DEFAULT(""), | 150 if (strncmp(category_group, TRACE_DISABLED_BY_DEFAULT(""), |
151 strlen(TRACE_DISABLED_BY_DEFAULT(""))) == 0) | 151 strlen(TRACE_DISABLED_BY_DEFAULT(""))) == 0) |
152 return; | 152 return; |
153 | 153 |
154 *category_group_enabled |= ATRACE_ENABLED; | 154 *category_group_enabled |= ATRACE_ENABLED; |
155 } | 155 } |
156 | 156 |
157 } // namespace debug | 157 } // namespace debug |
158 } // namespace base | 158 } // namespace base |
OLD | NEW |