Skip to content
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

refactor: Use string_view in event filters and more #1797

Conversation

federico-sysdig
Copy link
Contributor

What type of PR is this?
/kind cleanup

Any specific area of the project related to this PR?
/area libsinsp

Does this PR require a change in the driver versions?

What this PR does / why we need it:
Some refactorings to try and improve the performance of event filtering. In particular the PR concentrates on avoiding string creation by passing around only std::string_view objects.
Some minor improvements have been also applied, such as creating objects controlled by a shared_ptr with std::make_shared to ensure that the control block is not allocated separate from the object, thus avoiding one allocation and making it more cache friendly.

Which issue(s) this PR fixes:
Fixes #

Special notes for your reviewer:

Does this PR introduce a user-facing change?:

NONE

@FedeDP
Copy link
Contributor

FedeDP commented Apr 17, 2024

Since we are a bit late for the 0.16.0 tag, i propose:
/milestone 0.17.0

@poiana poiana added this to the 0.17.0 milestone Apr 17, 2024
@federico-sysdig federico-sysdig force-pushed the refactor-use-string-view-in-filters branch from f9393dd to b9d6972 Compare April 23, 2024 10:02
@leogr
Copy link
Member

leogr commented Apr 23, 2024

/assign @FedeDP
🙏

@leogr
Copy link
Member

leogr commented Apr 30, 2024

cc @jasondellaluce

@@ -19,6 +19,7 @@

#pragma once

#include <cstdint>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This change was already merged and can be removed :) (#1799)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've rebased everything.

@federico-sysdig federico-sysdig force-pushed the refactor-use-string-view-in-filters branch from 006e6f6 to 8d0c4b5 Compare May 3, 2024 11:23
Copy link
Contributor

@FedeDP FedeDP left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!
/approve

@poiana poiana added the lgtm label May 3, 2024
@poiana
Copy link
Contributor

poiana commented May 3, 2024

LGTM label has been added.

Git tree hash: 225128f4dc00cf1a63bb56b4536a9d3039f02a77

@poiana poiana added the approved label May 3, 2024
Copy link
Contributor

@incertum incertum left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/approve

@poiana
Copy link
Contributor

poiana commented May 3, 2024

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: FedeDP, federico-sysdig, incertum

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 /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@poiana poiana merged commit e285a47 into falcosecurity:master May 3, 2024
34 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants