diff --git a/src/detect-engine-state.c b/src/detect-engine-state.c index 5501820d92..22782a0d69 100644 --- a/src/detect-engine-state.c +++ b/src/detect-engine-state.c @@ -577,7 +577,7 @@ int DeStateDetectContinueDetection(ThreadVars *tv, DetectEngineCtx *de_ctx, Dete SCLogDebug("id of signature to inspect: %"PRIuMAX, (uintmax_t)s->id); - PROFILING_START; + RULE_PROFILING_START; /* if we already fully matched previously, detect that here */ if (item->flags & DE_STATE_FLAG_FULL_MATCH) { diff --git a/src/detect.c b/src/detect.c index 61a92cf590..4c1d1ea893 100644 --- a/src/detect.c +++ b/src/detect.c @@ -1425,7 +1425,7 @@ int SigMatchSignatures(ThreadVars *th_v, DetectEngineCtx *de_ctx, DetectEngineTh /* inspect the sigs against the packet */ for (idx = 0; idx < det_ctx->match_array_cnt; idx++) { StreamMsg *alert_msg = NULL; - PROFILING_START; + RULE_PROFILING_START; s = det_ctx->match_array[idx]; SCLogDebug("inspecting signature id %"PRIu32"", s->id); diff --git a/src/util-profiling.c b/src/util-profiling.c index f710530414..f3fee4eafb 100644 --- a/src/util-profiling.c +++ b/src/util-profiling.c @@ -100,7 +100,7 @@ const char *profiling_file_mode; /** * Used as a check so we don't double enter a profiling run. */ -__thread int profiling_entered = 0; +__thread int profiling_rules_entered = 0; /** * \brief Initialize profiling. diff --git a/src/util-profiling.h b/src/util-profiling.h index 3c761e37d5..905288dffd 100644 --- a/src/util-profiling.h +++ b/src/util-profiling.h @@ -29,26 +29,26 @@ #include "util-cpu.h" extern int profiling_rules_enabled; -extern __thread int profiling_entered; +extern __thread int profiling_rules_entered; -#define PROFILING_START \ - uint64_t profile_start_ = 0; \ - uint64_t profile_end_ = 0; \ +#define RULE_PROFILING_START \ + uint64_t profile_rule_start_ = 0; \ + uint64_t profile_rule_end_ = 0; \ if (profiling_rules_enabled) { \ - if (profiling_entered > 0) { \ + if (profiling_rules_entered > 0) { \ SCLogError(SC_ERR_FATAL, "Re-entered profiling, exiting."); \ exit(1); \ } \ - profiling_entered++; \ - profile_start_ = UtilCpuGetTicks(); \ + profiling_rules_entered++; \ + profile_rule_start_ = UtilCpuGetTicks(); \ } #define RULE_PROFILING_END(r, m) \ if (profiling_rules_enabled) { \ - profile_end_ = UtilCpuGetTicks(); \ + profile_rule_end_ = UtilCpuGetTicks(); \ SCProfilingUpdateRuleCounter(r->profiling_id, \ - profile_end_ - profile_start_, m); \ - profiling_entered--; \ + profile_rule_end_ - profile_rule_start_, m); \ + profiling_rules_entered--; \ } void SCProfilingInit(void); @@ -61,7 +61,7 @@ void SCProfilingUpdateRuleCounter(uint16_t, uint64_t, int); #else -#define PROFILING_START +#define RULE_PROFILING_START #define RULE_PROFILING_END(r, m) #endif /* PROFILING */