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

     7.55%     -0.94%  [.] sinsp_evt::get_type
    10.58%     +0.86%  [.] sinsp_parser::reset
     0.91%     +0.79%  [.] sinsp_evt::get_ts
     3.53%     -0.70%  [.] sinsp_parser::process_event
     1.10%     +0.47%  [.] 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
     3.08%     -0.45%  [.] sinsp_thread_manager::get_thread_ref
     2.06%     -0.40%  [.] scap_event_decode_params
     1.02%     +0.37%  [.] sinsp_parser::event_cleanup
     6.11%     +0.32%  [.] next_event_from_file
     0.84%     -0.30%  [.] scap_next

Heap diff from master - unit tests

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

Heap diff from master - scap file

peak heap memory consumption: -234B
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.0197         -0.0197           148           145           148           145
BM_sinsp_split_median                                          -0.0143         -0.0143           148           146           148           146
BM_sinsp_split_stddev                                          +2.7834         +2.7842             1             2             1             2
BM_sinsp_split_cv                                              +2.8594         +2.8602             0             0             0             0
BM_sinsp_concatenate_paths_relative_path_mean                  -0.0227         -0.0227            56            55            56            55
BM_sinsp_concatenate_paths_relative_path_median                -0.0542         -0.0542            56            53            56            53
BM_sinsp_concatenate_paths_relative_path_stddev               +15.7973        +15.8103             0             2             0             2
BM_sinsp_concatenate_paths_relative_path_cv                   +16.1874        +16.2007             0             0             0             0
BM_sinsp_concatenate_paths_empty_path_mean                     -0.0023         -0.0023            24            24            24            24
BM_sinsp_concatenate_paths_empty_path_median                   +0.0015         +0.0015            24            24            24            24
BM_sinsp_concatenate_paths_empty_path_stddev                   -0.8666         -0.8668             0             0             0             0
BM_sinsp_concatenate_paths_empty_path_cv                       -0.8663         -0.8664             0             0             0             0
BM_sinsp_concatenate_paths_absolute_path_mean                  +0.0391         +0.0391            55            58            55            58
BM_sinsp_concatenate_paths_absolute_path_median                +0.0562         +0.0562            55            59            55            59
BM_sinsp_concatenate_paths_absolute_path_stddev                +8.2513         +8.2472             0             1             0             1
BM_sinsp_concatenate_paths_absolute_path_cv                    +7.9032         +7.8992             0             0             0             0
BM_sinsp_split_container_image_mean                            +0.0108         +0.0108           384           388           384           388
BM_sinsp_split_container_image_median                          +0.0081         +0.0080           385           388           384           388
BM_sinsp_split_container_image_stddev                          -0.1314         -0.1311             2             2             2             2
BM_sinsp_split_container_image_cv                              -0.1407         -0.1404             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.43%. Comparing base (9ee57c8) to head (ffd8678).

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.38%   75.43%   +0.04%     
==========================================
  Files         264      266       +2     
  Lines       34014    34093      +79     
  Branches     5805     5805              
==========================================
+ Hits        25642    25717      +75     
- Misses       8372     8376       +4     
Flag Coverage Δ
libsinsp 75.43% <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

Signed-off-by: Andrea Terzolo <[email protected]>
@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
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

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