Skip to content

feat(userspace/libsinsp)!: remove unused sinsp_dumper::m_inspector #2385

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

Merged
merged 1 commit into from
May 6, 2025

Conversation

ekoops
Copy link
Contributor

@ekoops ekoops commented May 5, 2025

What type of PR is this?

Uncomment one (or more) /kind <> lines:

/kind bug

/kind cleanup

/kind design

/kind documentation

/kind failing-test

/kind feature

Any specific area of the project related to this PR?

Uncomment one (or more) /area <> lines:

/area API-version

/area build

/area CI

/area driver-kmod

/area driver-bpf

/area driver-modern-bpf

/area libscap-engine-bpf

/area libscap-engine-gvisor

/area libscap-engine-kmod

/area libscap-engine-modern-bpf

/area libscap-engine-nodriver

/area libscap-engine-noop

/area libscap-engine-source-plugin

/area libscap-engine-savefile

/area libscap

/area libpman

/area libsinsp

/area tests

/area proposals

Does this PR require a change in the driver versions?

/version driver-API-version-major

/version driver-API-version-minor

/version driver-API-version-patch

/version driver-SCHEMA-version-major

/version driver-SCHEMA-version-minor

/version driver-SCHEMA-version-patch

What this PR does / why we need it:

This PR removes the unused m_inspector field of sinsp_dumper. Moreover, it removes the corresponding sinsp_dumper::set_inspector() method.

Which issue(s) this PR fixes:

Fixes #

Special notes for your reviewer:

Does this PR introduce a user-facing change?:

feat(userspace/libsinsp)!: remove unused `sinsp_dumper::m_inspector`

Copy link

github-actions bot commented May 5, 2025

Perf diff from master - unit tests

     6.26%     -0.46%  [.] sinsp_parser::reset
     6.57%     -0.31%  [.] sinsp::next
     1.09%     +0.25%  [.] user_group_updater::user_group_updater
     1.00%     +0.22%  [.] std::_Hashtable<unsigned long, std::pair<unsigned long const, std::shared_ptr<ppm_evt_hdr> >, std::allocator<std::pair<unsigned long const, std::shared_ptr<ppm_evt_hdr> > >, std::__detail::_Select1st, std::equal_to<unsigned long>, std::hash<unsigned long>, std::__detail::_Mod_range_hashing, std::__detail::_Default_ranged_hash, std::__detail::_Prime_rehash_policy, std::__detail::_Hashtable_traits<false, false, true> >::_M_find_before_node
     1.60%     -0.22%  [.] sinsp_parser::process_event
     0.77%     +0.17%  [.] sinsp::fetch_next_event
     5.41%     -0.16%  [.] sinsp_evt::get_type
     2.63%     -0.14%  [.] gzfile_read
     0.95%     +0.13%  [.] scap_event_decode_params
     0.53%     -0.13%  [.] std::vector<sinsp_evt_param, std::allocator<sinsp_evt_param> >::emplace_back<sinsp_evt*, unsigned int&, char const*, unsigned long&>

Heap diff from master - unit tests

peak heap memory consumption: 0B
peak RSS (including heaptrack overhead): 0B
total memory leaked: 0B

Heap diff from master - scap file

peak heap memory consumption: 0B
peak RSS (including heaptrack overhead): 0B
total memory leaked: 0B

Benchmarks diff from master

Comparing gbench_data.json to /root/actions-runner/_work/libs/libs/build/gbench_data.json
Benchmark                                                         Time             CPU      Time Old      Time New       CPU Old       CPU New
----------------------------------------------------------------------------------------------------------------------------------------------
BM_sinsp_split_mean                                            -0.0114         -0.0114           150           148           150           148
BM_sinsp_split_median                                          -0.0126         -0.0126           150           148           150           148
BM_sinsp_split_stddev                                          +2.3785         +2.3786             0             1             0             1
BM_sinsp_split_cv                                              +2.4175         +2.4176             0             0             0             0
BM_sinsp_concatenate_paths_relative_path_mean                  -0.0079         -0.0079            56            56            56            56
BM_sinsp_concatenate_paths_relative_path_median                -0.0144         -0.0144            56            55            56            55
BM_sinsp_concatenate_paths_relative_path_stddev                +7.4923         +7.5064             0             1             0             1
BM_sinsp_concatenate_paths_relative_path_cv                    +7.5600         +7.5743             0             0             0             0
BM_sinsp_concatenate_paths_empty_path_mean                     -0.0408         -0.0408            25            24            25            24
BM_sinsp_concatenate_paths_empty_path_median                   -0.0361         -0.0361            25            24            25            24
BM_sinsp_concatenate_paths_empty_path_stddev                   -0.8629         -0.8632             0             0             0             0
BM_sinsp_concatenate_paths_empty_path_cv                       -0.8571         -0.8574             0             0             0             0
BM_sinsp_concatenate_paths_absolute_path_mean                  -0.0412         -0.0412            60            57            60            57
BM_sinsp_concatenate_paths_absolute_path_median                -0.0415         -0.0415            60            57            60            57
BM_sinsp_concatenate_paths_absolute_path_stddev                -0.1110         -0.1105             0             0             0             0
BM_sinsp_concatenate_paths_absolute_path_cv                    -0.0728         -0.0723             0             0             0             0

Copy link

codecov bot commented May 5, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 77.16%. Comparing base (003b502) to head (7086c20).
Report is 13 commits behind head on master.

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #2385   +/-   ##
=======================================
  Coverage   77.16%   77.16%           
=======================================
  Files         231      231           
  Lines       30339    30339           
  Branches     4654     4654           
=======================================
  Hits        23412    23412           
  Misses       6927     6927           
Flag Coverage Δ
libsinsp 77.16% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

FedeDP
FedeDP previously approved these changes May 5, 2025
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.

/approve

@poiana
Copy link
Contributor

poiana commented May 5, 2025

LGTM label has been added.

Git tree hash: 9bbb319ac941b99f4db6121d60605ed192289f97

@poiana poiana added the approved label May 5, 2025
@FedeDP
Copy link
Contributor

FedeDP commented May 5, 2025

/milestone 0.21.0

@poiana poiana added this to the 0.21.0 milestone May 5, 2025
incertum
incertum previously approved these changes May 5, 2025
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.

Nice, ty!

/approve

@github-project-automation github-project-automation bot moved this from Todo to In progress in Falco Roadmap May 5, 2025
BREAKING CHANGE: remove `sinsp_dumper::set_inspector` API

Signed-off-by: Leonardo Di Giovanna <leonardodigiovanna1@gmail.com>
@ekoops ekoops dismissed stale reviews from incertum and FedeDP via 7086c20 May 5, 2025 21:13
@ekoops ekoops force-pushed the ekoops/remove-dumper-insp branch from f202f47 to 7086c20 Compare May 5, 2025 21:13
@poiana poiana removed the lgtm label May 5, 2025
@poiana poiana requested review from FedeDP and incertum May 5, 2025 21:13
@ekoops
Copy link
Contributor Author

ekoops commented May 5, 2025

Just rebased due to other merged changes!

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.

/approve

@poiana poiana added the lgtm label May 6, 2025
@poiana
Copy link
Contributor

poiana commented May 6, 2025

LGTM label has been added.

Git tree hash: 61d6da191f540d83f7e8751d8fc907977579cff4

@poiana
Copy link
Contributor

poiana commented May 6, 2025

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: ekoops, FedeDP, 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 25158ff into falcosecurity:master May 6, 2025
47 checks passed
@github-project-automation github-project-automation bot moved this from In progress to Done in Falco Roadmap May 6, 2025
@ekoops ekoops deleted the ekoops/remove-dumper-insp branch May 9, 2025 07:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

5 participants