Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nodejs/node.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJames M Snell <jasnell@gmail.com>2018-03-06 21:42:37 +0300
committerJames M Snell <jasnell@gmail.com>2018-03-16 20:54:05 +0300
commit96cb4fb795808aa2774e842974aeb411c5d3dd94 (patch)
treeda8a3965240c402f857e6267e0a278f486852c3a /src/node_perf_common.h
parent879f521c654fffd34360be432a6280936ba94071 (diff)
perf_hooks,trace_events: emit perf milestone trace events
Emit the perf_hooks node timing milestones as trace events. PR-URL: https://github.com/nodejs/node/pull/19175 Reviewed-By: Anna Henningsen <anna@addaleax.net>
Diffstat (limited to 'src/node_perf_common.h')
-rw-r--r--src/node_perf_common.h9
1 files changed, 3 insertions, 6 deletions
diff --git a/src/node_perf_common.h b/src/node_perf_common.h
index 7ff57359ba5..9754e1e66f3 100644
--- a/src/node_perf_common.h
+++ b/src/node_perf_common.h
@@ -56,12 +56,6 @@ enum PerformanceEntryType {
NODE_PERFORMANCE_ENTRY_TYPE_INVALID
};
-#define PERFORMANCE_MARK(env, n) \
- do { \
- node::performance::MarkPerformanceMilestone(env, \
- node::performance::NODE_PERFORMANCE_MILESTONE_##n); \
- } while (0);
-
class performance_state {
public:
explicit performance_state(v8::Isolate* isolate) :
@@ -86,6 +80,9 @@ class performance_state {
AliasedBuffer<double, v8::Float64Array> milestones;
AliasedBuffer<uint32_t, v8::Uint32Array> observers;
+ void Mark(enum PerformanceMilestone milestone,
+ uint64_t ts = PERFORMANCE_NOW());
+
private:
struct performance_state_internal {
// doubles first so that they are always sizeof(double)-aligned