-
Notifications
You must be signed in to change notification settings - Fork 726
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add check for "is an open for reading/writing".
While working on measuring performance for falco, I found that one of the rule bottlenecks was checking for an open for reading/open for writing. With the current libsinsp, you have to do a string comparison on the flags argument, which can be slow, especially if you have to check for multiple flags. Fix this by adding a check evt.is_open_{read,write} that returns a boolean based on the value of the flags argument to the corresponding open/openat. This is similar to the current evt.is_io_{read,write}, but is argument-specific and limited to open/openat calls.
- Loading branch information
Showing
2 changed files
with
42 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters