mirror of
https://github.com/zebrajr/node.git
synced 2026-01-15 12:15:26 +00:00
This addresses late review comments for the recently
landed cfbfc1b050 and aligns the new code with the
pre-existing V8 fast call counters.
Refs: https://github.com/nodejs/node/pull/60434#pullrequestreview-3386035944
PR-URL: https://github.com/nodejs/node/pull/60447
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
31 lines
795 B
C++
31 lines
795 B
C++
#pragma once
|
|
|
|
#if defined(NODE_WANT_INTERNALS) && NODE_WANT_INTERNALS
|
|
|
|
#ifdef DEBUG
|
|
#include "util.h"
|
|
#endif // DEBUG
|
|
|
|
namespace node {
|
|
namespace debug {
|
|
|
|
#ifdef DEBUG
|
|
void TrackV8FastApiCall(FastStringKey key);
|
|
int GetV8FastApiCallCount(FastStringKey key);
|
|
|
|
void CountGenericUsage(FastStringKey counter_name);
|
|
#define COUNT_GENERIC_USAGE(name) \
|
|
node::debug::CountGenericUsage(FastStringKey(name))
|
|
|
|
#define TRACK_V8_FAST_API_CALL(key) \
|
|
node::debug::TrackV8FastApiCall(FastStringKey(key))
|
|
#else // !DEBUG
|
|
#define TRACK_V8_FAST_API_CALL(key)
|
|
#define COUNT_GENERIC_USAGE(name)
|
|
#endif // DEBUG
|
|
|
|
} // namespace debug
|
|
} // namespace node
|
|
|
|
#endif // defined(NODE_WANT_INTERNALS) && NODE_WANT_INTERNALS
|