From a2e46eae46825e3eb87f9205d8dbc962b1d0107a Mon Sep 17 00:00:00 2001 From: jsteemann Date: Fri, 16 Aug 2019 14:36:41 -0700 Subject: [PATCH] fix compiling with `-DNPERF_CONTEXT` (#5704) Summary: This was previously broken, as the performance context-related macro signatures in file monitoring/perf_context_imp.h deviated for the case when NPERF_CONTEXT was defined and when it was not. Update the macros for the `-DNPERF_CONTEXT` case, so it compiles. Pull Request resolved: https://github.com/facebook/rocksdb/pull/5704 Differential Revision: D16867746 fbshipit-source-id: 05539724cb1f7955ecc42828365836a677759ad9 --- monitoring/perf_context_imp.h | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/monitoring/perf_context_imp.h b/monitoring/perf_context_imp.h index e0ff8afc5..6e26988f1 100644 --- a/monitoring/perf_context_imp.h +++ b/monitoring/perf_context_imp.h @@ -22,12 +22,15 @@ extern thread_local PerfContext perf_context; #if defined(NPERF_CONTEXT) -#define PERF_TIMER_GUARD(metric) -#define PERF_CONDITIONAL_TIMER_FOR_MUTEX_GUARD(metric, condition) -#define PERF_TIMER_MEASURE(metric) #define PERF_TIMER_STOP(metric) #define PERF_TIMER_START(metric) +#define PERF_TIMER_GUARD(metric) +#define PERF_TIMER_GUARD_WITH_ENV(metric, env) +#define PERF_CPU_TIMER_GUARD(metric, env) +#define PERF_CONDITIONAL_TIMER_FOR_MUTEX_GUARD(metric, condition, stats, ticker_type) +#define PERF_TIMER_MEASURE(metric) #define PERF_COUNTER_ADD(metric, value) +#define PERF_COUNTER_BY_LEVEL_ADD(metric, value, level) #else -- GitLab