From c9159892c72f5b4782862c3bfcc5deacccbbd0c6 Mon Sep 17 00:00:00 2001 From: Victor Julien Date: Tue, 31 May 2016 14:17:35 +0200 Subject: [PATCH] profiling: allow packet profiling to be reset --- src/util-profiling.h | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/util-profiling.h b/src/util-profiling.h index c97f1b5c09..54521a4220 100644 --- a/src/util-profiling.h +++ b/src/util-profiling.h @@ -96,6 +96,12 @@ PktProfiling *SCProfilePacketStart(void); (p)->profile->ticks_start = UtilCpuGetTicks(); \ } +#define PACKET_PROFILING_RESTART(p) \ + if (profiling_packets_enabled) { \ + if ((p)->profile != NULL) \ + (p)->profile->ticks_start = UtilCpuGetTicks(); \ + } + #define PACKET_PROFILING_END(p) \ if (profiling_packets_enabled && (p)->profile != NULL) { \ (p)->profile->ticks_end = UtilCpuGetTicks(); \ @@ -286,6 +292,7 @@ void SCProfilingDump(void); #define KEYWORD_PROFILING_END(a,b,c) #define PACKET_PROFILING_START(p) +#define PACKET_PROFILING_RESTART(p) #define PACKET_PROFILING_END(p) #define PACKET_PROFILING_TMM_START(p, id)