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

feat(sinsp/threadinfo): expose thread cmdline as static field #2198

Closed
wants to merge 1 commit into from

Conversation

ekoops
Copy link
Contributor

@ekoops ekoops commented Dec 11, 2024

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 exposes thread cmdline as static fields.

Which issue(s) this PR fixes:

Fixes #

Special notes for your reviewer:

Does this PR introduce a user-facing change?:

NONE

@poiana
Copy link
Contributor

poiana commented Dec 11, 2024

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: ekoops
Once this PR has been reviewed and has the lgtm label, please assign leogr for approval. For more information see the Kubernetes Code Review Process.

The full list of commands accepted by this bot can be found 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 requested review from hbrueckner and mstemm December 11, 2024 13:09
@ekoops ekoops changed the title feat(sinsp/threadinfo): expose thread cmdline as static fields feat(sinsp/threadinfo): expose thread cmdline as static field Dec 11, 2024
Copy link

Perf diff from master - unit tests

     5.71%     -1.22%  [.] gzfile_read
     3.83%     -1.16%  [.] sinsp_thread_manager::get_thread_ref
     7.11%     +0.78%  [.] sinsp_evt::get_type
     2.68%     +0.70%  [.] sinsp_thread_manager::find_thread
     1.81%     +0.55%  [.] std::_Hashtable<long, std::pair<long const, std::shared_ptr<sinsp_threadinfo> >, std::allocator<std::pair<long const, std::shared_ptr<sinsp_threadinfo> > >, std::__detail::_Select1st, std::equal_to<long>, std::hash<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
     2.76%     +0.53%  [.] sinsp_parser::process_event
     2.59%     -0.46%  [.] next
     1.38%     -0.44%  [.] sinsp_evt::get_syscall_return_value
     2.20%     +0.42%  [.] is_conversion_needed
     0.88%     +0.39%  [.] sinsp::fetch_next_event

Heap diff from master - unit tests

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

Heap diff from master - scap file

peak heap memory consumption: -136B
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.0192         +0.0191           145           148           145           148
BM_sinsp_split_median                                          +0.0186         +0.0185           145           148           145           148
BM_sinsp_split_stddev                                          -0.2413         -0.2426             1             1             1             1
BM_sinsp_split_cv                                              -0.2556         -0.2567             0             0             0             0
BM_sinsp_concatenate_paths_relative_path_mean                  -0.0734         -0.0734            61            56            61            56
BM_sinsp_concatenate_paths_relative_path_median                -0.0788         -0.0788            61            56            61            56
BM_sinsp_concatenate_paths_relative_path_stddev                +2.6675         +2.6662             0             1             0             1
BM_sinsp_concatenate_paths_relative_path_cv                    +2.9578         +2.9568             0             0             0             0
BM_sinsp_concatenate_paths_empty_path_mean                     -0.0281         -0.0281            25            24            25            24
BM_sinsp_concatenate_paths_empty_path_median                   -0.0292         -0.0293            25            24            25            24
BM_sinsp_concatenate_paths_empty_path_stddev                   +0.5259         +0.5256             0             0             0             0
BM_sinsp_concatenate_paths_empty_path_cv                       +0.5700         +0.5697             0             0             0             0
BM_sinsp_concatenate_paths_absolute_path_mean                  -0.1091         -0.1091            63            56            63            56
BM_sinsp_concatenate_paths_absolute_path_median                -0.1137         -0.1138            63            56            63            56
BM_sinsp_concatenate_paths_absolute_path_stddev                -0.0965         -0.0968             1             1             1             1
BM_sinsp_concatenate_paths_absolute_path_cv                    +0.0140         +0.0138             0             0             0             0
BM_sinsp_split_container_image_mean                            +0.0188         +0.0188           390           397           390           397
BM_sinsp_split_container_image_median                          +0.0149         +0.0148           392           398           392           398
BM_sinsp_split_container_image_stddev                          -0.5684         -0.5687             7             3             7             3
BM_sinsp_split_container_image_cv                              -0.5764         -0.5766             0             0             0             0

Copy link

codecov bot commented Dec 11, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 75.19%. Comparing base (0fd43cb) to head (ac09b49).

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #2198      +/-   ##
==========================================
- Coverage   75.19%   75.19%   -0.01%     
==========================================
  Files         259      259              
  Lines       33878    33879       +1     
  Branches     5800     5801       +1     
==========================================
  Hits        25476    25476              
- Misses       8402     8403       +1     
Flag Coverage Δ
libsinsp 75.19% <100.00%> (-0.01%) ⬇️

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.

@FedeDP FedeDP added this to the TBD milestone Dec 11, 2024
@ekoops ekoops closed this Dec 11, 2024
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.

3 participants