diff options
author | Anna Henningsen <anna@addaleax.net> | 2018-07-17 02:50:07 +0200 |
---|---|---|
committer | Anna Henningsen <anna@addaleax.net> | 2018-08-01 17:16:51 +0200 |
commit | 620e46c8b59b6269784ebba42b23f23897eeedb9 (patch) | |
tree | 6b396fdec4964d0305bbbb62195ebf56e636c78e /src/env.h | |
parent | 3ac94dc977b232a4502307733af2b3af60e7b102 (diff) | |
download | node-new-620e46c8b59b6269784ebba42b23f23897eeedb9.tar.gz |
src: refactor default trace writer out of agent
The agent code is supposed to manage multiple writers/clients.
Adding the default writer into the mix breaks that encapsulation.
Instead, manage default options through a separate "virtual"
default client handle, and keep the file writer management
all to the actual users.
PR-URL: https://github.com/nodejs/node/pull/21867
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Eugene Ostroukhov <eostroukhov@google.com>
Reviewed-By: Ali Ijaz Sheikh <ofrobots@google.com>
Diffstat (limited to 'src/env.h')
-rw-r--r-- | src/env.h | 8 |
1 files changed, 4 insertions, 4 deletions
@@ -55,7 +55,7 @@ class performance_state; } namespace tracing { -class Agent; +class AgentWriterHandle; } namespace worker { @@ -587,7 +587,7 @@ class Environment { Environment(IsolateData* isolate_data, v8::Local<v8::Context> context, - tracing::Agent* tracing_agent); + tracing::AgentWriterHandle* tracing_agent_writer); ~Environment(); void Start(int argc, @@ -625,7 +625,7 @@ class Environment { inline bool profiler_idle_notifier_started() const; inline v8::Isolate* isolate() const; - inline tracing::Agent* tracing_agent() const; + inline tracing::AgentWriterHandle* tracing_agent_writer() const; inline uv_loop_t* event_loop() const; inline uint32_t watched_providers() const; @@ -879,7 +879,7 @@ class Environment { v8::Isolate* const isolate_; IsolateData* const isolate_data_; - tracing::Agent* const tracing_agent_; + tracing::AgentWriterHandle* const tracing_agent_writer_; uv_timer_t timer_handle_; uv_check_t immediate_check_handle_; uv_idle_t immediate_idle_handle_; |