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

chore(driver/bpf): properly include sched.h in types.h since it uses TASK_COMM_LEN #2087

Merged
merged 1 commit into from
Sep 30, 2024

Conversation

FedeDP
Copy link
Contributor

@FedeDP FedeDP commented Sep 30, 2024

What type of PR is this?

/kind cleanup

Any specific area of the project related to this PR?

/area driver-bpf

Does this PR require a change in the driver versions?

What this PR does / why we need it:

Per #2086 it might happen that none of the include before types.h does provide TASK_COMM_LEN declaration, ie: that linux/sched.h is not included by any of the linux/ headers included by quirks.h.
Since types.h needs TASK_COMM_LEN, make it directly include sched.h and avoid implicitly hoping for the inclusion of that macro.

Which issue(s) this PR fixes:

Fixes #2086

Special notes for your reviewer:

Does this PR introduce a user-facing change?:

NONE

@FedeDP
Copy link
Contributor Author

FedeDP commented Sep 30, 2024

/milestone next-driver

@poiana poiana added this to the next-driver milestone Sep 30, 2024
@poiana poiana added the size/XS label Sep 30, 2024
@poiana
Copy link
Contributor

poiana commented Sep 30, 2024

[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 /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

Copy link

Perf diff from master - unit tests

     2.86%     +0.94%  [.] sinsp_thread_manager::get_thread_ref
    12.25%     -0.72%  [.] sinsp_parser::reset
     1.37%     -0.71%  [.] 0x00000000000e9380
     4.23%     -0.69%  [.] sinsp_evt::load_params
     5.23%     +0.64%  [.] sinsp_evt::get_type
     1.42%     -0.63%  [.] std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::_M_construct<char*>
     2.55%     +0.62%  [.] sinsp_thread_manager::find_thread
     0.56%     +0.57%  [.] sinsp_utils::find_longest_matching_evt_param
     0.63%     +0.52%  [.] scap_event_encode_params_v
     0.90%     +0.50%  [.] libsinsp::events::is_unknown_event

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.0497         +0.0497           144           151           144           151
BM_sinsp_split_median                                          +0.0561         +0.0561           143           151           143           151
BM_sinsp_split_stddev                                          -0.5798         -0.5795             3             1             3             1
BM_sinsp_split_cv                                              -0.5997         -0.5994             0             0             0             0
BM_sinsp_concatenate_paths_relative_path_mean                  +0.0170         +0.0170            56            57            56            57
BM_sinsp_concatenate_paths_relative_path_median                +0.0098         +0.0098            56            57            56            57
BM_sinsp_concatenate_paths_relative_path_stddev                +3.3493         +3.3499             0             1             0             1
BM_sinsp_concatenate_paths_relative_path_cv                    +3.2765         +3.2771             0             0             0             0
BM_sinsp_concatenate_paths_empty_path_mean                     +0.0575         +0.0575            23            25            23            25
BM_sinsp_concatenate_paths_empty_path_median                   +0.0562         +0.0562            23            25            23            25
BM_sinsp_concatenate_paths_empty_path_stddev                   +1.2037         +1.2050             0             0             0             0
BM_sinsp_concatenate_paths_empty_path_cv                       +1.0839         +1.0852             0             0             0             0
BM_sinsp_concatenate_paths_absolute_path_mean                  +0.0053         +0.0053            56            56            56            56
BM_sinsp_concatenate_paths_absolute_path_median                +0.0044         +0.0044            55            56            55            56
BM_sinsp_concatenate_paths_absolute_path_stddev                +0.1154         +0.1146             0             0             0             0
BM_sinsp_concatenate_paths_absolute_path_cv                    +0.1095         +0.1088             0             0             0             0
BM_sinsp_split_container_image_mean                            +0.0135         +0.0134           392           397           392           397
BM_sinsp_split_container_image_median                          +0.0129         +0.0129           392           398           392           398
BM_sinsp_split_container_image_stddev                          -0.2248         -0.2260             2             2             2             2
BM_sinsp_split_container_image_cv                              -0.2351         -0.2362             0             0             0             0

Copy link

codecov bot commented Sep 30, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 73.58%. Comparing base (8baec4b) to head (f481ce0).
Report is 1 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #2087      +/-   ##
==========================================
- Coverage   73.58%   73.58%   -0.01%     
==========================================
  Files         253      253              
  Lines       31869    31869              
  Branches     5650     5632      -18     
==========================================
- Hits        23452    23451       -1     
+ Misses       8408     8390      -18     
- Partials        9       28      +19     
Flag Coverage Δ
libsinsp 73.58% <ø> (-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.

Copy link

X64 kernel testing matrix

KERNEL CMAKE-CONFIGURE KMOD BUILD KMOD SCAP-OPEN BPF-PROBE BUILD BPF-PROBE SCAP-OPEN MODERN-BPF SCAP-OPEN
amazonlinux2-4.19 🟢 🟢 🟢 🟢 🟢 🟡
amazonlinux2-5.10 🟢 🟢 🟢 🟢 🟢 🟢
amazonlinux2-5.15 🟢 🟢 🟢 🟢 🟢 🟢
amazonlinux2-5.4 🟢 🟢 🟢 🟢 🟢 🟡
amazonlinux2022-5.15 🟢 🟢 🟢 🟢 🟢 🟢
amazonlinux2023-6.1 🟢 🟢 🟢 🟢 🟢 🟢
archlinux-6.0 🟢 🟢 🟢 🟢 🟢 🟢
archlinux-6.7 🟢 🟢 🟢 🟢 🟢 🟢
centos-3.10 🟢 🟢 🟢 🟡 🟡 🟡
centos-4.18 🟢 🟢 🟢 🟢 🟢 🟢
centos-5.14 🟢 🟢 🟢 🟢 🟢 🟢
fedora-5.17 🟢 🟢 🟢 🟢 🟢 🟢
fedora-5.8 🟢 🟢 🟢 🟢 🟢 🟢
fedora-6.2 🟢 🟢 🟢 🟢 🟢 🟢
oraclelinux-3.10 🟢 🟢 🟢 🟡 🟡 🟡
oraclelinux-4.14 🟢 🟢 🟢 🟢 🟢 🟡
oraclelinux-5.15 🟢 🟢 🟢 🟢 🟢 🟢
oraclelinux-5.4 🟢 🟢 🟢 🟢 🟢 🟡
ubuntu-4.15 🟢 🟢 🟢 🟢 🟢 🟡
ubuntu-5.8 🟢 🟢 🟢 🟢 🟢 🟡
ubuntu-6.5 🟢 🟢 🟢 🟢 🟢 🟢

ARM64 kernel testing matrix

KERNEL CMAKE-CONFIGURE KMOD BUILD KMOD SCAP-OPEN BPF-PROBE BUILD BPF-PROBE SCAP-OPEN MODERN-BPF SCAP-OPEN
amazonlinux2-5.4 🟢 🟢 🟢 🟢 🟢 🟡
amazonlinux2022-5.15 🟢 🟢 🟢 🟢 🟢 🟢
fedora-6.2 🟢 🟢 🟢 🟢 🟢 🟢
oraclelinux-4.14 🟢 🟢 🟢 🟡 🟡 🟡
oraclelinux-5.15 🟢 🟢 🟢 🟢 🟢 🟢
ubuntu-6.5 🟢 🟢 🟢 🟢 🟢 🟢

@poiana poiana merged commit 622b785 into master Sep 30, 2024
57 of 58 checks passed
@poiana poiana deleted the chore/include_sched branch September 30, 2024 15:52
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.

RSS_STAT_ARRAY compilation failure
4 participants