summaryrefslogtreecommitdiff
path: root/src/tracing
AgeCommit message (Collapse)Author
2017-09-29src: remove unused using in node_trace_writer.hDaniel Bevenius
There is an unnecessary using TracingController in node_trace_writer.h and this commit removes it. PR-URL: https://github.com/nodejs/node/pull/15646 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Tobias Nießen <tniessen@tnie.de>
2017-09-27src: move node_trace_writer/buffer.h to agent.ccDaniel Bevenius
The headers node_trace_writer.h and node_trace_buffer.h are not used in agent.h but are more of an implementation detail of agent.cc. This commit suggests moving the inclusion of these headers to agent.cc. PR-URL: https://github.com/nodejs/node/pull/15598 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2017-09-25src: correct typo in trace_event headerDaniel Bevenius
PR-URL: https://github.com/nodejs/node/pull/15583 Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Richard Lau <riclau@uk.ibm.com> Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: James M Snell <jasnell@gmail.com>
2017-08-17src: Node implementation of v8::PlatformMatt Loring
Node.js currently uses the V8 implementation of the DefaultPlatform which schedules VM tasks on a V8 managed thread pool. Since the Node.js event loop is not aware of these tasks, the Node.js process may exit while there are outstanding VM tasks. This will become problematic once asynchronous wasm compilation lands in V8. This PR introduces a Node.js specific implementation of the v8::Platform on top of libuv so that the event loop is aware of outstanding VM tasks. PR-URL: https://github.com/nodejs/node/pull/14001 Fixes: https://github.com/nodejs/node/issues/3665 Fixes: https://github.com/nodejs/node/issues/8496 Fixes: https://github.com/nodejs/node/issues/12980 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: Tobias Nießen <tniessen@tnie.de>
2017-08-17tracing: Update to use new Platform tracing apisMatt Loring
V8 modified the platform API to accept a tracing controller at platform creation time that is required to be present for the lifetime of the platform if tracing will every be enabled. This will simplify the implementation of a v8::Platform subclass for node. PR-URL: https://github.com/nodejs/node/pull/14001 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: Tobias Nießen <tniessen@tnie.de>
2017-08-07build: enable C++ linting for src/*/*jeyanthinath
Fixes: https://github.com/nodejs/node/issues/14490 PR-URL: https://github.com/nodejs/node/pull/14497 Reviewed-By: Timothy Gu <timothygu99@gmail.com> Reviewed-By: Khaidi Chu <i@2333.moe> Reviewed-By: Refael Ackermann <refack@gmail.com>
2017-06-17src,lib,test,doc: correct misspellingsRoman Reiss
PR-URL: https://github.com/nodejs/node/pull/13719 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com>
2017-04-09src: use std::string for trace enabled_categoriesSam Roberts
A std::string manages its own memory, so using one removes the implicit assumption that the argv vector passed to node will never be deallocated. Also, the enabled_categories are used to construct a std::stringstream, so its simpler to use the standard library consistently. PR-URL: https://github.com/nodejs/node/pull/12242 Reviewed-By: Richard Lau <riclau@uk.ibm.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com>
2017-04-05src: Update trace event macros to V8 5.7 versionMatt Loring
src/tracing/trace_event.h was updated by applying the following changes: 1) Include src/tracing/trace_event_common.h instead of the one from v8 base. 2) Replace all instances of base::Atomic with intptr_t (trace events can only be generated from the main thread for now). 3) Replace instances of V8_INLINE with inline. 4) Eliminate uses of DCHECK. 5) Eliminate uses of V8_UNLIKELY, the branch predictor should be good enough alone. 6) Change the namespace used by trace_event.h from v8::internal::tracing to node::tracing. 7) Remove CallStatsScopedTracer class and related macros (they rely on V8 implementation details). 8) Change ConvertableToTraceFormat to v8::ConvertableToTraceFormat. 9) Add function "static void SetCurrentPlatform(v8::Platform* platform);" to the declaration of TraceEventHelper. PR-URL: https://github.com/nodejs/node/pull/12127 Reviewed-By: Ali Ijaz Sheikh <ofrobots@google.com>
2017-01-07src: fix TracingController cleanupJason Ginchereau
This fixes an incorrect deletion of the `TracingController` instance, which in some environments could cause an error about an invalid pointer passed to `free()`. The `TracingController` instance is actually owned by a `unique_ptr` member of the platform, so calling `platform::SetTracingController(nullptr)` is the correct way to delete it. But before that, the `TraceBuffer` must be deleted in order for the tracing loop to exit; that is accomplished by calling `TracingController::Initialize(nullptr)`. PR-URL: https://github.com/nodejs/node/pull/10623 Reviewed-By: Matthew Loring <mattloring@google.com> Reviewed-By: Michaël Zasso <targos@protonmail.com>
2016-12-29src: always initialize tracing controller in agentMatt Loring
PR-URL: https://github.com/nodejs/node/pull/10507 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
2016-12-28tracing: fix -Wunused-private-field warningSantiago Gimeno
Remove `external_buffer_` from `InternalTraceBuffer` as it seems not to be used anywhere. PR-URL: https://github.com/nodejs/node/pull/10416 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2016-12-28tracing: fix -Wreorder warningSantiago Gimeno
Initialize `InternalTraceBuffer::id_` the last. PR-URL: https://github.com/nodejs/node/pull/10416 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2016-12-20src: Node Tracing Controllermisterpoe
This commit adds support for trace-event tracing to Node.js. It provides a mechanism to centralize tracing information generated by V8, Node core, and userspace code. It includes: - A trace writer responsible for serializing traces and cycling the output files so that no individual file becomes to large. - A buffer for aggregating traces to allow for batched flushes. - An agent which initializes the tracing controller and ensures that trace serialization is done on a separate thread. - A set of macros for generating trace events. - Tests and documentation. Author: Raymond Kang <raymondksi@gmail.com> Author: Kelvin Jin <kelvinjin@google.com> Author: Matthew Loring <mattloring@google.com> Author: Jason Ginchereau <jasongin@microsoft.com> PR-URL: https://github.com/nodejs/node/pull/9304 Reviewed-By: Trevor Norris <trev.norris@gmail.com> Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com> Reviewed-By: Josh Gavant <josh.gavant@outlook.com>