diff options
author | James M Snell <jasnell@gmail.com> | 2018-07-29 23:16:45 +0300 |
---|---|---|
committer | James M Snell <jasnell@gmail.com> | 2018-08-17 19:08:05 +0300 |
commit | 4b7cd4bd60623b9c69d791112f4500575a3e9e7d (patch) | |
tree | af178bce561ac6c86289cca200460c35a5ebd230 /src/tracing | |
parent | 2ce03804a6a2e55a034814ca40fafac654321e33 (diff) |
trace_events: add trace category enabled tracking
Track state of async_hooks trace event category enablement.
Enable/disable the async_hooks trace event dynamically.
PR-URL: https://github.com/nodejs/node/pull/22128
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Andreas Madsen <amwebdk@gmail.com>
Diffstat (limited to 'src/tracing')
-rw-r--r-- | src/tracing/agent.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/tracing/agent.h b/src/tracing/agent.h index 045aaef85e8..e79480a0369 100644 --- a/src/tracing/agent.h +++ b/src/tracing/agent.h @@ -51,6 +51,8 @@ class AgentWriterHandle { inline Agent* agent() { return agent_; } + inline v8::TracingController* GetTracingController(); + private: inline AgentWriterHandle(Agent* agent, int id) : agent_(agent), id_(id) {} @@ -155,6 +157,10 @@ void AgentWriterHandle::Disable(const std::set<std::string>& categories) { if (agent_ != nullptr) agent_->Disable(id_, categories); } +inline v8::TracingController* AgentWriterHandle::GetTracingController() { + return agent_ != nullptr ? agent_->GetTracingController() : nullptr; +} + } // namespace tracing } // namespace node |