suricata
|
Go to the source code of this file.
Variables | |
int | profiling_rules_enabled |
int | profiling_packets_enabled |
int | profiling_sghs_enabled |
__thread int | profiling_rules_entered |
int | profiling_keyword_enabled |
__thread int | profiling_keyword_entered |
int | profiling_prefilter_enabled |
__thread int | profiling_prefilter_entered |
Definition in file util-profiling.h.
#define FLOWWORKER_PROFILING_END | ( | p, | |
id | |||
) |
Definition at line 173 of file util-profiling.h.
#define FLOWWORKER_PROFILING_START | ( | p, | |
id | |||
) |
Definition at line 166 of file util-profiling.h.
Definition at line 83 of file util-profiling.h.
Referenced by DetectAppLayerEventRegister(), DetectBufferTypeGetByIdTransforms(), DetectEngineContentInspection(), DetectEngineInspectGenericList(), DetectEngineIPOnlyThreadDeinit(), IPOnlyMatchPacket(), PacketAlertFinalize(), and PacketAlertGetTag().
#define KEYWORD_PROFILING_SET_LIST | ( | ctx, | |
list | |||
) |
Definition at line 65 of file util-profiling.h.
Referenced by DetectBufferTypeGetByIdTransforms(), DetectEngineIPOnlyThreadDeinit(), IPOnlyMatchPacket(), PacketAlertFinalize(), and PacketAlertGetTag().
#define KEYWORD_PROFILING_START |
Definition at line 69 of file util-profiling.h.
Referenced by DetectAppLayerEventRegister(), DetectBufferTypeGetByIdTransforms(), DetectEngineContentInspection(), DetectEngineInspectGenericList(), DetectEngineIPOnlyThreadDeinit(), IPOnlyMatchPacket(), PacketAlertFinalize(), and PacketAlertGetTag().
#define PACKET_PROFILING_APP_END | ( | dp, | |
id | |||
) |
Definition at line 192 of file util-profiling.h.
Referenced by AppLayerHandleTCPData(), AppLayerHandleUdp(), and AppLayerIncTxCounter().
#define PACKET_PROFILING_APP_PD_END | ( | dp | ) |
Definition at line 206 of file util-profiling.h.
Referenced by AppLayerHandleUdp(), and AppLayerIncTxCounter().
#define PACKET_PROFILING_APP_PD_START | ( | dp | ) |
Definition at line 201 of file util-profiling.h.
Referenced by AppLayerHandleUdp(), and AppLayerIncTxCounter().
#define PACKET_PROFILING_APP_RESET | ( | dp | ) |
Definition at line 215 of file util-profiling.h.
Referenced by AppLayerProfilingResetInternal().
#define PACKET_PROFILING_APP_START | ( | dp, | |
id | |||
) |
Definition at line 186 of file util-profiling.h.
Referenced by AppLayerHandleTCPData(), AppLayerHandleUdp(), and AppLayerIncTxCounter().
#define PACKET_PROFILING_APP_STORE | ( | dp, | |
p | |||
) |
Definition at line 226 of file util-profiling.h.
Referenced by AppLayerHandleUdp(), and AppLayerProfilingStoreInternal().
#define PACKET_PROFILING_COPY_LOCKS | ( | p, | |
id | |||
) |
Definition at line 147 of file util-profiling.h.
#define PACKET_PROFILING_DETECT_END | ( | p, | |
id | |||
) |
Definition at line 241 of file util-profiling.h.
Referenced by DetectRunPrefilterTx(), Prefilter(), and SigMatchSignaturesGetSgh().
#define PACKET_PROFILING_DETECT_START | ( | p, | |
id | |||
) |
Definition at line 234 of file util-profiling.h.
Referenced by DetectRunPrefilterTx(), Prefilter(), and SigMatchSignaturesGetSgh().
#define PACKET_PROFILING_END | ( | p | ) |
Definition at line 105 of file util-profiling.h.
Referenced by TmqhOutputPacketpool().
#define PACKET_PROFILING_LOGGER_END | ( | p, | |
id | |||
) |
Definition at line 260 of file util-profiling.h.
Referenced by OutputRegisterFiledataLogger(), OutputRegisterFileLogger(), OutputRegisterPacketLogger(), and OutputRegisterTxLogger().
#define PACKET_PROFILING_LOGGER_START | ( | p, | |
id | |||
) |
Definition at line 253 of file util-profiling.h.
Referenced by OutputRegisterFiledataLogger(), OutputRegisterFileLogger(), OutputRegisterPacketLogger(), and OutputRegisterTxLogger().
#define PACKET_PROFILING_RESET | ( | p | ) |
Definition at line 180 of file util-profiling.h.
#define PACKET_PROFILING_RESET_LOCKS |
Definition at line 146 of file util-profiling.h.
#define PACKET_PROFILING_RESTART | ( | p | ) |
Definition at line 99 of file util-profiling.h.
Referenced by ReceivePfringLoop().
#define PACKET_PROFILING_START | ( | p | ) |
Definition at line 92 of file util-profiling.h.
Referenced by PacketGetFromAlloc(), and PacketGetFromQueueOrAlloc().
#define PACKET_PROFILING_TMM_END | ( | p, | |
id | |||
) |
Definition at line 158 of file util-profiling.h.
Referenced by CleanupPcapFileFileVars(), and TmThreadsSlotVarRun().
#define PACKET_PROFILING_TMM_START | ( | p, | |
id | |||
) |
Definition at line 150 of file util-profiling.h.
Referenced by CleanupPcapFileFileVars(), and TmThreadsSlotVarRun().
#define PREFILTER_PROFILING_END | ( | ctx, | |
profile_id | |||
) |
Definition at line 294 of file util-profiling.h.
Referenced by DetectRunPrefilterTx(), and Prefilter().
#define PREFILTER_PROFILING_START |
Definition at line 280 of file util-profiling.h.
Referenced by DetectRunPrefilterTx(), and Prefilter().
#define RULE_PROFILING_END | ( | ctx, | |
r, | |||
m, | |||
p | |||
) |
Definition at line 54 of file util-profiling.h.
Referenced by SigMatchSignaturesGetSgh().
#define RULE_PROFILING_START | ( | p | ) |
Definition at line 42 of file util-profiling.h.
Referenced by SigMatchSignaturesGetSgh().
#define SGH_PROFILING_RECORD | ( | det_ctx, | |
sgh | |||
) |
Definition at line 272 of file util-profiling.h.
Referenced by SigMatchSignaturesGetSgh().
PktProfiling* SCProfilePacketStart | ( | void | ) |
Definition at line 1225 of file util-profiling.c.
References SC_ATOMIC_ADD, and SCCalloc.
int SCProfileRuleStart | ( | Packet * | p | ) |
Definition at line 1235 of file util-profiling.c.
References Packet_::flags, PKT_PROFILE, Packet_::profile, and SC_ATOMIC_ADD.
void SCProfilingAddPacket | ( | Packet * | ) |
Definition at line 1135 of file util-profiling.c.
References SCProfilePacketData_::cnt, PktProfiling_::flowworker, IS_TUNNEL_PKT, SCProfilePacketData_::max, SCProfilePacketData_::min, packet_profile_flowworker_data, PKT_IS_IPV4, PKT_IS_IPV6, Packet_::profile, PROFILE_FLOWWORKER_SIZE, Packet_::proto, SCProfilingPrintPacketProfile(), PktProfiling_::ticks_end, PktProfiling_::ticks_start, and SCProfilePacketData_::tot.
void SCProfilingDestroy | ( | void | ) |
Free resources used by profiling.
Definition at line 271 of file util-profiling.c.
References LockRecordFreeHash(), profiling_packets_enabled, and SCFree.
Referenced by PostRunDeinit().
void SCProfilingDump | ( | void | ) |
Definition at line 297 of file util-profiling.c.
References SCProfilePacketData_::cnt, SCProfilePacketData_::max, SCProfilePacketData_::min, packet_profile_flowworker_data, PROFILE_FLOWWORKER_SIZE, PROFILE_FLOWWORKER_STREAM, ProfileFlowWorkerIdToString(), ProfileProtoRecords::records4, ProfileProtoRecords::records6, SCLogPerf, SCProfilingDumpPacketStats(), and SCProfilePacketData_::tot.
Referenced by PostRunDeinit().
void SCProfilingInit | ( | void | ) |
Initialize profiling.
Definition at line 140 of file util-profiling.c.
References ConfGetInt(), ConfGetNode(), ConfigGetLogDirectory(), ConfNodeChildValueIsTrue(), ConfNodeLookupChildValue(), ConfValIsTrue(), LockRecordInitHash(), packet_profile_flowworker_data, profiling_locks_enabled, profiling_locks_file_mode, profiling_locks_file_name, profiling_locks_output_to_file, profiling_packets_enabled, SC_ATOMIC_INIT, SC_ERR_MEM_ALLOC, SC_ERR_MUTEX, SC_WARN_PROFILE, SCFree, SCLogError, SCLogInfo, SCLogWarning, SCMalloc, and unlikely.
Referenced by PreRunInit().
void SCProfilingKeywordDestroyCtx | ( | DetectEngineCtx * | ) |
Definition at line 278 of file util-profiling-keywords.c.
References DetectEngineCtx_::buffer_type_id, DetectEngineCtx_::profile_keyword_ctx, DetectEngineCtx_::profile_keyword_ctx_per_list, and SCFree.
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 378 of file util-profiling-keywords.c.
References DetectEngineCtx_::buffer_type_id, BUG_ON, SCProfileKeywordDetectCtx_::data, DETECT_TBLSIZE, DetectEngineCtx_::profile_keyword_ctx, DetectEngineCtx_::profile_keyword_ctx_per_list, profiling_keyword_enabled, SCCalloc, SCLogPerf, and SCMalloc.
Referenced by SigGroupBuild().
void SCProfilingKeywordsGlobalInit | ( | void | ) |
Definition at line 69 of file util-profiling-keywords.c.
References DetectEngineCtx_::buffer_type_id, SCProfileKeywordData_::checks, ConfGetNode(), ConfigGetLogDirectory(), ConfNodeChildValueIsTrue(), ConfNodeLookupChildValue(), ConfValIsTrue(), SCProfileKeywordDetectCtx_::data, DETECT_SM_LIST_DYNAMIC_START, DETECT_TBLSIZE, DetectBufferTypeGetNameById(), DetectSigmatchListEnumToString(), SCProfileKeywordData_::matches, SCProfileKeywordData_::max, DetectEngineCtx_::profile_keyword_ctx, DetectEngineCtx_::profile_keyword_ctx_per_list, profiling_keyword_enabled, SC_ERR_FOPEN, SCLocalTime(), SCLogDebug, SCLogError, SCLogPerf, sigmatch_table, SCProfileKeywordData_::ticks_match, and SCProfileKeywordData_::ticks_no_match.
Referenced by PreRunInit().
void SCProfilingKeywordThreadCleanup | ( | DetectEngineThreadCtx * | ) |
Definition at line 351 of file util-profiling-keywords.c.
References DetectEngineCtx_::buffer_type_id, SCProfileKeywordDetectCtx_::data_m, DetectEngineThreadCtx_::de_ctx, DetectEngineThreadCtx_::keyword_perf_data, DetectEngineThreadCtx_::keyword_perf_data_per_list, DetectEngineCtx_::profile_keyword_ctx, and SCFree.
Referenced by DetectEngineThreadCtxInit().
void SCProfilingKeywordThreadSetup | ( | struct SCProfileKeywordDetectCtx_ * | , |
DetectEngineThreadCtx * | |||
) |
Definition at line 294 of file util-profiling-keywords.c.
References DetectEngineCtx_::buffer_type_id, BUG_ON, SCProfileKeywordData_::checks, SCProfileKeywordDetectCtx_::data, DetectEngineThreadCtx_::de_ctx, DETECT_TBLSIZE, DetectEngineThreadCtx_::keyword_perf_data, DetectEngineThreadCtx_::keyword_perf_data_per_list, SCProfileKeywordData_::matches, SCProfileKeywordData_::max, DetectEngineCtx_::profile_keyword_ctx, DetectEngineCtx_::profile_keyword_ctx_per_list, SCCalloc, SCMalloc, SCProfileKeywordData_::ticks_match, and SCProfileKeywordData_::ticks_no_match.
Referenced by DetectEngineResetMaxSigId().
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 223 of file util-profiling-keywords.c.
References SCProfileKeywordData_::checks, SCProfileKeywordDetectCtx_::data, SCProfileKeywordDetectCtx_::data_m, DETECT_TBLSIZE, DetectEngineThreadCtx_::keyword_perf_data, DetectEngineThreadCtx_::keyword_perf_data_per_list, DetectEngineThreadCtx_::keyword_perf_list, SCProfileKeywordData_::matches, SCProfileKeywordData_::max, SC_ERR_MUTEX, SCFree, SCLogError, SCMalloc, SCProfileKeywordData_::ticks_match, and SCProfileKeywordData_::ticks_no_match.
void SCProfilingPrefilterDestroyCtx | ( | DetectEngineCtx * | ) |
Definition at line 223 of file util-profiling-prefilter.c.
References DetectEngineCtx_::profile_prefilter_ctx.
Referenced by DetectEngineCtxFree().
void SCProfilingPrefilterGlobalInit | ( | void | ) |
Definition at line 63 of file util-profiling-prefilter.c.
References SCProfilePrefilterData_::called, ConfGetNode(), ConfigGetLogDirectory(), ConfNodeChildValueIsTrue(), ConfNodeLookupChildValue(), ConfValIsTrue(), SCProfilePrefilterDetectCtx_::data, SCProfilePrefilterData_::max, SCProfilePrefilterData_::name, DetectEngineCtx_::profile_prefilter_ctx, profiling_prefilter_enabled, SC_ERR_FOPEN, SCLocalTime(), SCLogDebug, SCLogError, SCLogPerf, SCProfilePrefilterDetectCtx_::size, and SCProfilePrefilterData_::total.
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 280 of file util-profiling-prefilter.c.
References BUG_ON, SCProfilePrefilterDetectCtx_::data, HashListTableGetListData, HashListTableGetListHead(), HashListTableGetListNext, PrefilterStore_::id, PrefilterStore_::name, SCProfilePrefilterData_::name, DetectEngineCtx_::prefilter_hash_table, DetectEngineCtx_::prefilter_id, DetectEngineCtx_::profile_prefilter_ctx, profiling_prefilter_enabled, SCLogDebug, SCLogPerf, SCMalloc, and SCProfilePrefilterDetectCtx_::size.
Referenced by SigGroupBuild().
void SCProfilingPrefilterThreadCleanup | ( | DetectEngineThreadCtx * | ) |
Definition at line 261 of file util-profiling-prefilter.c.
References SCProfilePrefilterDetectCtx_::data_m, DetectEngineThreadCtx_::de_ctx, DetectEngineThreadCtx_::prefilter_perf_data, DetectEngineCtx_::profile_prefilter_ctx, and SCFree.
Referenced by DetectEngineThreadCtxInit().
void SCProfilingPrefilterThreadSetup | ( | struct SCProfilePrefilterDetectCtx_ * | , |
DetectEngineThreadCtx * | |||
) |
Definition at line 232 of file util-profiling-prefilter.c.
References SCProfilePrefilterData_::called, SCProfilePrefilterDetectCtx_::data, DetectEngineThreadCtx_::de_ctx, SCProfilePrefilterData_::max, DetectEngineCtx_::prefilter_id, DetectEngineThreadCtx_::prefilter_perf_data, DetectEngineCtx_::profile_prefilter_ctx, SCMalloc, and SCProfilePrefilterData_::total.
Referenced by DetectEngineResetMaxSigId().
void SCProfilingPrefilterUpdateCounter | ( | DetectEngineThreadCtx * | det_ctx, |
int | id, | ||
uint64_t | ticks | ||
) |
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 183 of file util-profiling-prefilter.c.
References SCProfilePrefilterData_::called, SCProfilePrefilterDetectCtx_::data, SCProfilePrefilterDetectCtx_::data_m, DetectEngineThreadCtx_::de_ctx, SCProfilePrefilterData_::max, DetectEngineCtx_::prefilter_id, DetectEngineThreadCtx_::prefilter_perf_data, SC_ERR_MUTEX, SCFree, SCLogError, SCMalloc, and SCProfilePrefilterData_::total.
void SCProfilingPrintPacketProfile | ( | Packet * | ) |
Definition at line 807 of file util-profiling.c.
References ALPROTO_FAILED, ALPROTO_MAX, PktProfiling_::app, SCProfilePacketData_::cnt, PktProfiling_::detect, flags, PktProfiling_::flowworker, PktProfiling_::logger, LOGGER_SIZE, SCProfilePacketData_::max, SCProfilePacketData_::min, Packet_::pcap_cnt, PKT_IS_IPV4, PROF_DETECT_SIZE, Packet_::profile, PROFILE_FLOWWORKER_APPLAYERUDP, PROFILE_FLOWWORKER_SIZE, PROFILE_FLOWWORKER_STREAM, proto, Packet_::proto, PktProfiling_::proto_detect, ProfileProtoRecords::records4, ProfileProtoRecords::records6, PktProfilingTmmData_::ticks_end, PktProfilingData_::ticks_end, PktProfiling_::ticks_end, PktProfilingDetectData_::ticks_spent, PktProfilingAppData_::ticks_spent, PktProfilingLoggerData_::ticks_spent, PktProfilingTmmData_::ticks_start, PktProfilingData_::ticks_start, PktProfiling_::ticks_start, TM_FLAG_DECODE_TM, TM_FLAG_RECEIVE_TM, PktProfiling_::tmm, TMM_FLOWWORKER, tmm_modules, TMM_SIZE, and SCProfilePacketData_::tot.
Referenced by SCProfilingAddPacket().
void SCProfilingRegisterTests | ( | void | ) |
Definition at line 1448 of file util-profiling.c.
References UtRegisterTest().
void SCProfilingRuleDestroyCtx | ( | struct SCProfileDetectCtx_ * | ) |
Definition at line 589 of file util-profiling-rules.c.
References SCProfileDetectCtx_::data, SCProfileDetectCtx_::data_m, and SCFree.
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 651 of file util-profiling-rules.c.
References BUG_ON, SCProfileDetectCtx_::data, SCProfileData_::gid, Signature_::gid, Signature_::id, Signature_::next, DetectEngineCtx_::profile_ctx, Signature_::profiling_id, profiling_rules_enabled, SCProfileData_::rev, Signature_::rev, SCLogPerf, SCMalloc, SCProfileData_::sid, DetectEngineCtx_::sig_list, and SCProfileDetectCtx_::size.
Referenced by SigGroupBuild().
void SCProfilingRulesGlobalInit | ( | void | ) |
Definition at line 114 of file util-profiling-rules.c.
References SCProfileSummary_::avgticks, SCProfileSummary_::avgticks_match, SCProfileSummary_::avgticks_no_match, ByteExtractStringUint32(), SCProfileData_::checks, SCProfileSummary_::checks, ConfGetNode(), ConfigGetLogDirectory(), ConfNodeChildValueIsTrue(), ConfNodeLookupChildValue(), ConfValIsTrue(), CreateIsoTimeString(), SCProfileDetectCtx_::data, SCProfileData_::gid, SCProfileSummary_::gid, SCProfileDetectCtx_::id, JSON_ESCAPE_SLASH, SCProfileData_::matches, SCProfileSummary_::matches, SCProfileData_::max, SCProfileSummary_::max, MIN, profiling_output_to_file, profiling_rules_enabled, SCProfileData_::rev, SCProfileSummary_::rev, SC_ERR_FOPEN, SC_ERR_INVALID_ARGUMENT, SC_ERR_MEM_ALLOC, 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, SCFree, SCLocalTime(), SCLogError, SCLogPerf, SCMalloc, SET_ONE, SCProfileData_::sid, SCProfileSummary_::sid, SCProfileDetectCtx_::size, SCProfileSummary_::ticks, SCProfileData_::ticks_match, SCProfileSummary_::ticks_match, SCProfileData_::ticks_no_match, SCProfileSummary_::ticks_no_match, and unlikely.
Referenced by PreRunInit().
void SCProfilingRuleThreadCleanup | ( | DetectEngineThreadCtx * | ) |
Definition at line 631 of file util-profiling-rules.c.
References SCProfileDetectCtx_::data_m, DetectEngineThreadCtx_::de_ctx, DetectEngineCtx_::profile_ctx, DetectEngineThreadCtx_::rule_perf_data, DetectEngineThreadCtx_::rule_perf_data_size, and SCFree.
Referenced by DetectEngineThreadCtxInit().
void SCProfilingRuleThreadSetup | ( | struct SCProfileDetectCtx_ * | , |
DetectEngineThreadCtx * | |||
) |
Definition at line 600 of file util-profiling-rules.c.
References SCProfileData_::checks, SCProfileDetectCtx_::data, SCProfileData_::matches, SCProfileData_::max, DetectEngineCtx_::profile_ctx, DetectEngineThreadCtx_::rule_perf_data, DetectEngineThreadCtx_::rule_perf_data_size, SCMalloc, SCProfileDetectCtx_::size, SCProfileData_::ticks_match, and SCProfileData_::ticks_no_match.
Referenced by DetectEngineResetMaxSigId().
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 557 of file util-profiling-rules.c.
References SCProfileData_::checks, SCProfileDetectCtx_::data_m, SCProfileData_::matches, SCProfileData_::max, DetectEngineThreadCtx_::rule_perf_data, DetectEngineThreadCtx_::rule_perf_data_size, SC_ERR_MUTEX, SCLogError, SCMalloc, SCProfileData_::ticks_match, and SCProfileData_::ticks_no_match.
void SCProfilingSghDestroyCtx | ( | DetectEngineCtx * | ) |
Definition at line 312 of file util-profiling-rulegroups.c.
References DetectEngineCtx_::profile_sgh_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 377 of file util-profiling-rulegroups.c.
References BUG_ON, SCProfileSghDetectCtx_::cnt, SCProfileSghDetectCtx_::data, DetectEngineCtx_::profile_sgh_ctx, profiling_sghs_enabled, SCCalloc, SCLogPerf, and DetectEngineCtx_::sgh_array_cnt.
Referenced by SigAddressPrepareStage4().
void SCProfilingSghsGlobalInit | ( | void | ) |
Definition at line 71 of file util-profiling-rulegroups.c.
References SCProfileSghData_::checks, SCProfileSghDetectCtx_::cnt, ConfGetNode(), ConfigGetLogDirectory(), ConfNodeChildValueIsTrue(), ConfNodeLookupChildValue(), ConfValIsTrue(), CreateIsoTimeString(), SCProfileSghDetectCtx_::data, JSON_ESCAPE_SLASH, likely, SCProfileSghData_::mpm_match_cnt_max, SCProfileSghData_::mpm_match_cnt_total, SCProfileSghData_::non_mpm_generic, SCProfileSghData_::non_mpm_syn, SCProfileSghData_::post_prefilter_sigs_max, SCProfileSghData_::post_prefilter_sigs_total, DetectEngineCtx_::profile_sgh_ctx, profiling_sghs_enabled, SC_ERR_FOPEN, SCLocalTime(), SCLogDebug, SCLogError, and SCLogPerf.
Referenced by PreRunInit().
void SCProfilingSghThreadCleanup | ( | DetectEngineThreadCtx * | ) |
Definition at line 358 of file util-profiling-rulegroups.c.
References SCProfileSghDetectCtx_::data_m, DetectEngineThreadCtx_::de_ctx, DetectEngineCtx_::profile_sgh_ctx, SCFree, and DetectEngineThreadCtx_::sgh_perf_data.
Referenced by DetectEngineThreadCtxInit().
void SCProfilingSghThreadSetup | ( | struct SCProfileSghDetectCtx_ * | , |
DetectEngineThreadCtx * | |||
) |
Definition at line 321 of file util-profiling-rulegroups.c.
References ADD, SCProfileSghData_::checks, SCProfileSghDetectCtx_::data, DetectEngineThreadCtx_::de_ctx, SCProfileSghData_::mpm_match_cnt_max, SCProfileSghData_::mpm_match_cnt_total, SCProfileSghData_::non_mpm_generic, SCProfileSghData_::non_mpm_syn, SCProfileSghData_::post_prefilter_sigs_max, SCProfileSghData_::post_prefilter_sigs_total, DetectEngineCtx_::profile_sgh_ctx, SCCalloc, DetectEngineCtx_::sgh_array_cnt, and DetectEngineThreadCtx_::sgh_perf_data.
Referenced by DetectEngineResetMaxSigId().
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 267 of file util-profiling-rulegroups.c.
References SCProfileSghData_::checks, SCProfileSghDetectCtx_::data, SCProfileSghDetectCtx_::data_m, 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, SC_ERR_MUTEX, SCCalloc, SCFree, SCLogError, DetectEngineCtx_::sgh_array_cnt, and DetectEngineThreadCtx_::sgh_perf_data.
int profiling_keyword_enabled |
Definition at line 64 of file util-profiling-keywords.c.
Referenced by SCProfilingKeywordInitCounters(), and SCProfilingKeywordsGlobalInit().
__thread int profiling_keyword_entered |
Definition at line 65 of file util-profiling-keywords.c.
int profiling_packets_enabled |
Definition at line 101 of file util-profiling.c.
Referenced by SCProfilingDestroy(), SCProfilingDumpPacketStats(), and SCProfilingInit().
int profiling_prefilter_enabled |
Definition at line 58 of file util-profiling-prefilter.c.
Referenced by SCProfilingPrefilterGlobalInit(), and SCProfilingPrefilterInitCounters().
__thread int profiling_prefilter_entered |
Definition at line 59 of file util-profiling-prefilter.c.
int profiling_rules_enabled |
Definition at line 81 of file util-profiling-rules.c.
Referenced by PostRunDeinit(), SCProfilingRuleInitCounters(), and SCProfilingRulesGlobalInit().
__thread int profiling_rules_entered |
Used as a check so we don't double enter a profiling run.
Definition at line 117 of file util-profiling.c.
int profiling_sghs_enabled |
Definition at line 66 of file util-profiling-rulegroups.c.
Referenced by SCProfilingSghInitCounters(), and SCProfilingSghsGlobalInit().