suricata
util-profiling.h
Go to the documentation of this file.
1 /* Copyright (C) 2007-2012 Open Information Security Foundation
2  *
3  * You can copy, redistribute or modify this Program under the terms of
4  * the GNU General Public License version 2 as published by the Free
5  * Software Foundation.
6  *
7  * This program is distributed in the hope that it will be useful,
8  * but WITHOUT ANY WARRANTY; without even the implied warranty of
9  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
10  * GNU General Public License for more details.
11  *
12  * You should have received a copy of the GNU General Public License
13  * version 2 along with this program; if not, write to the Free Software
14  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
15  * 02110-1301, USA.
16  */
17 
18 /**
19  * \file
20  *
21  * \author Endace Technology Limited.
22  * \author Victor Julien <victor@inliniac.net>
23  */
24 
25 #ifndef SURICATA_UTIL_PROFILE_H
26 #define SURICATA_UTIL_PROFILE_H
27 
28 #include "util-cpu.h"
29 
30 #include "detect.h"
31 
32 #ifdef PROFILING
33 
34 #include "util-cpu.h"
35 #include "util-profiling-locks.h"
36 
37 extern int profiling_rules_enabled;
38 extern int profiling_packets_enabled;
39 extern int profiling_sghs_enabled;
40 
43 extern int profiling_keyword_enabled;
44 extern thread_local int profiling_keyword_entered;
45 
46 #define KEYWORD_PROFILING_SET_LIST(ctx, list) { \
47  (ctx)->keyword_perf_list = (list); \
48 }
49 
50 #define KEYWORD_PROFILING_START \
51  uint64_t profile_keyword_start_ = 0; \
52  uint64_t profile_keyword_end_ = 0; \
53  if (profiling_keyword_enabled) { \
54  if (profiling_keyword_entered > 0) { \
55  SCLogError("Re-entered profiling, exiting."); \
56  abort(); \
57  } \
58  profiling_keyword_entered++; \
59  profile_keyword_start_ = UtilCpuGetTicks(); \
60  }
61 
62 /* we allow this macro to be called if profiling_keyword_entered == 0,
63  * so that we don't have to refactor some of the detection code. */
64 #define KEYWORD_PROFILING_END(ctx, type, m) \
65  if (profiling_keyword_enabled && profiling_keyword_entered) { \
66  profile_keyword_end_ = UtilCpuGetTicks(); \
67  SCProfilingKeywordUpdateCounter((ctx),(type),(profile_keyword_end_ - profile_keyword_start_),(m)); \
68  profiling_keyword_entered--; \
69  }
70 
72 
73 #define PACKET_PROFILING_START(p) \
74  if (profiling_packets_enabled) { \
75  (p)->profile = SCProfilePacketStart(); \
76  if ((p)->profile != NULL) \
77  (p)->profile->ticks_start = UtilCpuGetTicks(); \
78  }
79 
80 #define PACKET_PROFILING_RESTART(p) \
81  if (profiling_packets_enabled) { \
82  if ((p)->profile != NULL) \
83  (p)->profile->ticks_start = UtilCpuGetTicks(); \
84  }
85 
86 #define PACKET_PROFILING_END(p) \
87  if (profiling_packets_enabled && (p)->profile != NULL) { \
88  (p)->profile->ticks_end = UtilCpuGetTicks(); \
89  SCProfilingAddPacket((p)); \
90  }
91 
92 #ifdef PROFILE_LOCKING
93 #define PACKET_PROFILING_RESET_LOCKS do { \
94  mutex_lock_cnt = 0; \
95  mutex_lock_wait_ticks = 0; \
96  mutex_lock_contention = 0; \
97  spin_lock_cnt = 0; \
98  spin_lock_wait_ticks = 0; \
99  spin_lock_contention = 0; \
100  rww_lock_cnt = 0; \
101  rww_lock_wait_ticks = 0; \
102  rww_lock_contention = 0; \
103  rwr_lock_cnt = 0; \
104  rwr_lock_wait_ticks = 0; \
105  rwr_lock_contention = 0; \
106  locks_idx = 0; \
107  record_locks = 1;\
108  } while (0)
109 
110 #define PACKET_PROFILING_COPY_LOCKS(p, id) do { \
111  (p)->profile->tmm[(id)].mutex_lock_cnt = mutex_lock_cnt; \
112  (p)->profile->tmm[(id)].mutex_lock_wait_ticks = mutex_lock_wait_ticks; \
113  (p)->profile->tmm[(id)].mutex_lock_contention = mutex_lock_contention; \
114  (p)->profile->tmm[(id)].spin_lock_cnt = spin_lock_cnt; \
115  (p)->profile->tmm[(id)].spin_lock_wait_ticks = spin_lock_wait_ticks; \
116  (p)->profile->tmm[(id)].spin_lock_contention = spin_lock_contention; \
117  (p)->profile->tmm[(id)].rww_lock_cnt = rww_lock_cnt; \
118  (p)->profile->tmm[(id)].rww_lock_wait_ticks = rww_lock_wait_ticks; \
119  (p)->profile->tmm[(id)].rww_lock_contention = rww_lock_contention; \
120  (p)->profile->tmm[(id)].rwr_lock_cnt = rwr_lock_cnt; \
121  (p)->profile->tmm[(id)].rwr_lock_wait_ticks = rwr_lock_wait_ticks; \
122  (p)->profile->tmm[(id)].rwr_lock_contention = rwr_lock_contention; \
123  record_locks = 0; \
124  SCProfilingAddPacketLocks((p)); \
125  } while(0)
126 #else
127 #define PACKET_PROFILING_RESET_LOCKS
128 #define PACKET_PROFILING_COPY_LOCKS(p, id)
129 #endif
130 
131 #define PACKET_PROFILING_TMM_START(p, id) \
132  if (profiling_packets_enabled && (p)->profile != NULL) { \
133  if ((id) < TMM_SIZE) { \
134  (p)->profile->tmm[(id)].ticks_start = UtilCpuGetTicks();\
135  PACKET_PROFILING_RESET_LOCKS; \
136  } \
137  }
138 
139 #define PACKET_PROFILING_TMM_END(p, id) \
140  if (profiling_packets_enabled && (p)->profile != NULL) { \
141  if ((id) < TMM_SIZE) { \
142  PACKET_PROFILING_COPY_LOCKS((p), (id)); \
143  (p)->profile->tmm[(id)].ticks_end = UtilCpuGetTicks(); \
144  } \
145  }
146 
147 #define FLOWWORKER_PROFILING_START(p, id) \
148  if (profiling_packets_enabled && (p)->profile != NULL) { \
149  if ((id) < PROFILE_FLOWWORKER_SIZE) { \
150  (p)->profile->flowworker[(id)].ticks_start = UtilCpuGetTicks();\
151  } \
152  }
153 
154 #define FLOWWORKER_PROFILING_END(p, id) \
155  if (profiling_packets_enabled && (p)->profile != NULL) { \
156  if ((id) < PROFILE_FLOWWORKER_SIZE) { \
157  (p)->profile->flowworker[(id)].ticks_end = UtilCpuGetTicks(); \
158  } \
159  }
160 
161 #define PACKET_PROFILING_RESET(p) \
162  if (profiling_packets_enabled && (p)->profile != NULL) { \
163  SCFree((p)->profile); \
164  (p)->profile = NULL; \
165  }
166 
167 #define PACKET_PROFILING_APP_START(dp, id) \
168  if (profiling_packets_enabled) { \
169  (dp)->ticks_start = UtilCpuGetTicks(); \
170  (dp)->alproto = (id); \
171  }
172 
173 #define PACKET_PROFILING_APP_END(dp, id) \
174  if (profiling_packets_enabled) { \
175  BUG_ON((id) != (dp)->alproto); \
176  (dp)->ticks_end = UtilCpuGetTicks(); \
177  if ((dp)->ticks_start != 0 && (dp)->ticks_start < ((dp)->ticks_end)) { \
178  (dp)->ticks_spent = ((dp)->ticks_end - (dp)->ticks_start); \
179  } \
180  }
181 
182 #define PACKET_PROFILING_APP_PD_START(dp) \
183  if (profiling_packets_enabled) { \
184  (dp)->proto_detect_ticks_start = UtilCpuGetTicks(); \
185  }
186 
187 #define PACKET_PROFILING_APP_PD_END(dp) \
188  if (profiling_packets_enabled) { \
189  (dp)->proto_detect_ticks_end = UtilCpuGetTicks(); \
190  if ((dp)->proto_detect_ticks_start != 0 && (dp)->proto_detect_ticks_start < ((dp)->proto_detect_ticks_end)) { \
191  (dp)->proto_detect_ticks_spent = \
192  ((dp)->proto_detect_ticks_end - (dp)->proto_detect_ticks_start); \
193  } \
194  }
195 
196 #define PACKET_PROFILING_APP_RESET(dp) \
197  if (profiling_packets_enabled) { \
198  (dp)->ticks_start = 0; \
199  (dp)->ticks_end = 0; \
200  (dp)->ticks_spent = 0; \
201  (dp)->alproto = 0; \
202  (dp)->proto_detect_ticks_start = 0; \
203  (dp)->proto_detect_ticks_end = 0; \
204  (dp)->proto_detect_ticks_spent = 0; \
205  }
206 
207 #define PACKET_PROFILING_APP_STORE(dp, p) \
208  if (profiling_packets_enabled && (p)->profile != NULL) { \
209  if ((dp)->alproto < ALPROTO_MAX) { \
210  (p)->profile->app[(dp)->alproto].ticks_spent += (dp)->ticks_spent; \
211  (p)->profile->proto_detect += (dp)->proto_detect_ticks_spent; \
212  } \
213  }
214 
215 #define PACKET_PROFILING_DETECT_START(p, id) \
216  if (profiling_packets_enabled && (p)->profile != NULL) { \
217  if ((id) < PROF_DETECT_SIZE) { \
218  (p)->profile->detect[(id)].ticks_start = UtilCpuGetTicks(); \
219  } \
220  }
221 
222 #define PACKET_PROFILING_DETECT_END(p, id) \
223  if (profiling_packets_enabled && (p)->profile != NULL) { \
224  if ((id) < PROF_DETECT_SIZE) { \
225  (p)->profile->detect[(id)].ticks_end = UtilCpuGetTicks();\
226  if ((p)->profile->detect[(id)].ticks_start != 0 && \
227  (p)->profile->detect[(id)].ticks_start < (p)->profile->detect[(id)].ticks_end) { \
228  (p)->profile->detect[(id)].ticks_spent += \
229  ((p)->profile->detect[(id)].ticks_end - (p)->profile->detect[(id)].ticks_start); \
230  } \
231  } \
232  }
233 
234 #define PACKET_PROFILING_LOGGER_START(p, id) \
235  if (profiling_packets_enabled && (p)->profile != NULL) { \
236  if ((id) < LOGGER_SIZE) { \
237  (p)->profile->logger[(id)].ticks_start = UtilCpuGetTicks(); \
238  } \
239  }
240 
241 #define PACKET_PROFILING_LOGGER_END(p, id) \
242  if (profiling_packets_enabled && (p)->profile != NULL) { \
243  if ((id) < LOGGER_SIZE) { \
244  (p)->profile->logger[(id)].ticks_end = UtilCpuGetTicks();\
245  if ((p)->profile->logger[(id)].ticks_start != 0 && \
246  (p)->profile->logger[(id)].ticks_start < (p)->profile->logger[(id)].ticks_end) { \
247  (p)->profile->logger[(id)].ticks_spent += \
248  ((p)->profile->logger[(id)].ticks_end - (p)->profile->logger[(id)].ticks_start); \
249  } \
250  } \
251  }
252 
253 #define SGH_PROFILING_RECORD(det_ctx, sgh) \
254  if (profiling_sghs_enabled) { \
255  SCProfilingSghUpdateCounter((det_ctx), (sgh)); \
256  }
257 
258 extern int profiling_prefilter_enabled;
259 extern thread_local int profiling_prefilter_entered;
260 
261 #define PREFILTER_PROFILING_START(det_ctx) \
262  (det_ctx)->prefilter_bytes = 0; \
263  (det_ctx)->prefilter_bytes_called = 0; \
264  uint64_t profile_prefilter_start_ = 0; \
265  uint64_t profile_prefilter_end_ = 0; \
266  if (profiling_prefilter_enabled) { \
267  if (profiling_prefilter_entered > 0) { \
268  SCLogError("Re-entered profiling, exiting."); \
269  abort(); \
270  } \
271  profiling_prefilter_entered++; \
272  profile_prefilter_start_ = UtilCpuGetTicks(); \
273  }
274 
275 /* we allow this macro to be called if profiling_prefilter_entered == 0,
276  * so that we don't have to refactor some of the detection code. */
277 #define PREFILTER_PROFILING_END(ctx, profile_id) \
278  if (profiling_prefilter_enabled && profiling_prefilter_entered) { \
279  profile_prefilter_end_ = UtilCpuGetTicks(); \
280  if (profile_prefilter_end_ > profile_prefilter_start_) \
281  SCProfilingPrefilterUpdateCounter((ctx), (profile_id), \
282  (profile_prefilter_end_ - profile_prefilter_start_), (ctx)->prefilter_bytes, \
283  (ctx)->prefilter_bytes_called); \
284  profiling_prefilter_entered--; \
285  }
286 
287 #define PREFILTER_PROFILING_ADD_BYTES(det_ctx, bytes) \
288  (det_ctx)->prefilter_bytes += (bytes); \
289  (det_ctx)->prefilter_bytes_called++
290 
291 struct SCProfileDetectCtx_;
293 void SCProfilingRuleDestroyCtx(struct SCProfileDetectCtx_ *);
295 void SCProfilingRuleUpdateCounter(DetectEngineThreadCtx *, uint16_t, uint64_t, int);
296 void SCProfilingRuleThreadSetup(struct SCProfileDetectCtx_ *, DetectEngineThreadCtx *);
298 
300 void SCProfilingKeywordDestroyCtx(DetectEngineCtx *);//struct SCProfileKeywordDetectCtx_ *);
302 void SCProfilingKeywordUpdateCounter(DetectEngineThreadCtx *det_ctx, int id, uint64_t ticks, int match);
305 
310 void SCProfilingPrefilterUpdateCounter(DetectEngineThreadCtx *det_ctx, int id, uint64_t ticks,
311  uint64_t bytes, uint64_t bytes_called);
314 
315 void SCProfilingSghsGlobalInit(void);
321 
322 void SCProfilingInit(void);
323 void SCProfilingDestroy(void);
324 void SCProfilingRegisterTests(void);
325 void SCProfilingDump(void);
326 
327 #else
328 
329 #define KEYWORD_PROFILING_SET_LIST(a,b)
330 #define KEYWORD_PROFILING_START
331 #define KEYWORD_PROFILING_END(a,b,c)
332 
333 #define PACKET_PROFILING_START(p)
334 #define PACKET_PROFILING_RESTART(p)
335 #define PACKET_PROFILING_END(p)
336 
337 #define PACKET_PROFILING_TMM_START(p, id)
338 #define PACKET_PROFILING_TMM_END(p, id)
339 
340 #define PACKET_PROFILING_RESET(p)
341 
342 #define PACKET_PROFILING_APP_START(dp, id)
343 #define PACKET_PROFILING_APP_END(dp, id)
344 #define PACKET_PROFILING_APP_RESET(dp)
345 #define PACKET_PROFILING_APP_STORE(dp, p)
346 
347 #define PACKET_PROFILING_APP_PD_START(dp)
348 #define PACKET_PROFILING_APP_PD_END(dp)
349 
350 #define PACKET_PROFILING_DETECT_START(p, id)
351 #define PACKET_PROFILING_DETECT_END(p, id)
352 
353 #define PACKET_PROFILING_LOGGER_START(p, id)
354 #define PACKET_PROFILING_LOGGER_END(p, id)
355 
356 #define SGH_PROFILING_RECORD(det_ctx, sgh)
357 
358 #define FLOWWORKER_PROFILING_START(p, id)
359 #define FLOWWORKER_PROFILING_END(p, id)
360 
361 #define PREFILTER_PROFILING_START(ctx)
362 #define PREFILTER_PROFILING_END(ctx, profile_id)
363 #define PREFILTER_PROFILING_ADD_BYTES(det_ctx, bytes)
364 
365 #endif /* PROFILING */
366 
367 #ifdef PROFILE_RULES
368 
369 extern int profiling_rules_enabled;
370 extern thread_local int profiling_rules_entered;
371 
372 #ifndef PROFILING
373 void SCProfilingInit(void);
374 #endif
375 /**
376  * Extra data for rule profiling.
377  */
378 typedef struct SCProfileData_ {
379  uint32_t sid;
380  uint32_t gid;
381  uint32_t rev;
382  uint64_t checks;
383  uint64_t matches;
384  uint64_t max;
385  uint64_t ticks_match;
386  uint64_t ticks_no_match;
387 } SCProfileData;
388 
389 typedef struct SCProfileDetectCtx_ {
390  uint32_t size;
391  uint32_t id;
392  SCProfileData *data;
393  pthread_mutex_t data_m;
394 } SCProfileDetectCtx;
395 
396 void SCProfilingRulesGlobalInit(void);
397 void SCProfilingRuleDestroyCtx(struct SCProfileDetectCtx_ *);
399 void SCProfilingRuleUpdateCounter(DetectEngineThreadCtx *, uint16_t, uint64_t, int);
400 void SCProfilingRuleThreadSetup(struct SCProfileDetectCtx_ *, DetectEngineThreadCtx *);
402 int SCProfileRuleStart(Packet *p);
403 json_t *SCProfileRuleTriggerDump(DetectEngineCtx *de_ctx);
405 void SCProfileRuleStopCollection(void);
406 void SCProfilingRuleThreatAggregate(DetectEngineThreadCtx *det_ctx);
407 
408 #define RULE_PROFILING_START(p) \
409  uint64_t profile_rule_start_ = 0; \
410  uint64_t profile_rule_end_ = 0; \
411  if (profiling_rules_enabled && SCProfileRuleStart((p))) { \
412  if (profiling_rules_entered > 0) { \
413  FatalError("Re-entered profiling, exiting."); \
414  } \
415  profiling_rules_entered++; \
416  profile_rule_start_ = UtilCpuGetTicks(); \
417  }
418 
419 #define RULE_PROFILING_END(ctx, r, m, p) \
420  if (profiling_rules_enabled && profiling_rules_entered) { \
421  profile_rule_end_ = UtilCpuGetTicks(); \
422  SCProfilingRuleUpdateCounter( \
423  ctx, r->profiling_id, profile_rule_end_ - profile_rule_start_, m); \
424  profiling_rules_entered--; \
425  BUG_ON(profiling_rules_entered < 0); \
426  }
427 
428 #else /* PROFILE_RULES */
429 
430 #define RULE_PROFILING_START(p)
431 #define RULE_PROFILING_END(a, b, c, p)
432 
433 #endif /* PROFILE_RULES */
434 
435 #endif /* ! SURICATA_UTIL_PROFILE_H */
SCProfilingRuleUpdateCounter
void SCProfilingRuleUpdateCounter(DetectEngineThreadCtx *, uint16_t, uint64_t, int)
SCProfilingSghDestroyCtx
void SCProfilingSghDestroyCtx(DetectEngineCtx *)
Definition: util-profiling-rulegroups.c:301
SCProfilingRegisterTests
void SCProfilingRegisterTests(void)
Definition: util-profiling.c:1402
SCProfilingInit
void SCProfilingInit(void)
Initialize profiling.
Definition: util-profiling.c:135
PktProfiling_
Per pkt stats storage.
Definition: decode.h:377
SigGroupHead_
Container for matching data for a signature group.
Definition: detect.h:1445
SCProfileSghDetectCtx_
Definition: util-profiling-rulegroups.c:51
SCProfileRuleStopCollection
void SCProfileRuleStopCollection(void)
Definition: util-profiling.c:1413
SCProfilingPrefilterGlobalInit
void SCProfilingPrefilterGlobalInit(void)
Definition: util-profiling-prefilter.c:60
profiling_prefilter_entered
thread_local int profiling_prefilter_entered
Definition: util-profiling-prefilter.c:56
SCProfilingRulesGlobalInit
void SCProfilingRulesGlobalInit(void)
DetectEngineCtx_
main detection engine ctx
Definition: detect.h:836
SCProfilePrefilterDetectCtx_
Definition: util-profiling-prefilter.c:47
SCProfilePacketStart
PktProfiling * SCProfilePacketStart(void)
Definition: util-profiling.c:1194
SCProfilingPrefilterThreadCleanup
void SCProfilingPrefilterThreadCleanup(DetectEngineThreadCtx *)
Definition: util-profiling-prefilter.c:278
SCProfileRuleStart
int SCProfileRuleStart(Packet *p)
Definition: util-profiling.c:1204
SCProfilingKeywordUpdateCounter
void SCProfilingKeywordUpdateCounter(DetectEngineThreadCtx *det_ctx, int id, uint64_t ticks, int match)
Update a rule counter.
Definition: util-profiling-keywords.c:213
profiling_packets_enabled
int profiling_packets_enabled
Definition: util-profiling.c:96
SCProfilingDump
void SCProfilingDump(void)
Definition: util-profiling.c:289
SCProfilingKeywordThreadSetup
void SCProfilingKeywordThreadSetup(struct SCProfileKeywordDetectCtx_ *, DetectEngineThreadCtx *)
Definition: util-profiling-keywords.c:281
de_ctx
DetectEngineCtx * de_ctx
Definition: fuzz_siginit.c:17
DetectEngineThreadCtx_
Definition: detect.h:1092
SCProfileRuleStartCollection
void SCProfileRuleStartCollection(void)
Definition: util-profiling.c:1409
util-cpu.h
SCProfilingKeywordInitCounters
void SCProfilingKeywordInitCounters(DetectEngineCtx *)
Register the keyword profiling counters.
Definition: util-profiling-keywords.c:362
SCProfileKeywordDetectCtx_
Definition: util-profiling-keywords.c:48
SCProfilingPrintPacketProfile
void SCProfilingPrintPacketProfile(Packet *)
Definition: util-profiling.c:776
detect.h
SCProfilingRuleDestroyCtx
void SCProfilingRuleDestroyCtx(struct SCProfileDetectCtx_ *)
profiling_keyword_entered
thread_local int profiling_keyword_entered
Definition: util-profiling-keywords.c:56
SCProfilingRuleThreadCleanup
void SCProfilingRuleThreadCleanup(DetectEngineThreadCtx *)
SCProfilingPrefilterUpdateCounter
void SCProfilingPrefilterUpdateCounter(DetectEngineThreadCtx *det_ctx, int id, uint64_t ticks, uint64_t bytes, uint64_t bytes_called)
Update a rule counter.
Definition: util-profiling-prefilter.c:191
profiling_keyword_enabled
int profiling_keyword_enabled
Definition: util-profiling-keywords.c:55
SCProfilingPrefilterInitCounters
void SCProfilingPrefilterInitCounters(DetectEngineCtx *)
Register the prefilter profiling counters.
Definition: util-profiling-prefilter.c:297
Packet_
Definition: decode.h:437
SCProfilingAddPacket
void SCProfilingAddPacket(Packet *)
Definition: util-profiling.c:1104
SCProfilingKeywordThreadCleanup
void SCProfilingKeywordThreadCleanup(DetectEngineThreadCtx *)
Definition: util-profiling-keywords.c:335
SCProfilingSghUpdateCounter
void SCProfilingSghUpdateCounter(DetectEngineThreadCtx *det_ctx, const SigGroupHead *sgh)
Update a rule counter.
Definition: util-profiling-rulegroups.c:258
SCProfilingSghsGlobalInit
void SCProfilingSghsGlobalInit(void)
Definition: util-profiling-rulegroups.c:63
profiling_sghs_enabled
int profiling_sghs_enabled
Definition: util-profiling-rulegroups.c:58
SCProfilingDestroy
void SCProfilingDestroy(void)
Free resources used by profiling.
Definition: util-profiling.c:263
SCProfilingKeywordDestroyCtx
void SCProfilingKeywordDestroyCtx(DetectEngineCtx *)
Definition: util-profiling-keywords.c:265
SCProfilingPrefilterDestroyCtx
void SCProfilingPrefilterDestroyCtx(DetectEngineCtx *)
Definition: util-profiling-prefilter.c:233
SCProfilingSghInitCounters
void SCProfilingSghInitCounters(DetectEngineCtx *)
Register the keyword profiling counters.
Definition: util-profiling-rulegroups.c:366
SCProfilingSghThreadSetup
void SCProfilingSghThreadSetup(struct SCProfileSghDetectCtx_ *, DetectEngineThreadCtx *)
Definition: util-profiling-rulegroups.c:310
SCProfilingSghThreadCleanup
void SCProfilingSghThreadCleanup(DetectEngineThreadCtx *)
Definition: util-profiling-rulegroups.c:347
SCProfilingKeywordsGlobalInit
void SCProfilingKeywordsGlobalInit(void)
Definition: util-profiling-keywords.c:60
profiling_rules_enabled
int profiling_rules_enabled
SCProfilingRuleInitCounters
void SCProfilingRuleInitCounters(DetectEngineCtx *)
util-profiling-locks.h
profiling_rules_entered
thread_local int profiling_rules_entered
Definition: util-profiling.c:112
SCProfilingPrefilterThreadSetup
void SCProfilingPrefilterThreadSetup(struct SCProfilePrefilterDetectCtx_ *, DetectEngineThreadCtx *)
Definition: util-profiling-prefilter.c:242
profiling_prefilter_enabled
int profiling_prefilter_enabled
Definition: util-profiling-prefilter.c:55
SCProfilingRuleThreadSetup
void SCProfilingRuleThreadSetup(struct SCProfileDetectCtx_ *, DetectEngineThreadCtx *)