suricata
|
Go to the source code of this file.
Variables | |
int | profiling_rules_enabled |
int | profiling_packets_enabled |
int | profiling_sghs_enabled |
thread_local int | profiling_rules_entered |
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 175 of file util-profiling.h.
#define FLOWWORKER_PROFILING_START | ( | p, | |
id | |||
) |
Definition at line 168 of file util-profiling.h.
Definition at line 85 of file util-profiling.h.
#define KEYWORD_PROFILING_SET_LIST | ( | ctx, | |
list | |||
) |
Definition at line 67 of file util-profiling.h.
#define KEYWORD_PROFILING_START |
Definition at line 71 of file util-profiling.h.
#define PACKET_PROFILING_APP_END | ( | dp, | |
id | |||
) |
Definition at line 194 of file util-profiling.h.
#define PACKET_PROFILING_APP_PD_END | ( | dp | ) |
Definition at line 208 of file util-profiling.h.
#define PACKET_PROFILING_APP_PD_START | ( | dp | ) |
Definition at line 203 of file util-profiling.h.
#define PACKET_PROFILING_APP_RESET | ( | dp | ) |
Definition at line 217 of file util-profiling.h.
#define PACKET_PROFILING_APP_START | ( | dp, | |
id | |||
) |
Definition at line 188 of file util-profiling.h.
#define PACKET_PROFILING_APP_STORE | ( | dp, | |
p | |||
) |
Definition at line 228 of file util-profiling.h.
#define PACKET_PROFILING_COPY_LOCKS | ( | p, | |
id | |||
) |
Definition at line 149 of file util-profiling.h.
#define PACKET_PROFILING_DETECT_END | ( | p, | |
id | |||
) |
Definition at line 243 of file util-profiling.h.
#define PACKET_PROFILING_DETECT_START | ( | p, | |
id | |||
) |
Definition at line 236 of file util-profiling.h.
#define PACKET_PROFILING_END | ( | p | ) |
Definition at line 107 of file util-profiling.h.
#define PACKET_PROFILING_LOGGER_END | ( | p, | |
id | |||
) |
Definition at line 262 of file util-profiling.h.
#define PACKET_PROFILING_LOGGER_START | ( | p, | |
id | |||
) |
Definition at line 255 of file util-profiling.h.
#define PACKET_PROFILING_RESET | ( | p | ) |
Definition at line 182 of file util-profiling.h.
#define PACKET_PROFILING_RESET_LOCKS |
Definition at line 148 of file util-profiling.h.
#define PACKET_PROFILING_RESTART | ( | p | ) |
Definition at line 101 of file util-profiling.h.
#define PACKET_PROFILING_START | ( | p | ) |
Definition at line 94 of file util-profiling.h.
#define PACKET_PROFILING_TMM_END | ( | p, | |
id | |||
) |
Definition at line 160 of file util-profiling.h.
#define PACKET_PROFILING_TMM_START | ( | p, | |
id | |||
) |
Definition at line 152 of file util-profiling.h.
#define PREFILTER_PROFILING_ADD_BYTES | ( | det_ctx, | |
bytes | |||
) |
Definition at line 308 of file util-profiling.h.
#define PREFILTER_PROFILING_END | ( | ctx, | |
profile_id | |||
) |
Definition at line 298 of file util-profiling.h.
#define PREFILTER_PROFILING_START | ( | det_ctx | ) |
Definition at line 282 of file util-profiling.h.
#define RULE_PROFILING_END | ( | ctx, | |
r, | |||
m, | |||
p | |||
) |
Definition at line 56 of file util-profiling.h.
#define RULE_PROFILING_START | ( | p | ) |
Definition at line 44 of file util-profiling.h.
#define SGH_PROFILING_RECORD | ( | det_ctx, | |
sgh | |||
) |
Definition at line 274 of file util-profiling.h.
PktProfiling* SCProfilePacketStart | ( | void | ) |
Definition at line 1188 of file util-profiling.c.
References SC_ATOMIC_ADD.
int SCProfileRuleStart | ( | Packet * | p | ) |
Definition at line 1198 of file util-profiling.c.
References Packet_::flags, PKT_PROFILE, Packet_::profile, and SC_ATOMIC_ADD.
void SCProfilingAddPacket | ( | Packet * | ) |
Definition at line 1098 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 263 of file util-profiling.c.
References profiling_packets_enabled.
void SCProfilingDump | ( | void | ) |
Definition at line 289 of file util-profiling.c.
References SCLogPerf, and SCProfilingDumpPacketStats().
void SCProfilingInit | ( | void | ) |
Initialize profiling.
Definition at line 135 of file util-profiling.c.
References ConfGetInt(), and SC_ATOMIC_INIT.
Referenced by PreRunInit().
void SCProfilingKeywordDestroyCtx | ( | DetectEngineCtx * | ) |
Definition at line 266 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 366 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 60 of file util-profiling-keywords.c.
References ConfGetNode(), ConfigGetLogDirectory(), ConfNodeChildValueIsTrue(), ConfNodeLookupChildValue(), and profiling_keyword_enabled.
Referenced by PreRunInit().
void SCProfilingKeywordThreadCleanup | ( | DetectEngineThreadCtx * | ) |
Definition at line 339 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 282 of file util-profiling-keywords.c.
References DetectEngineCtx_::buffer_type_id, BUG_ON, DetectEngineThreadCtx_::de_ctx, DETECT_TBLSIZE, DetectEngineThreadCtx_::keyword_perf_data, DetectEngineThreadCtx_::keyword_perf_data_per_list, SCCalloc, and SCMalloc.
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 213 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 235 of file util-profiling-prefilter.c.
References de_ctx.
Referenced by DetectEngineCtxFree().
void SCProfilingPrefilterGlobalInit | ( | void | ) |
Definition at line 60 of file util-profiling-prefilter.c.
References ConfGetNode(), ConfigGetLogDirectory(), ConfNodeChildValueIsTrue(), ConfNodeLookupChildValue(), and profiling_prefilter_enabled.
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 244 of file util-profiling-prefilter.c.
References DetectEngineThreadCtx_::de_ctx, DetectEngineCtx_::prefilter_id, DetectEngineThreadCtx_::prefilter_perf_data, and SCMalloc.
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 191 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 770 of file util-profiling.c.
void SCProfilingRegisterTests | ( | void | ) |
Definition at line 1395 of file util-profiling.c.
References UtRegisterTest().
void SCProfilingRuleDestroyCtx | ( | struct SCProfileDetectCtx_ * | ) |
Definition at line 579 of file util-profiling-rules.c.
Referenced by DetectEngineCtxFree().
void SCProfilingRuleInitCounters | ( | DetectEngineCtx * | de_ctx | ) |
Register the rule profiling counters.
de_ctx | The active DetectEngineCtx, used to get at the loaded rules. |
Definition at line 641 of file util-profiling-rules.c.
References de_ctx, DetectEngineCtx_::profile_ctx, and profiling_rules_enabled.
void SCProfilingRulesGlobalInit | ( | void | ) |
Definition at line 108 of file util-profiling-rules.c.
References ConfGetNode(), ConfNodeChildValueIsTrue(), ConfNodeLookupChildValue(), profiling_rules_enabled, SC_PROFILING_RULES_SORT_BY_AVG_TICKS, SC_PROFILING_RULES_SORT_BY_AVG_TICKS_MATCH, SC_PROFILING_RULES_SORT_BY_AVG_TICKS_NO_MATCH, SC_PROFILING_RULES_SORT_BY_CHECKS, SC_PROFILING_RULES_SORT_BY_MATCHES, SC_PROFILING_RULES_SORT_BY_MAX_TICKS, SC_PROFILING_RULES_SORT_BY_TICKS, SCLogError, SET_ONE, and StringParseUint32().
Referenced by PreRunInit().
void SCProfilingRuleThreadCleanup | ( | DetectEngineThreadCtx * | ) |
Definition at line 621 of file util-profiling-rules.c.
References SCProfileDetectCtx_::data_m, DetectEngineThreadCtx_::de_ctx, DetectEngineCtx_::profile_ctx, and DetectEngineThreadCtx_::rule_perf_data.
void SCProfilingRuleThreadSetup | ( | struct SCProfileDetectCtx_ * | , |
DetectEngineThreadCtx * | |||
) |
Definition at line 590 of file util-profiling-rules.c.
References DetectEngineThreadCtx_::rule_perf_data, DetectEngineThreadCtx_::rule_perf_data_size, SCMalloc, and SCProfileDetectCtx_::size.
void SCProfilingRuleUpdateCounter | ( | DetectEngineThreadCtx * | det_ctx, |
uint16_t | 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 549 of file util-profiling-rules.c.
References SCProfileData_::checks, SCProfileData_::matches, SCProfileData_::max, DetectEngineThreadCtx_::rule_perf_data, DetectEngineThreadCtx_::rule_perf_data_size, SCProfileData_::ticks_match, and SCProfileData_::ticks_no_match.
void SCProfilingSghDestroyCtx | ( | DetectEngineCtx * | ) |
Definition at line 301 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 366 of file util-profiling-rulegroups.c.
References de_ctx, DetectEngineCtx_::profile_sgh_ctx, and profiling_sghs_enabled.
void SCProfilingSghsGlobalInit | ( | void | ) |
Definition at line 63 of file util-profiling-rulegroups.c.
References ConfGetNode(), ConfigGetLogDirectory(), ConfNodeChildValueIsTrue(), ConfNodeLookupChildValue(), and profiling_sghs_enabled.
Referenced by PreRunInit().
void SCProfilingSghThreadCleanup | ( | DetectEngineThreadCtx * | ) |
Definition at line 347 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 310 of file util-profiling-rulegroups.c.
References 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 258 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 55 of file util-profiling-keywords.c.
Referenced by SCProfilingKeywordInitCounters(), and SCProfilingKeywordsGlobalInit().
thread_local int profiling_keyword_entered |
Definition at line 56 of file util-profiling-keywords.c.
int profiling_packets_enabled |
Definition at line 96 of file util-profiling.c.
Referenced by SCProfilingDestroy(), and SCProfilingDumpPacketStats().
int profiling_prefilter_enabled |
Definition at line 55 of file util-profiling-prefilter.c.
Referenced by SCProfilingPrefilterGlobalInit(), and SCProfilingPrefilterInitCounters().
thread_local int profiling_prefilter_entered |
Definition at line 56 of file util-profiling-prefilter.c.
int profiling_rules_enabled |
Definition at line 75 of file util-profiling-rules.c.
Referenced by SCProfilingRuleInitCounters(), and SCProfilingRulesGlobalInit().
thread_local int profiling_rules_entered |
Used as a check so we don't double enter a profiling run.
Definition at line 112 of file util-profiling.c.
int profiling_sghs_enabled |
Definition at line 58 of file util-profiling-rulegroups.c.
Referenced by SCProfilingSghInitCounters(), and SCProfilingSghsGlobalInit().