mirror of
https://github.com/zeek/zeek.git
synced 2025-10-02 06:38:20 +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 {
|
namespace zeek::detail {
|
||||||
|
|
||||||
std::unique_ptr<EventTraceMgr> etm;
|
std::unique_ptr<EventTraceMgr> event_trace_mgr;
|
||||||
|
|
||||||
// Helper function for generating a correct script-level representation
|
// Helper function for generating a correct script-level representation
|
||||||
// of a string constant.
|
// of a string constant.
|
||||||
|
|
|
@ -467,6 +467,6 @@ private:
|
||||||
};
|
};
|
||||||
|
|
||||||
// If non-nil then we're doing event tracing.
|
// 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
|
} // namespace zeek::detail
|
||||||
|
|
|
@ -3868,8 +3868,8 @@ ValPtr ScheduleExpr::Eval(Frame* f) const {
|
||||||
if ( args ) {
|
if ( args ) {
|
||||||
auto handler = event->Handler();
|
auto handler = event->Handler();
|
||||||
|
|
||||||
if ( etm )
|
if ( event_trace_mgr )
|
||||||
etm->ScriptEventQueued(handler);
|
event_trace_mgr->ScriptEventQueued(handler);
|
||||||
|
|
||||||
timer_mgr->Add(new ScheduleTimer(handler, std::move(*args), dt));
|
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());
|
auto v = eval_list(f, args.get());
|
||||||
|
|
||||||
if ( handler ) {
|
if ( handler ) {
|
||||||
if ( etm )
|
if ( event_trace_mgr )
|
||||||
etm->ScriptEventQueued(handler);
|
event_trace_mgr->ScriptEventQueued(handler);
|
||||||
|
|
||||||
event_mgr.Enqueue(handler, std::move(*v));
|
event_mgr.Enqueue(handler, std::move(*v));
|
||||||
}
|
}
|
||||||
|
|
|
@ -354,8 +354,8 @@ ValPtr ScriptFunc::Invoke(zeek::Args* args, Frame* parent) const {
|
||||||
return nullptr;
|
return nullptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( etm && Flavor() == FUNC_FLAVOR_EVENT )
|
if ( event_trace_mgr && Flavor() == FUNC_FLAVOR_EVENT )
|
||||||
etm->StartEvent(this, args);
|
event_trace_mgr->StartEvent(this, args);
|
||||||
|
|
||||||
if ( g_trace_state.DoTrace() ) {
|
if ( g_trace_state.DoTrace() ) {
|
||||||
ODesc d;
|
ODesc d;
|
||||||
|
@ -432,8 +432,8 @@ ValPtr ScriptFunc::Invoke(zeek::Args* args, Frame* parent) const {
|
||||||
result = val_mgr->True();
|
result = val_mgr->True();
|
||||||
}
|
}
|
||||||
|
|
||||||
else if ( etm && Flavor() == FUNC_FLAVOR_EVENT )
|
else if ( event_trace_mgr && Flavor() == FUNC_FLAVOR_EVENT )
|
||||||
etm->EndEvent(this, args);
|
event_trace_mgr->EndEvent(this, args);
|
||||||
|
|
||||||
// Warn if the function returns something, but we returned from
|
// Warn if the function returns something, but we returned from
|
||||||
// the function without an explicit return, or without a value.
|
// 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();
|
auto h = event_expr->Handler();
|
||||||
|
|
||||||
if ( args && h ) {
|
if ( args && h ) {
|
||||||
if ( etm )
|
if ( event_trace_mgr )
|
||||||
etm->ScriptEventQueued(h);
|
event_trace_mgr->ScriptEventQueued(h);
|
||||||
|
|
||||||
event_mgr.Enqueue(h, std::move(*args));
|
event_mgr.Enqueue(h, std::move(*args));
|
||||||
}
|
}
|
||||||
|
|
|
@ -400,8 +400,8 @@ static void terminate_zeek() {
|
||||||
|
|
||||||
script_coverage_mgr.WriteStats();
|
script_coverage_mgr.WriteStats();
|
||||||
|
|
||||||
if ( etm )
|
if ( event_trace_mgr )
|
||||||
etm->Generate();
|
event_trace_mgr->Generate();
|
||||||
|
|
||||||
delete zeekygen_mgr;
|
delete zeekygen_mgr;
|
||||||
delete packet_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);
|
auto ipbb = make_intrusive<BuiltinFunc>(init_bifs, ipbid->Name(), false);
|
||||||
|
|
||||||
if ( options.event_trace_file )
|
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
|
// Parsing involves reading input files, including any input
|
||||||
// interactively provided by the user at the console. Temporarily
|
// interactively provided by the user at the console. Temporarily
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue