-
Notifications
You must be signed in to change notification settings - Fork 169
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
cleanup(scap,sinsp): return event flags directly #1420
cleanup(scap,sinsp): return event flags directly #1420
Conversation
Signed-off-by: Grzegorz Nosek <[email protected]>
The device id does not necessarily correspond to the CPU id even for the kmod engine (when CPUs are offline). Rename the parameter to match reality a bit better. Signed-off-by: Grzegorz Nosek <[email protected]>
The event flags are (currently) specific to the savefile engine but accessing them requires an awkward reacharound through a dedicated vtable method to a field stored on each call to next(). We can simplify this a bit and express the intent better by simply returning the flags from next() via an out pointer. Signed-off-by: Grzegorz Nosek <[email protected]>
43eebdb
to
9a4d0b1
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/approve
Nice cleanup!
LGTM label has been added. Git tree hash: 1bdbdcb9b0250c9cd70196decd70fcb4df046c89
|
/milestone 0.14.0 |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: FedeDP, gnosek, LucaGuerra The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
The event flags are (currently) specific to the savefile engine but accessing them requires an awkward reacharound through a dedicated vtable method to a field stored on each call to next().
We can simplify this a bit and express the intent better by simply returning the flags from next() via an out pointer.
What type of PR is this?
/kind cleanup
Any specific area of the project related to this PR?
/area libscap
/area libsinsp
Does this PR require a change in the driver versions?
What this PR does / why we need it:
Which issue(s) this PR fixes:
Fixes #
Special notes for your reviewer:
The "rename pcpuid to pdevid" commit is a pure no-op, the second one is where things happen (as well as changes in all the engines to switch to the new signature).
Also, I pulled in the unused variable fix from #1401 as well, since this breaks the build with -Werror otherwise.
Does this PR introduce a user-facing change?: