coalescing of event handlers (ZAM optimization)

This commit is contained in:
Vern Paxson 2023-11-16 12:58:28 -08:00
parent a488dcffb6
commit 3d21d80dac
6 changed files with 267 additions and 46 deletions

View file

@ -84,6 +84,13 @@ public:
*/
bool HasEnabledBodies() const { return ! bodies.empty() && has_enabled_bodies; };
/**
* Is every body enabled?
*
* @return true if all bodies are enabled. (If no bodies, then true.)
*/
bool HasAllBodiesEnabled() const { return all_bodies_enabled; };
/**
* Calls a Zeek function.
* @param args the list of arguments to the function call.
@ -152,6 +159,7 @@ private:
// expose accessors in the zeek:: public interface.
friend class EventGroup;
bool has_enabled_bodies = true;
bool all_bodies_enabled = true;
};
namespace detail {