suricata
util-profiling-keywords.c File Reference
#include "suricata-common.h"
#include "util-profiling.h"
#include "util-profiling-locks.h"
#include "detect-engine.h"
#include "tm-threads.h"
#include "util-conf.h"
#include "util-path.h"
#include "util-time.h"
Include dependency graph for util-profiling-keywords.c:

Go to the source code of this file.

Data Structures

struct  SCProfileKeywordData_
 
struct  SCProfileKeywordDetectCtx_
 

Typedefs

typedef struct SCProfileKeywordData_ SCProfileKeywordData
 
typedef struct SCProfileKeywordDetectCtx_ SCProfileKeywordDetectCtx
 

Functions

void SCProfilingKeywordsGlobalInit (void)
 
void SCProfilingKeywordUpdateCounter (DetectEngineThreadCtx *det_ctx, int id, uint64_t ticks, int match)
 Update a rule counter. More...
 
void SCProfilingKeywordDestroyCtx (DetectEngineCtx *de_ctx)
 
void SCProfilingKeywordThreadSetup (SCProfileKeywordDetectCtx *ctx, DetectEngineThreadCtx *det_ctx)
 
void SCProfilingKeywordThreadCleanup (DetectEngineThreadCtx *det_ctx)
 
void SCProfilingKeywordInitCounters (DetectEngineCtx *de_ctx)
 Register the keyword profiling counters. More...
 

Variables

int profiling_keyword_enabled = 0
 
thread_local int profiling_keyword_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-keywords.c.

Typedef Documentation

◆ SCProfileKeywordData

Extra data for rule profiling.

◆ SCProfileKeywordDetectCtx

Function Documentation

◆ SCProfilingKeywordDestroyCtx()

void SCProfilingKeywordDestroyCtx ( DetectEngineCtx de_ctx)

Definition at line 268 of file util-profiling-keywords.c.

References de_ctx.

Referenced by DetectEngineCtxFree().

Here is the caller graph for this function:

◆ SCProfilingKeywordInitCounters()

void SCProfilingKeywordInitCounters ( DetectEngineCtx de_ctx)

Register the keyword profiling counters.

Parameters
de_ctxThe active DetectEngineCtx, used to get at the loaded rules.

Definition at line 365 of file util-profiling-keywords.c.

References DetectEngineCtx_::buffer_type_id, de_ctx, DetectEngineCtx_::profile_keyword_ctx, and profiling_keyword_enabled.

◆ SCProfilingKeywordsGlobalInit()

void SCProfilingKeywordsGlobalInit ( void  )

Definition at line 61 of file util-profiling-keywords.c.

References ConfGetNode(), ConfNodeChildValueIsTrue(), ConfNodeLookupChildValue(), PathIsAbsolute(), profiling_keyword_enabled, and strlcpy().

Referenced by PreRunInit().

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

◆ SCProfilingKeywordThreadCleanup()

◆ SCProfilingKeywordThreadSetup()

◆ SCProfilingKeywordUpdateCounter()

void SCProfilingKeywordUpdateCounter ( DetectEngineThreadCtx det_ctx,
int  id,
uint64_t  ticks,
int  match 
)

Variable Documentation

◆ profiling_keyword_enabled

int profiling_keyword_enabled = 0

◆ profiling_keyword_entered

thread_local int profiling_keyword_entered = 0

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