suricata
|
Go to the source code of this file.
Variables | |
int | profiling_rules_enabled |
int | profiling_packets_enabled |
int | profiling_sghs_enabled |
int | profiling_keyword_enabled |
thread_local int | profiling_keyword_entered |
int | profiling_prefilter_enabled |
thread_local int | profiling_prefilter_entered |
Definition in file util-profiling.h.
#define FLOWWORKER_PROFILING_END | ( | p, | |
id | |||
) |
Definition at line 155 of file util-profiling.h.
#define FLOWWORKER_PROFILING_START | ( | p, | |
id | |||
) |
Definition at line 148 of file util-profiling.h.
Definition at line 65 of file util-profiling.h.
#define KEYWORD_PROFILING_SET_LIST | ( | ctx, | |
list | |||
) |
Definition at line 47 of file util-profiling.h.
#define KEYWORD_PROFILING_START |
Definition at line 51 of file util-profiling.h.
#define PACKET_PROFILING_APP_END | ( | dp | ) |
Definition at line 174 of file util-profiling.h.
#define PACKET_PROFILING_APP_PD_END | ( | dp | ) |
Definition at line 187 of file util-profiling.h.
#define PACKET_PROFILING_APP_PD_START | ( | dp | ) |
Definition at line 182 of file util-profiling.h.
#define PACKET_PROFILING_APP_RESET | ( | dp | ) |
Definition at line 196 of file util-profiling.h.
#define PACKET_PROFILING_APP_START | ( | dp, | |
id | |||
) |
Definition at line 168 of file util-profiling.h.
#define PACKET_PROFILING_APP_STORE | ( | dp, | |
p | |||
) |
Definition at line 207 of file util-profiling.h.
#define PACKET_PROFILING_COPY_LOCKS | ( | p, | |
id | |||
) |
Definition at line 129 of file util-profiling.h.
#define PACKET_PROFILING_DETECT_END | ( | p, | |
id | |||
) |
Definition at line 222 of file util-profiling.h.
#define PACKET_PROFILING_DETECT_START | ( | p, | |
id | |||
) |
Definition at line 215 of file util-profiling.h.
#define PACKET_PROFILING_END | ( | p | ) |
Definition at line 87 of file util-profiling.h.
#define PACKET_PROFILING_LOGGER_END | ( | p, | |
id | |||
) |
Definition at line 241 of file util-profiling.h.
#define PACKET_PROFILING_LOGGER_START | ( | p, | |
id | |||
) |
Definition at line 234 of file util-profiling.h.
#define PACKET_PROFILING_RESET | ( | p | ) |
Definition at line 162 of file util-profiling.h.
#define PACKET_PROFILING_RESET_LOCKS |
Definition at line 128 of file util-profiling.h.
#define PACKET_PROFILING_RESTART | ( | p | ) |
Definition at line 81 of file util-profiling.h.
#define PACKET_PROFILING_START | ( | p | ) |
Definition at line 74 of file util-profiling.h.
#define PACKET_PROFILING_TMM_END | ( | p, | |
id | |||
) |
Definition at line 140 of file util-profiling.h.
#define PACKET_PROFILING_TMM_START | ( | p, | |
id | |||
) |
Definition at line 132 of file util-profiling.h.
#define PREFILTER_PROFILING_ADD_BYTES | ( | det_ctx, | |
bytes | |||
) |
Definition at line 287 of file util-profiling.h.
#define PREFILTER_PROFILING_END | ( | ctx, | |
profile_id | |||
) |
Definition at line 277 of file util-profiling.h.
#define PREFILTER_PROFILING_START | ( | det_ctx | ) |
Definition at line 261 of file util-profiling.h.
#define RULE_PROFILING_END | ( | a, | |
b, | |||
c, | |||
p | |||
) |
Definition at line 423 of file util-profiling.h.
#define RULE_PROFILING_START | ( | p | ) |
Definition at line 422 of file util-profiling.h.
#define SGH_PROFILING_RECORD | ( | det_ctx, | |
sgh | |||
) |
Definition at line 253 of file util-profiling.h.
PktProfiling* SCProfilePacketStart | ( | void | ) |
Definition at line 1183 of file util-profiling.c.
References SC_ATOMIC_ADD.
void SCProfilingAddPacket | ( | Packet * | ) |
Definition at line 1093 of file util-profiling.c.
References Packet_::profile, PktProfiling_::ticks_end, and PktProfiling_::ticks_start.
void SCProfilingDestroy | ( | void | ) |
Free resources used by profiling.
Definition at line 270 of file util-profiling.c.
References profiling_packets_enabled.
void SCProfilingDump | ( | void | ) |
Definition at line 296 of file util-profiling.c.
References SCLogPerf, and SCProfilingDumpPacketStats().
void SCProfilingInit | ( | void | ) |
Initialize profiling.
Definition at line 133 of file util-profiling.c.
References ConfGetInt(), and SC_ATOMIC_INIT.
Referenced by PreRunInit().
void SCProfilingKeywordDestroyCtx | ( | DetectEngineCtx * | ) |
Definition at line 268 of file util-profiling-keywords.c.
References de_ctx.
Referenced by DetectEngineCtxFree().
void SCProfilingKeywordInitCounters | ( | DetectEngineCtx * | de_ctx | ) |
Register the keyword profiling counters.
de_ctx | The 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.
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().
void SCProfilingKeywordThreadCleanup | ( | DetectEngineThreadCtx * | ) |
Definition at line 338 of file util-profiling-keywords.c.
References SCProfileKeywordDetectCtx_::data_m, DetectEngineThreadCtx_::de_ctx, DetectEngineThreadCtx_::keyword_perf_data, and DetectEngineCtx_::profile_keyword_ctx.
void SCProfilingKeywordThreadSetup | ( | struct SCProfileKeywordDetectCtx_ * | , |
DetectEngineThreadCtx * | |||
) |
Definition at line 284 of file util-profiling-keywords.c.
References DetectEngineCtx_::buffer_type_id, BUG_ON, ctx, DetectEngineThreadCtx_::de_ctx, DETECT_TBLSIZE, DetectEngineThreadCtx_::keyword_perf_data, DetectEngineThreadCtx_::keyword_perf_data_per_list, and SCCalloc.
void SCProfilingKeywordUpdateCounter | ( | DetectEngineThreadCtx * | det_ctx, |
int | id, | ||
uint64_t | ticks, | ||
int | match | ||
) |
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 216 of file util-profiling-keywords.c.
References SCProfileKeywordData_::checks, DETECT_TBLSIZE, DetectEngineThreadCtx_::keyword_perf_data, DetectEngineThreadCtx_::keyword_perf_data_per_list, DetectEngineThreadCtx_::keyword_perf_list, SCProfileKeywordData_::matches, SCProfileKeywordData_::max, SCProfileKeywordData_::ticks_match, and SCProfileKeywordData_::ticks_no_match.
void SCProfilingPrefilterDestroyCtx | ( | DetectEngineCtx * | ) |
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 * | ) |
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 | ( | struct SCProfilePrefilterDetectCtx_ * | , |
DetectEngineThreadCtx * | |||
) |
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.
void SCProfilingPrintPacketProfile | ( | Packet * | ) |
Definition at line 765 of file util-profiling.c.
void SCProfilingRegisterTests | ( | void | ) |
Definition at line 1393 of file util-profiling.c.
References UtRegisterTest().
void SCProfilingSghDestroyCtx | ( | DetectEngineCtx * | ) |
Definition at line 304 of file util-profiling-rulegroups.c.
References de_ctx.
Referenced by DetectEngineCtxFree().
void SCProfilingSghInitCounters | ( | DetectEngineCtx * | de_ctx | ) |
Register the keyword profiling counters.
de_ctx | The active DetectEngineCtx, used to get at the loaded rules. |
Definition at line 369 of file util-profiling-rulegroups.c.
References de_ctx, DetectEngineCtx_::profile_sgh_ctx, and profiling_sghs_enabled.
void SCProfilingSghsGlobalInit | ( | void | ) |
Definition at line 64 of file util-profiling-rulegroups.c.
References ConfGetNode(), ConfNodeChildValueIsTrue(), ConfNodeLookupChildValue(), PathIsAbsolute(), profiling_sghs_enabled, and strlcpy().
Referenced by PreRunInit().
void SCProfilingSghThreadCleanup | ( | DetectEngineThreadCtx * | ) |
Definition at line 350 of file util-profiling-rulegroups.c.
References SCProfileSghDetectCtx_::data_m, DetectEngineThreadCtx_::de_ctx, DetectEngineCtx_::profile_sgh_ctx, and DetectEngineThreadCtx_::sgh_perf_data.
void SCProfilingSghThreadSetup | ( | struct SCProfileSghDetectCtx_ * | , |
DetectEngineThreadCtx * | |||
) |
Definition at line 313 of file util-profiling-rulegroups.c.
References ctx, DetectEngineThreadCtx_::de_ctx, SCCalloc, DetectEngineCtx_::sgh_array_cnt, and DetectEngineThreadCtx_::sgh_perf_data.
void SCProfilingSghUpdateCounter | ( | DetectEngineThreadCtx * | det_ctx, |
const SigGroupHead * | sgh | ||
) |
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 261 of file util-profiling-rulegroups.c.
References SCProfileSghData_::checks, DetectEngineThreadCtx_::de_ctx, SigGroupHead_::id, DetectEngineThreadCtx_::match_array_cnt, SCProfileSghData_::mpm_match_cnt_max, SCProfileSghData_::mpm_match_cnt_total, SCProfileSghData_::non_mpm_generic, SCProfileSghData_::non_mpm_syn, DetectEngineThreadCtx_::non_pf_store_cnt, DetectEngineThreadCtx_::non_pf_store_ptr, SigGroupHead_::non_pf_syn_store_array, DetectEngineThreadCtx_::pmq, SCProfileSghData_::post_prefilter_sigs_max, SCProfileSghData_::post_prefilter_sigs_total, PrefilterRuleStore_::rule_id_array_cnt, DetectEngineCtx_::sgh_array_cnt, and DetectEngineThreadCtx_::sgh_perf_data.
int profiling_keyword_enabled |
Definition at line 56 of file util-profiling-keywords.c.
Referenced by SCProfilingKeywordInitCounters(), and SCProfilingKeywordsGlobalInit().
thread_local int profiling_keyword_entered |
Definition at line 57 of file util-profiling-keywords.c.
int profiling_packets_enabled |
Definition at line 94 of file util-profiling.c.
Referenced by SCProfilingDestroy(), and SCProfilingDumpPacketStats().
int profiling_prefilter_enabled |
Definition at line 56 of file util-profiling-prefilter.c.
Referenced by SCProfilingPrefilterGlobalInit(), and SCProfilingPrefilterInitCounters().
thread_local int profiling_prefilter_entered |
Definition at line 57 of file util-profiling-prefilter.c.
int profiling_rules_enabled |
int profiling_sghs_enabled |
Definition at line 59 of file util-profiling-rulegroups.c.
Referenced by SCProfilingSghInitCounters(), and SCProfilingSghsGlobalInit().