mirror of
https://github.com/zeek/zeek.git
synced 2025-10-02 14:48:21 +00:00
EventTraceMgr: Rename etm to event_trace_mgr
Mostly to avoid having new maintainers/developers knowing about yet another abbreviation.
This commit is contained in:
parent
1465e390a2
commit
5bcf6bec52
6 changed files with 15 additions and 15 deletions
|
@ -13,7 +13,7 @@
|
|||
|
||||
namespace zeek::detail {
|
||||
|
||||
std::unique_ptr<EventTraceMgr> etm;
|
||||
std::unique_ptr<EventTraceMgr> event_trace_mgr;
|
||||
|
||||
// Helper function for generating a correct script-level representation
|
||||
// of a string constant.
|
||||
|
|
|
@ -467,6 +467,6 @@ private:
|
|||
};
|
||||
|
||||
// If non-nil then we're doing event tracing.
|
||||
extern std::unique_ptr<EventTraceMgr> etm;
|
||||
extern std::unique_ptr<EventTraceMgr> event_trace_mgr;
|
||||
|
||||
} // namespace zeek::detail
|
||||
|
|
|
@ -3868,8 +3868,8 @@ ValPtr ScheduleExpr::Eval(Frame* f) const {
|
|||
if ( args ) {
|
||||
auto handler = event->Handler();
|
||||
|
||||
if ( etm )
|
||||
etm->ScriptEventQueued(handler);
|
||||
if ( event_trace_mgr )
|
||||
event_trace_mgr->ScriptEventQueued(handler);
|
||||
|
||||
timer_mgr->Add(new ScheduleTimer(handler, std::move(*args), dt));
|
||||
}
|
||||
|
@ -4474,8 +4474,8 @@ ValPtr EventExpr::Eval(Frame* f) const {
|
|||
auto v = eval_list(f, args.get());
|
||||
|
||||
if ( handler ) {
|
||||
if ( etm )
|
||||
etm->ScriptEventQueued(handler);
|
||||
if ( event_trace_mgr )
|
||||
event_trace_mgr->ScriptEventQueued(handler);
|
||||
|
||||
event_mgr.Enqueue(handler, std::move(*v));
|
||||
}
|
||||
|
|
|
@ -354,8 +354,8 @@ ValPtr ScriptFunc::Invoke(zeek::Args* args, Frame* parent) const {
|
|||
return nullptr;
|
||||
}
|
||||
|
||||
if ( etm && Flavor() == FUNC_FLAVOR_EVENT )
|
||||
etm->StartEvent(this, args);
|
||||
if ( event_trace_mgr && Flavor() == FUNC_FLAVOR_EVENT )
|
||||
event_trace_mgr->StartEvent(this, args);
|
||||
|
||||
if ( g_trace_state.DoTrace() ) {
|
||||
ODesc d;
|
||||
|
@ -432,8 +432,8 @@ ValPtr ScriptFunc::Invoke(zeek::Args* args, Frame* parent) const {
|
|||
result = val_mgr->True();
|
||||
}
|
||||
|
||||
else if ( etm && Flavor() == FUNC_FLAVOR_EVENT )
|
||||
etm->EndEvent(this, args);
|
||||
else if ( event_trace_mgr && Flavor() == FUNC_FLAVOR_EVENT )
|
||||
event_trace_mgr->EndEvent(this, args);
|
||||
|
||||
// Warn if the function returns something, but we returned from
|
||||
// the function without an explicit return, or without a value.
|
||||
|
|
|
@ -905,8 +905,8 @@ ValPtr EventStmt::Exec(Frame* f, StmtFlowType& flow) {
|
|||
auto h = event_expr->Handler();
|
||||
|
||||
if ( args && h ) {
|
||||
if ( etm )
|
||||
etm->ScriptEventQueued(h);
|
||||
if ( event_trace_mgr )
|
||||
event_trace_mgr->ScriptEventQueued(h);
|
||||
|
||||
event_mgr.Enqueue(h, std::move(*args));
|
||||
}
|
||||
|
|
|
@ -400,8 +400,8 @@ static void terminate_zeek() {
|
|||
|
||||
script_coverage_mgr.WriteStats();
|
||||
|
||||
if ( etm )
|
||||
etm->Generate();
|
||||
if ( event_trace_mgr )
|
||||
event_trace_mgr->Generate();
|
||||
|
||||
delete zeekygen_mgr;
|
||||
delete packet_mgr;
|
||||
|
@ -774,7 +774,7 @@ SetupResult setup(int argc, char** argv, Options* zopts) {
|
|||
auto ipbb = make_intrusive<BuiltinFunc>(init_bifs, ipbid->Name(), false);
|
||||
|
||||
if ( options.event_trace_file )
|
||||
etm = std::make_unique<EventTraceMgr>(*options.event_trace_file);
|
||||
event_trace_mgr = std::make_unique<EventTraceMgr>(*options.event_trace_file);
|
||||
|
||||
// Parsing involves reading input files, including any input
|
||||
// interactively provided by the user at the console. Temporarily
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue