diff --git a/src/Event.cc b/src/Event.cc index 292d70b05f..ef69e7a42d 100644 --- a/src/Event.cc +++ b/src/Event.cc @@ -152,7 +152,7 @@ void EventMgr::Drain() if ( event_queue_flush_point ) QueueEventFast(event_queue_flush_point, val_list{}); - SegmentProfiler(segment_logger, "draining-events"); + SegmentProfiler prof(segment_logger, "draining-events"); PLUGIN_HOOK_VOID(HOOK_DRAIN_EVENTS, HookDrainEvents()); diff --git a/src/Func.cc b/src/Func.cc index 759b132a9a..cd5062af9b 100644 --- a/src/Func.cc +++ b/src/Func.cc @@ -309,7 +309,7 @@ Val* BroFunc::Call(val_list* args, Frame* parent) const #ifdef PROFILE_BRO_FUNCTIONS DEBUG_MSG("Function: %s\n", Name()); #endif - SegmentProfiler(segment_logger, location); + SegmentProfiler prof(segment_logger, location); if ( sample_logger ) sample_logger->FunctionSeen(this); @@ -629,7 +629,7 @@ Val* BuiltinFunc::Call(val_list* args, Frame* parent) const #ifdef PROFILE_BRO_FUNCTIONS DEBUG_MSG("Function: %s\n", Name()); #endif - SegmentProfiler(segment_logger, Name()); + SegmentProfiler prof(segment_logger, Name()); if ( sample_logger ) sample_logger->FunctionSeen(this); diff --git a/src/Net.cc b/src/Net.cc index 1b35907a93..fa9bbd56a2 100644 --- a/src/Net.cc +++ b/src/Net.cc @@ -212,7 +212,7 @@ void net_init(const std::optional& interface, void expire_timers(iosource::PktSrc* src_ps) { - SegmentProfiler(segment_logger, "expiring-timers"); + SegmentProfiler prof(segment_logger, "expiring-timers"); current_dispatched += timer_mgr->Advance(network_time, diff --git a/src/Sessions.cc b/src/Sessions.cc index 8f66ae8633..c86395267b 100644 --- a/src/Sessions.cc +++ b/src/Sessions.cc @@ -120,7 +120,7 @@ void NetSessions::Done() void NetSessions::NextPacket(double t, const Packet* pkt) { - SegmentProfiler(segment_logger, "dispatching-packet"); + SegmentProfiler prof(segment_logger, "dispatching-packet"); if ( raw_packet ) mgr.QueueEventFast(raw_packet, {pkt->BuildPktHdrVal()});