★ wanayoo — archive 1999 https://github.com/nodejs/node/commit/56edd5fc5bNouvelle recherche | Portail wanayoo
Skip to content
Permalink
Browse files

src: close tracing event loop

Clean up resources when tearing down the tracing agent.

PR-URL: #21867
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Eugene Ostroukhov <eostroukhov@google.com>
Reviewed-By: Ali Ijaz Sheikh <ofrobots@google.com>
  • Loading branch information...
addaleax authored and targos committed Jul 17, 2018
1 parent 4c9c1bb commit 56edd5fc5b3673581690d200e5783655637ab63a
Showing with 7 additions and 0 deletions.
  1. +6 −0 src/tracing/agent.cc
  2. +1 −0 src/tracing/agent.h
@@ -2,6 +2,8 @@

#include <string>
#include "tracing/node_trace_buffer.h"
#include "debug_utils.h"
#include "env-inl.h"

namespace node {
namespace tracing {
@@ -53,6 +55,10 @@ Agent::Agent() {
CHECK_EQ(uv_loop_init(&tracing_loop_), 0);
}

Agent::~Agent() {
CheckedUvLoopClose(&tracing_loop_);
}

void Agent::Start() {
if (started_)
return;
@@ -64,6 +64,7 @@ class AgentWriterHandle {
class Agent {
public:
Agent();
~Agent();

TracingController* GetTracingController() { return tracing_controller_; }

0 comments on commit 56edd5f

Please sign in to comment.
You can’t perform that action at this time.