v8
V8 is Google’s open source high-performance JavaScript and WebAssembly engine, written in C++.
Loading...
Searching...
No Matches
trace-config.cc
Go to the documentation of this file.
1
// Copyright 2016 the V8 project authors. All rights reserved.
2
// Use of this source code is governed by a BSD-style license that can be
3
// found in the LICENSE file.
4
5
#include <
string.h
>
6
7
#include "
include/libplatform/v8-tracing.h
"
8
#include "
src/base/logging.h
"
9
10
namespace
v8
{
11
12
class
Isolate;
13
14
namespace
platform {
15
namespace
tracing {
16
17
TraceConfig
*
TraceConfig::CreateDefaultTraceConfig
() {
18
TraceConfig
* trace_config =
new
TraceConfig
();
19
trace_config->
included_categories_
.push_back(
"v8"
);
20
return
trace_config;
21
}
22
23
bool
TraceConfig::IsCategoryGroupEnabled
(
const
char
* category_group)
const
{
24
std::stringstream category_stream(category_group);
25
while
(category_stream.good()) {
26
std::string category;
27
getline(category_stream, category,
','
);
28
for
(
const
auto
& included_category :
included_categories_
) {
29
if
(category == included_category)
return
true
;
30
}
31
}
32
return
false
;
33
}
34
35
void
TraceConfig::AddIncludedCategory
(
const
char
* included_category) {
36
DCHECK
(included_category !=
nullptr
&& strlen(included_category) > 0);
37
included_categories_
.push_back(included_category);
38
}
39
40
}
// namespace tracing
41
}
// namespace platform
42
}
// namespace v8
v8::platform::tracing::TraceConfig
Definition
v8-tracing.h:194
v8::platform::tracing::TraceConfig::AddIncludedCategory
void AddIncludedCategory(const char *included_category)
Definition
trace-config.cc:35
v8::platform::tracing::TraceConfig::IsCategoryGroupEnabled
bool IsCategoryGroupEnabled(const char *category_group) const
Definition
trace-config.cc:23
v8::platform::tracing::TraceConfig::CreateDefaultTraceConfig
static TraceConfig * CreateDefaultTraceConfig()
Definition
trace-config.cc:17
v8::platform::tracing::TraceConfig::TraceConfig
TraceConfig()
Definition
v8-tracing.h:200
v8::platform::tracing::TraceConfig::included_categories_
StringList included_categories_
Definition
v8-tracing.h:220
v8
Definition
api-arguments-inl.h:19
logging.h
DCHECK
#define DCHECK(condition)
Definition
logging.h:482
string.h
v8-tracing.h
src
libplatform
tracing
trace-config.cc
Generated on Sun Apr 6 2025 21:08:54 for v8 by
1.12.0