suricata
|
#include "suricata-common.h"
#include "util-profiling.h"
#include "detect-engine-prefilter.h"
#include "util-conf.h"
#include "util-path.h"
#include "util-time.h"
Go to the source code of this file.
Data Structures | |
struct | SCProfilePrefilterData_ |
struct | SCProfilePrefilterDetectCtx_ |
Typedefs | |
typedef struct SCProfilePrefilterData_ | SCProfilePrefilterData |
typedef struct SCProfilePrefilterDetectCtx_ | SCProfilePrefilterDetectCtx |
Functions | |
void | SCProfilingPrefilterGlobalInit (void) |
void | SCProfilingPrefilterUpdateCounter (DetectEngineThreadCtx *det_ctx, int id, uint64_t ticks, uint64_t bytes, uint64_t bytes_called) |
Update a rule counter. More... | |
void | SCProfilingPrefilterDestroyCtx (DetectEngineCtx *de_ctx) |
void | SCProfilingPrefilterThreadSetup (SCProfilePrefilterDetectCtx *ctx, DetectEngineThreadCtx *det_ctx) |
void | SCProfilingPrefilterThreadCleanup (DetectEngineThreadCtx *det_ctx) |
void | SCProfilingPrefilterInitCounters (DetectEngineCtx *de_ctx) |
Register the prefilter profiling counters. More... | |
Variables | |
int | profiling_prefilter_enabled = 0 |
thread_local int | profiling_prefilter_entered = 0 |
An API for rule profiling operations.
Definition in file util-profiling-prefilter.c.
typedef struct SCProfilePrefilterData_ SCProfilePrefilterData |
typedef struct SCProfilePrefilterDetectCtx_ SCProfilePrefilterDetectCtx |
void SCProfilingPrefilterDestroyCtx | ( | DetectEngineCtx * | de_ctx | ) |
Definition at line 236 of file util-profiling-prefilter.c.
References de_ctx.
Referenced by DetectEngineCtxFree().
void SCProfilingPrefilterGlobalInit | ( | void | ) |
Definition at line 61 of file util-profiling-prefilter.c.
References ConfGetNode(), ConfNodeChildValueIsTrue(), ConfNodeLookupChildValue(), PathIsAbsolute(), profiling_prefilter_enabled, and strlcpy().
Referenced by PreRunInit().
void SCProfilingPrefilterInitCounters | ( | DetectEngineCtx * | de_ctx | ) |
Register the prefilter profiling counters.
de_ctx | The active DetectEngineCtx, used to get at the loaded rules. |
Definition at line 300 of file util-profiling-prefilter.c.
References de_ctx, DetectEngineCtx_::prefilter_id, DetectEngineCtx_::profile_prefilter_ctx, and profiling_prefilter_enabled.
void SCProfilingPrefilterThreadCleanup | ( | DetectEngineThreadCtx * | det_ctx | ) |
Definition at line 281 of file util-profiling-prefilter.c.
References SCProfilePrefilterDetectCtx_::data_m, DetectEngineThreadCtx_::de_ctx, DetectEngineThreadCtx_::prefilter_perf_data, and DetectEngineCtx_::profile_prefilter_ctx.
void SCProfilingPrefilterThreadSetup | ( | SCProfilePrefilterDetectCtx * | ctx, |
DetectEngineThreadCtx * | det_ctx | ||
) |
Definition at line 245 of file util-profiling-prefilter.c.
References ctx, DetectEngineThreadCtx_::de_ctx, DetectEngineCtx_::prefilter_id, DetectEngineThreadCtx_::prefilter_perf_data, and SCCalloc.
void SCProfilingPrefilterUpdateCounter | ( | DetectEngineThreadCtx * | det_ctx, |
int | id, | ||
uint64_t | ticks, | ||
uint64_t | bytes, | ||
uint64_t | bytes_called | ||
) |
Update a rule counter.
id | The ID of this counter. |
ticks | Number of CPU ticks for this rule. |
match | Did the rule match? |
Definition at line 194 of file util-profiling-prefilter.c.
References SCProfilePrefilterData_::bytes_called, SCProfilePrefilterData_::called, DetectEngineThreadCtx_::de_ctx, SCProfilePrefilterData_::max, SCProfilePrefilterData_::max_bytes, DetectEngineCtx_::prefilter_id, DetectEngineThreadCtx_::prefilter_perf_data, SCProfilePrefilterData_::total, and SCProfilePrefilterData_::total_bytes.
int profiling_prefilter_enabled = 0 |
Definition at line 56 of file util-profiling-prefilter.c.
Referenced by SCProfilingPrefilterGlobalInit(), and SCProfilingPrefilterInitCounters().
thread_local int profiling_prefilter_entered = 0 |
Definition at line 57 of file util-profiling-prefilter.c.