summaryrefslogtreecommitdiff
path: root/src/tracing/node_trace_buffer.cc
AgeCommit message (Collapse)Author
2019-03-12src: apply clang-tidy rule modernize-make-uniquegengjiawen
PR-URL: https://github.com/nodejs/node/pull/26493 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Refael Ackermann <refack@gmail.com> Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
2019-02-14src: use more stable cast where possibleGireesh Punathil
PR-URL: https://github.com/nodejs/node/pull/26052 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com> Reviewed-By: Anto Aravinth <anto.aravinth.cse@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Richard Lau <riclau@uk.ibm.com>
2019-02-04src: fix race condition in `~NodeTraceBuffer`Anna Henningsen
Libuv does not guarantee that handles have their close callbacks called in the order in which they were added (and in fact, currently calls them in reverse order). This patch ensures that the `flush_signal_` handle is no longer in use (i.e. its close callback has already been run) when we signal to the main thread that `~NodeTraceBuffer` may be destroyed. The same applies for `~NodeTraceWriter`. Credit for debugging goes to Gireesh Punathil. Fixes: https://github.com/nodejs/node/issues/25512 Co-authored-by: Gireesh Punathil <gpunathi@in.ibm.com> PR-URL: https://github.com/nodejs/node/pull/25896 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Refael Ackermann <refack@gmail.com> Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com> Reviewed-By: Eugene Ostroukhov <eostroukhov@google.com>
2018-09-13trace_events: avoid flusing uninitialized tracesAli Ijaz Sheikh
PR-URL: https://github.com/nodejs/node/pull/22812 Reviewed-By: Refael Ackermann <refack@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Eugene Ostroukhov <eostroukhov@google.com>
2018-05-30src: remove unused private data memberBen Noordhuis
PR-URL: https://github.com/nodejs/node/pull/20974 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com> Reviewed-By: Tiancheng "Timothy" Gu <timothygu99@gmail.com> Reviewed-By: Tobias Nießen <tniessen@tnie.de>
2018-05-22lib,src,test: fix commentsTobias Nießen
PR-URL: https://github.com/nodejs/node/pull/20846 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com> Reviewed-By: Richard Lau <riclau@uk.ibm.com>
2018-05-17inspector: add a "NodeTracing" domain supportEugene Ostroukhov
This change adds a new inspector domain for receiving Node tracing data. 1. Node.js now can extend Inspector protocol with new domains with the API defined in the src/inspector/node_protocol.pdl. 2. Plumbing code will be generated at the build time. /json/protocol HTTP endpoint returns both V8 and Node.js inspector protocol. 3. "NodeTracing" domain was introduced. It is based on the Chrome "Tracing" domain. PR-URL: https://github.com/nodejs/node/pull/20608 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Ali Ijaz Sheikh <ofrobots@google.com> Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
2017-12-01src: use nullptr instead of NULLDaniel Bevenius
PR-URL: https://github.com/nodejs/node/pull/17373 Reviewed-By: Jon Moss <me@jonathanmoss.me> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Timothy Gu <timothygu99@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com> Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com> 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>
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>