summaryrefslogtreecommitdiff
path: root/src/tracing
diff options
context:
space:
mode:
authorChin Huang <chhuang@us.ibm.com>2018-03-21 11:07:23 -0700
committerJames M Snell <jasnell@gmail.com>2018-04-14 12:45:25 -0700
commit09c63460ebda30c7d5e7f40532a311fb2139803a (patch)
tree42c971e8c15751ffef0c7567b86a6904194bce79 /src/tracing
parentc1a05e5c26492a2107d49cbc3ef86baece578a79 (diff)
downloadandroid-node-v8-09c63460ebda30c7d5e7f40532a311fb2139803a.tar.gz
android-node-v8-09c63460ebda30c7d5e7f40532a311fb2139803a.tar.bz2
android-node-v8-09c63460ebda30c7d5e7f40532a311fb2139803a.zip
src: add sync trace to fs
Add sync trace to fs operations which is enabled by the node.fs.sync trace event category. Also add a general test js file to verify all operations. PR-URL: https://github.com/nodejs/node/pull/19649 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com> Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
Diffstat (limited to 'src/tracing')
-rw-r--r--src/tracing/trace_event_common.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/tracing/trace_event_common.h b/src/tracing/trace_event_common.h
index 51869ee952..18dd6ec18b 100644
--- a/src/tracing/trace_event_common.h
+++ b/src/tracing/trace_event_common.h
@@ -271,6 +271,9 @@
// does nothing.
// - category and name strings must have application lifetime (statics or
// literals). They may not include " chars.
+#define TRACE_EVENT_BEGIN(category_group, name, ...) \
+ INTERNAL_TRACE_EVENT_ADD(TRACE_EVENT_PHASE_BEGIN, category_group, name, \
+ TRACE_EVENT_FLAG_NONE, ##__VA_ARGS__)
#define TRACE_EVENT_BEGIN0(category_group, name) \
INTERNAL_TRACE_EVENT_ADD(TRACE_EVENT_PHASE_BEGIN, category_group, name, \
TRACE_EVENT_FLAG_NONE)
@@ -327,6 +330,9 @@
// is not enabled, then this does nothing.
// - category and name strings must have application lifetime (statics or
// literals). They may not include " chars.
+#define TRACE_EVENT_END(category_group, name, ...) \
+ INTERNAL_TRACE_EVENT_ADD(TRACE_EVENT_PHASE_END, category_group, name, \
+ TRACE_EVENT_FLAG_NONE, ##__VA_ARGS__)
#define TRACE_EVENT_END0(category_group, name) \
INTERNAL_TRACE_EVENT_ADD(TRACE_EVENT_PHASE_END, category_group, name, \
TRACE_EVENT_FLAG_NONE)