-
Notifications
You must be signed in to change notification settings - Fork 170
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
new(userspace/libsinsp): expose threadinfo cgroups in plugins table api #2107
Conversation
…able API. Signed-off-by: Federico Di Pierro <nierro92@gmail.com>
…pair_t values. Signed-off-by: Federico Di Pierro <nierro92@gmail.com>
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: FedeDP 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 |
Instead, rely on a new table entry adapter, `pair_table_entry_adapter`. Signed-off-by: Federico Di Pierro <nierro92@gmail.com>
dceb0b7
to
2364176
Compare
@@ -443,10 +443,10 @@ class SINSP_PUBLIC sinsp_threadinfo : public libsinsp::state::table_entry { | |||
bool m_exe_lower_layer; ///< True if the executable file belongs to lower layer in overlayfs | |||
bool m_exe_from_memfd; ///< True if the executable is stored in fileless memory referenced by | |||
///< memfd | |||
std::vector<std::string> m_args; ///< Command line arguments (e.g. "-d1") | |||
std::vector<std::string> m_env; ///< Environment variables | |||
std::unique_ptr<cgroups_t> m_cgroups; ///< subsystem-cgroup pairs |
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.
Had to revert this change... (see #473 for the initial changeset)
@@ -659,6 +660,10 @@ class SINSP_PUBLIC sinsp_threadinfo : public libsinsp::state::table_entry { | |||
bool m_parent_loop_detected; | |||
libsinsp::state::stl_container_table_adapter<decltype(m_args)> m_args_table_adapter; | |||
libsinsp::state::stl_container_table_adapter<decltype(m_env)> m_env_table_adapter; | |||
libsinsp::state::stl_container_table_adapter< |
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.
This is a bit ugly because we need to enforce the specific value unwrapping class (the second entry).
/milestone 0.19.0 for a review :) i want to gather feedback asap (eg: change field names, or anything else i got wrong) |
@FedeDP: GitHub didn't allow me to request PR reviews from the following users: mrgian. Note that only falcosecurity members and repo collaborators can review this PR, and authors cannot review their own PRs. In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. |
Perf diff from master - unit tests
Heap diff from master - unit tests
Heap diff from master - scap file
Benchmarks diff from master
|
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #2107 +/- ##
==========================================
+ Coverage 73.69% 74.46% +0.76%
==========================================
Files 253 254 +1
Lines 31914 33316 +1402
Branches 5642 5718 +76
==========================================
+ Hits 23519 24808 +1289
- Misses 8395 8481 +86
- Partials 0 27 +27
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
/hold |
Also, should i bump plugin api version? |
…` and `second`. Signed-off-by: Federico Di Pierro <nierro92@gmail.com>
/unhold |
What type of PR is this?
/kind feature
Any specific area of the project related to this PR?
/area libsinsp
/area tests
Does this PR require a change in the driver versions?
What this PR does / why we need it:
This is needed to ensure k8smeta plugin can improve its perf.
Also, it is mandatory for the possible container engine as a plugin refactor because we will need to access thread cgroups from the plugin.
Which issue(s) this PR fixes:
Fixes #
Special notes for your reviewer:
Most of the lines changes come from the new test. Most of real code is under table_adapters.h for the new
std::pair
adapter.Does this PR introduce a user-facing change?: