suricata
util-profiling-prefilter.c File Reference
#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"
Include dependency graph for util-profiling-prefilter.c:

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
 

Detailed Description

Author
Endace Technology Limited.
Victor Julien victo.nosp@m.r@in.nosp@m.linia.nosp@m.c.ne.nosp@m.t

An API for rule profiling operations.

Definition in file util-profiling-prefilter.c.

Typedef Documentation

◆ SCProfilePrefilterData

◆ SCProfilePrefilterDetectCtx

Function Documentation

◆ SCProfilingPrefilterDestroyCtx()

void SCProfilingPrefilterDestroyCtx ( DetectEngineCtx de_ctx)

Definition at line 236 of file util-profiling-prefilter.c.

References de_ctx.

Referenced by DetectEngineCtxFree().

Here is the caller graph for this function:

◆ SCProfilingPrefilterGlobalInit()

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().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ SCProfilingPrefilterInitCounters()

void SCProfilingPrefilterInitCounters ( DetectEngineCtx de_ctx)

Register the prefilter profiling counters.

Parameters
de_ctxThe 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.

◆ SCProfilingPrefilterThreadCleanup()

◆ SCProfilingPrefilterThreadSetup()

◆ SCProfilingPrefilterUpdateCounter()

void SCProfilingPrefilterUpdateCounter ( DetectEngineThreadCtx det_ctx,
int  id,
uint64_t  ticks,
uint64_t  bytes,
uint64_t  bytes_called 
)

Variable Documentation

◆ profiling_prefilter_enabled

int profiling_prefilter_enabled = 0

◆ profiling_prefilter_entered

thread_local int profiling_prefilter_entered = 0

Definition at line 57 of file util-profiling-prefilter.c.