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

Unified Diff: src/libplatform/tracing/trace-config.cc

Issue 2137013006: [Tracing] V8 Tracing Controller (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Remove trace-config.h from v8.gyp Created 4 years, 5 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
Index: src/libplatform/tracing/trace-config.cc
diff --git a/src/libplatform/tracing/trace-config.cc b/src/libplatform/tracing/trace-config.cc
new file mode 100644
index 0000000000000000000000000000000000000000..a35422caf7dc6de299e6761135780f52d5000362
--- /dev/null
+++ b/src/libplatform/tracing/trace-config.cc
@@ -0,0 +1,31 @@
+// Copyright 2016 the V8 project authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include <string.h>
+
+#include "include/libplatform/v8-tracing.h"
+
+namespace v8 {
+
+class Isolate;
+
+namespace platform {
+namespace tracing {
+
+TraceConfig* TraceConfig::CreateDefaultTraceConfig() {
+ TraceConfig* trace_config = new TraceConfig();
+ trace_config->included_categories_.push_back("v8");
+ return trace_config;
+}
+
+bool TraceConfig::IsCategoryGroupEnabled(const char* category_group) const {
+ for (auto included_category : included_categories_) {
+ if (strcmp(included_category.data(), category_group) == 0) return true;
+ }
+ return false;
+}
+
+} // namespace tracing
+} // namespace platform
+} // namespace v8

Powered by Google App Engine
This is Rietveld 408576698