7 #include "include/libplatform/v8-tracing.h" 8 #include "src/base/logging.h" 17 TraceConfig* TraceConfig::CreateDefaultTraceConfig() {
18 TraceConfig* trace_config =
new TraceConfig();
19 trace_config->included_categories_.push_back(
"v8");
23 bool TraceConfig::IsCategoryGroupEnabled(
const char* category_group)
const {
24 std::stringstream category_stream(category_group);
25 while (category_stream.good()) {
27 getline(category_stream, category,
',');
28 for (
const auto& included_category : included_categories_) {
29 if (category == included_category)
return true;
35 void TraceConfig::AddIncludedCategory(
const char* included_category) {
36 DCHECK(included_category !=
nullptr && strlen(included_category) > 0);
37 included_categories_.push_back(included_category);