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

new(driver): update exit events PPME_SYSCALL_WRITE_X and PPME_SYSCALL_PWRITE_X with enter params #2187

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

Andreagit97
Copy link
Member

What type of PR is this?

/kind feature

Any specific area of the project related to this PR?

/area driver-kmod

/area driver-bpf

/area driver-modern-bpf

/area libscap-engine-gvisor

/area libscap

/area libsinsp

/area tests

Does this PR require a change in the driver versions?

/version driver-SCHEMA-version-major

What this PR does / why we need it:

This PR is part of #2068.

Which issue(s) this PR fixes:

Special notes for your reviewer:

Does this PR introduce a user-facing change?:

NONE

@@ -1 +1 @@
3.0.0
4.0.0
Copy link
Member Author

Choose a reason for hiding this comment

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

same reason of #2176

// WRITE
////////////////////////////

TEST_F(scap_file_test, write_x_check_final_converted_event) {
Copy link
Member Author

@Andreagit97 Andreagit97 Dec 5, 2024

Choose a reason for hiding this comment

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

probably from now on it will be enough one test per event, it seems a little bit redundant to check every time if we receive the enter/exit events

Copy link

github-actions bot commented Dec 5, 2024

Perf diff from master - unit tests

     9.10%     -1.09%  [.] sinsp_evt::get_type
     2.08%     +0.46%  [.] is_conversion_needed
     1.39%     +0.38%  [.] 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.38%     -0.36%  [.] std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::_M_construct<char const*>
     1.13%     -0.36%  [.] sinsp_parser::event_cleanup
     1.87%     -0.32%  [.] scap_event_decode_params
     0.48%     -0.32%  [.] scap_file_test::assert_num_event_type
     0.64%     +0.30%  [.] std::_Hashtable<conversion_key, std::pair<conversion_key const, conversion_info>, std::allocator<std::pair<conversion_key const, conversion_info> >, std::__detail::_Select1st, std::equal_to<conversion_key>, std::hash<conversion_key>, std::__detail::_Mod_range_hashing, std::__detail::_Default_ranged_hash, std::__detail::_Prime_rehash_policy, std::__detail::_Hashtable_traits<true, false, true> >::_M_find_before_node
     2.79%     +0.30%  [.] sinsp_thread_manager::get_thread_ref
     1.13%     +0.26%  [.] sinsp_evt::get_ts

Heap diff from master - unit tests

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

Heap diff from master - scap file

peak heap memory consumption: -362B
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.0252         -0.0251           153           149           153           149
BM_sinsp_split_median                                          -0.0246         -0.0246           152           149           152           149
BM_sinsp_split_stddev                                          +1.0820         +1.0802             1             1             1             1
BM_sinsp_split_cv                                              +1.1358         +1.1337             0             0             0             0
BM_sinsp_concatenate_paths_relative_path_mean                  -0.0760         -0.0759            61            57            61            57
BM_sinsp_concatenate_paths_relative_path_median                -0.0762         -0.0762            61            57            61            57
BM_sinsp_concatenate_paths_relative_path_stddev                -0.1760         -0.1740             0             0             0             0
BM_sinsp_concatenate_paths_relative_path_cv                    -0.1082         -0.1061             0             0             0             0
BM_sinsp_concatenate_paths_empty_path_mean                     -0.0109         -0.0108            25            25            25            25
BM_sinsp_concatenate_paths_empty_path_median                   -0.0139         -0.0139            25            25            25            25
BM_sinsp_concatenate_paths_empty_path_stddev                   +0.6430         +0.6420             0             0             0             0
BM_sinsp_concatenate_paths_empty_path_cv                       +0.6610         +0.6599             0             0             0             0
BM_sinsp_concatenate_paths_absolute_path_mean                  -0.1052         -0.1051            63            56            63            56
BM_sinsp_concatenate_paths_absolute_path_median                -0.1036         -0.1035            62            56            62            56
BM_sinsp_concatenate_paths_absolute_path_stddev                -0.4560         -0.4560             1             1             1             1
BM_sinsp_concatenate_paths_absolute_path_cv                    -0.3921         -0.3920             0             0             0             0
BM_sinsp_split_container_image_mean                            -0.0188         -0.0188           404           396           403           396
BM_sinsp_split_container_image_median                          -0.0199         -0.0198           404           396           404           396
BM_sinsp_split_container_image_stddev                          -0.1287         -0.1279             2             2             2             2
BM_sinsp_split_container_image_cv                              -0.1119         -0.1113             0             0             0             0

Copy link

codecov bot commented Dec 5, 2024

Codecov Report

Attention: Patch coverage is 95.29412% with 4 lines in your changes missing coverage. Please review.

Project coverage is 75.16%. Comparing base (cb93f4b) to head (ad11aec).

Files with missing lines Patch % Lines
userspace/libsinsp/test/parsers/parse_pwrite.cpp 94.28% 2 Missing ⚠️
userspace/libsinsp/test/parsers/parse_write.cpp 93.93% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #2187      +/-   ##
==========================================
+ Coverage   75.11%   75.16%   +0.04%     
==========================================
  Files         276      278       +2     
  Lines       34394    34473      +79     
  Branches     5922     5922              
==========================================
+ Hits        25836    25911      +75     
- Misses       8558     8562       +4     
Flag Coverage Δ
libsinsp 75.16% <95.29%> (+0.04%) ⬆️

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.

@Andreagit97 Andreagit97 marked this pull request as ready for review December 5, 2024 16:12
@poiana poiana requested a review from jasondellaluce December 5, 2024 16:13
@leogr leogr requested a review from FedeDP December 16, 2024 11:16
@Andreagit97 Andreagit97 changed the title new(driver): update exit events PPME_SYSCALL_WRITE_X and PPME_SYSCALL_PWRITE_X with enter params [WIP] new(driver): update exit events PPME_SYSCALL_WRITE_X and PPME_SYSCALL_PWRITE_X with enter params Dec 16, 2024
@Andreagit97
Copy link
Member Author

This needs #2202

@Andreagit97 Andreagit97 force-pushed the convert_write_pwrite branch 2 times, most recently from 0a3ff98 to ffd8678 Compare December 17, 2024 10:29
@Andreagit97 Andreagit97 changed the title [WIP] new(driver): update exit events PPME_SYSCALL_WRITE_X and PPME_SYSCALL_PWRITE_X with enter params new(driver): update exit events PPME_SYSCALL_WRITE_X and PPME_SYSCALL_PWRITE_X with enter params Dec 17, 2024
@Andreagit97 Andreagit97 marked this pull request as ready for review December 17, 2024 10:30
FedeDP
FedeDP previously approved these changes Dec 17, 2024
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 Dec 17, 2024

LGTM label has been added.

Git tree hash: d2563eeb0a9f2401dac00ba2c0041ef632b8aa55

@poiana
Copy link
Contributor

poiana commented Dec 17, 2024

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: Andreagit97, 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 /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@leogr
Copy link
Member

leogr commented Jan 7, 2025

/milestone 0.21.0

Copy link
Contributor

@ekoops ekoops left a comment

Choose a reason for hiding this comment

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

Overall lgtm. Would you mind to rebase and bump just the minor in SCHEMA_VERSION and SCAP_MINIMUM_DRIVER_SCHEMA_VERSION instead of bumping the major?

@poiana
Copy link
Contributor

poiana commented Jan 16, 2025

@ekoops: changing LGTM is restricted to collaborators

In response to this:

Overall lgtm. Would you mind to rebase and bump just the minor in SCHEMA_VERSION and SCAP_MINIMUM_DRIVER_SCHEMA_VERSION instead of bumping the major?

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.

Signed-off-by: Andrea Terzolo <[email protected]>
@Andreagit97
Copy link
Member Author

Rebased on top of master

@leogr leogr requested a review from ekoops January 17, 2025 14:26
Copy link
Member

@leogr leogr left a comment

Choose a reason for hiding this comment

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

👍

/hold 0.21.0

@poiana
Copy link
Contributor

poiana commented Jan 17, 2025

LGTM label has been added.

Git tree hash: fec5c8b45e6a3f06ff3852a3476f9cbdcb3e2da9

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