blob: 3ffe6f8867cae0fca0e624becf87b6cf168874f2 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
|
#include "tracing/trace_event.h"
#include "node.h"
namespace node {
namespace tracing {
Agent* g_agent = nullptr;
v8::TracingController* g_controller = nullptr;
void TraceEventHelper::SetAgent(Agent* agent) {
g_agent = agent;
g_controller = agent->GetTracingController();
}
Agent* TraceEventHelper::GetAgent() {
return g_agent;
}
v8::TracingController* TraceEventHelper::GetTracingController() {
return g_controller;
}
void TraceEventHelper::SetTracingController(v8::TracingController* controller) {
g_controller = controller;
}
} // namespace tracing
v8::TracingController* GetTracingController() {
return tracing::TraceEventHelper::GetTracingController();
}
void SetTracingController(v8::TracingController* controller) {
tracing::TraceEventHelper::SetTracingController(controller);
}
} // namespace node
|