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

fix: some issues with Clang 18 #2201

Merged

Conversation

federico-sysdig
Copy link
Contributor

What type of PR is this?

/kind bug
/kind cleanup

Any specific area of the project related to this PR?
/area build

Does this PR require a change in the driver versions?
No

What this PR does / why we need it:
Fix a few warnings and errors that came up during a build with Clang 18.
In addition, I've been working with a simplified version of CMakePresets.json where parameters common to several presets are factored out in a base preset. I took the liberty of adding these minor changes here.

Which issue(s) this PR fixes:
Compilation errors and warnings with recent compilers.

Fixes #
n/a

Does this PR introduce a user-facing change?:
No

NONE

Signed-off-by: Federico Aponte <[email protected]>
@poiana
Copy link
Contributor

poiana commented Dec 13, 2024

LGTM label has been added.

Git tree hash: 85d518fc472139405d73fe5a0015e8e1d122139c

@Andreagit97 Andreagit97 added this to the 0.20.0 milestone Dec 13, 2024
Copy link

Perf diff from master - unit tests

     5.66%     +1.32%  [.] next_event_from_file
     1.11%     +1.07%  [.] sinsp::fetch_next_event
     8.27%     -0.97%  [.] sinsp_evt::get_type
     2.32%     -0.86%  [.] scap_event_decode_params
     4.45%     -0.72%  [.] gzfile_read
    10.09%     +0.68%  [.] sinsp::next
     1.94%     +0.67%  [.] next
     3.62%     -0.46%  [.] sinsp_thread_manager::get_thread_ref
     2.99%     -0.43%  [.] sinsp_parser::process_event
     0.85%     +0.38%  [.] sinsp_evt::get_syscall_return_value

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.0049         +0.0049           152           152           152           152
BM_sinsp_split_median                                          +0.0035         +0.0035           152           152           152           152
BM_sinsp_split_stddev                                          -0.0761         -0.0761             2             2             2             2
BM_sinsp_split_cv                                              -0.0807         -0.0806             0             0             0             0
BM_sinsp_concatenate_paths_relative_path_mean                  +0.0863         +0.0863            57            61            57            61
BM_sinsp_concatenate_paths_relative_path_median                +0.0842         +0.0842            57            61            57            61
BM_sinsp_concatenate_paths_relative_path_stddev                -0.5341         -0.5335             0             0             0             0
BM_sinsp_concatenate_paths_relative_path_cv                    -0.5711         -0.5706             0             0             0             0
BM_sinsp_concatenate_paths_empty_path_mean                     +0.0490         +0.0490            24            25            24            25
BM_sinsp_concatenate_paths_empty_path_median                   +0.0430         +0.0430            24            25            24            25
BM_sinsp_concatenate_paths_empty_path_stddev                   +4.5143         +4.5093             0             0             0             0
BM_sinsp_concatenate_paths_empty_path_cv                       +4.2568         +4.2519             0             0             0             0
BM_sinsp_concatenate_paths_absolute_path_mean                  +0.1382         +0.1382            56            64            56            64
BM_sinsp_concatenate_paths_absolute_path_median                +0.1421         +0.1421            56            64            56            64
BM_sinsp_concatenate_paths_absolute_path_stddev                -0.7810         -0.7810             1             0             1             0
BM_sinsp_concatenate_paths_absolute_path_cv                    -0.8076         -0.8076             0             0             0             0
BM_sinsp_split_container_image_mean                            +0.0274         +0.0274           382           393           382           393
BM_sinsp_split_container_image_median                          +0.0285         +0.0285           383           393           383           393
BM_sinsp_split_container_image_stddev                          +0.9225         +0.9239             2             4             2             4
BM_sinsp_split_container_image_cv                              +0.8713         +0.8726             0             0             0             0

Copy link

codecov bot commented Dec 13, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 75.19%. Comparing base (34cbe7e) to head (0fae847).
Report is 1 commits behind head on master.

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #2201   +/-   ##
=======================================
  Coverage   75.19%   75.19%           
=======================================
  Files         261      261           
  Lines       33878    33878           
  Branches     5801     5801           
=======================================
  Hits        25475    25475           
  Misses       8403     8403           
Flag Coverage Δ
libsinsp 75.19% <100.00%> (ø)

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
Member

@Andreagit97 Andreagit97 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 13, 2024

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: Andreagit97, federico-sysdig

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 07a16e9 into falcosecurity:master Dec 13, 2024
48 of 49 checks passed
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.

4 participants