mirror of
https://github.com/zeek/zeek.git
synced 2025-10-04 07:38:19 +00:00
hooks to support event tracing
This commit is contained in:
parent
25e096b50a
commit
39cbd7a9dc
4 changed files with 40 additions and 1 deletions
|
@ -26,6 +26,7 @@
|
|||
#include "zeek/Desc.h"
|
||||
#include "zeek/Event.h"
|
||||
#include "zeek/EventRegistry.h"
|
||||
#include "zeek/EventTrace.h"
|
||||
#include "zeek/File.h"
|
||||
#include "zeek/Frag.h"
|
||||
#include "zeek/Frame.h"
|
||||
|
@ -299,8 +300,19 @@ static void terminate_zeek()
|
|||
event_mgr.Enqueue(zeek_done, Args{});
|
||||
|
||||
timer_mgr->Expire();
|
||||
|
||||
// Drain() limits how many "generations" of newly created events
|
||||
// it will process. When we're terminating, however, we're okay
|
||||
// with long chains of events, and this makes the workings of
|
||||
// event-tracing simpler.
|
||||
//
|
||||
// That said, we also need to ensure that it runs at least once,
|
||||
// as it has side effects such as tickling triggers.
|
||||
event_mgr.Drain();
|
||||
|
||||
while ( event_mgr.HasEvents() )
|
||||
event_mgr.Drain();
|
||||
|
||||
if ( profiling_logger )
|
||||
{
|
||||
// FIXME: There are some occasional crashes in the memory
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue