Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(931)

Unified Diff: src/profiler/tracing-cpu-profiler.cc

Issue 2676403002: [tracing] The CPU profiler should only be enabled for specific modes of tracing (Closed)
Patch Set: . Created 3 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/profiler/tracing-cpu-profiler.cc
diff --git a/src/profiler/tracing-cpu-profiler.cc b/src/profiler/tracing-cpu-profiler.cc
index 8b3122590500925c312d2a4377d4ede4617d8cb8..4d0559b1e794f844bf57c8f7bc2e1ac03d969c8a 100644
--- a/src/profiler/tracing-cpu-profiler.cc
+++ b/src/profiler/tracing-cpu-profiler.cc
@@ -8,8 +8,11 @@
#include "src/tracing/trace-event.h"
#include "src/v8.h"
-#define PROFILER_TRACE_CATEGORY_ENABLED(cat) \
- (*TRACE_EVENT_API_GET_CATEGORY_GROUP_ENABLED(TRACE_DISABLED_BY_DEFAULT(cat)))
+#define PROFILER_TRACE_CATEGORY_ENABLED(cat) \
+ (*TRACE_EVENT_API_GET_CATEGORY_GROUP_ENABLED( \
+ TRACE_DISABLED_BY_DEFAULT(cat)) & \
+ (kEnabledForRecording_CategoryGroupEnabledFlags | \
Primiano Tucci (use gerrit) 2017/02/06 23:10:16 Don't we have the _enabled_for_recording macro in
ssid 2017/02/07 00:11:54 ENABLED_FOR_RECORDING is defined in base/trace_eve
Primiano Tucci (use gerrit) 2017/02/07 10:50:14 So I looked at the code, the situation is the foll
alph 2017/02/07 22:04:31 +1 for using TRACE_EVENT_CATEGORY_GROUP_ENABLED
ssid 2017/02/08 02:24:12 Ah I didn't realize what you meant. Thanks fixed.
+ kEnabledForEventCallback_CategoryGroupEnabledFlags))
namespace v8 {
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698