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