aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/core/lib/profiling/timers.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/core/lib/profiling/timers.h')
-rw-r--r--src/core/lib/profiling/timers.h9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/core/lib/profiling/timers.h b/src/core/lib/profiling/timers.h
index d0188b5054..7ff72783ec 100644
--- a/src/core/lib/profiling/timers.h
+++ b/src/core/lib/profiling/timers.h
@@ -82,9 +82,12 @@ class ProfileScope {
};
} // namespace grpc
-#define GPR_TIMER_SCOPE(tag, important) \
- ::grpc::ProfileScope _profile_scope_##__LINE__((tag), (important), __FILE__, \
- __LINE__)
+#define GPR_TIMER_SCOPE_NAME_INTERNAL(prefix, line) prefix##line
+#define GPR_TIMER_SCOPE_NAME(prefix, line) \
+ GPR_TIMER_SCOPE_NAME_INTERNAL(prefix, line)
+#define GPR_TIMER_SCOPE(tag, important) \
+ ::grpc::ProfileScope GPR_TIMER_SCOPE_NAME(_profile_scope_, __LINE__)( \
+ (tag), (important), __FILE__, __LINE__)
#endif /* at least one profiler requested. */