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(cmake): added zig workarounds for libelf and grpc cmake modules. #2049

Merged
merged 2 commits into from
Sep 20, 2024

Conversation

FedeDP
Copy link
Contributor

@FedeDP FedeDP commented Sep 10, 2024

What type of PR is this?

/kind bug

Any specific area of the project related to this PR?

/area build

Does this PR require a change in the driver versions?

What this PR does / why we need it:

Moreover, patch grpc cmake module to patch its abseil-cpp submodule to be compatible with gcc-13.

Which issue(s) this PR fixes:

Fixes #

Special notes for your reviewer:

Last patch for falcosecurity/falco#3307.
Actually, extracted from it.

Does this PR introduce a user-facing change?:

NONE

/milestone 0.19.0

@FedeDP
Copy link
Contributor Author

FedeDP commented Sep 10, 2024

In a follow-up PR i will also add a zig CI for libs leveraging the Falco composite action to install zig: https://github.com/falcosecurity/falco/pull/3307/files#diff-4272283b257713d488f43b293b0303ea8d82c0aaa72265de68b5eebccde26b29

Copy link

github-actions bot commented Sep 10, 2024

Perf diff from master - unit tests

     9.98%     +1.06%  [.] sinsp_parser::reset
     3.56%     -0.70%  [.] sinsp_thread_manager::get_thread_ref
     5.29%     -0.54%  [.] next
     3.95%     +0.54%  [.] sinsp_parser::process_event
     4.53%     -0.49%  [.] sinsp_evt::load_params
     0.81%     +0.43%  [.] scap_event_has_large_payload
     0.59%     +0.39%  [.] 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> >::find
     1.29%     -0.36%  [.] std::vector<sinsp_evt_param, std::allocator<sinsp_evt_param> >::emplace_back<sinsp_evt*, unsigned int&, char const*, unsigned long&>
     1.38%     -0.36%  [.] scap_event_encode_params_v
     0.80%     -0.35%  [.] sinsp_parser::parse_clone_exit_child

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.0064         +0.0064           147           148           147           148
BM_sinsp_split_median                                          +0.0116         +0.0116           146           148           146           148
BM_sinsp_split_stddev                                          -0.4075         -0.4075             2             1             2             1
BM_sinsp_split_cv                                              -0.4113         -0.4113             0             0             0             0
BM_sinsp_concatenate_paths_relative_path_mean                  +0.1012         +0.1012            42            47            42            47
BM_sinsp_concatenate_paths_relative_path_median                +0.1023         +0.1022            42            47            42            47
BM_sinsp_concatenate_paths_relative_path_stddev                +0.0260         +0.0277             0             0             0             0
BM_sinsp_concatenate_paths_relative_path_cv                    -0.0683         -0.0667             0             0             0             0
BM_sinsp_concatenate_paths_empty_path_mean                     +0.0064         +0.0064            17            17            17            17
BM_sinsp_concatenate_paths_empty_path_median                   -0.0002         -0.0002            17            17            17            17
BM_sinsp_concatenate_paths_empty_path_stddev                   +0.7940         +0.7951             0             0             0             0
BM_sinsp_concatenate_paths_empty_path_cv                       +0.7826         +0.7837             0             0             0             0
BM_sinsp_concatenate_paths_absolute_path_mean                  +0.0304         +0.0304            46            47            46            47
BM_sinsp_concatenate_paths_absolute_path_median                +0.0313         +0.0312            46            47            46            47
BM_sinsp_concatenate_paths_absolute_path_stddev                -0.5535         -0.5541             0             0             0             0
BM_sinsp_concatenate_paths_absolute_path_cv                    -0.5667         -0.5672             0             0             0             0
BM_sinsp_split_container_image_mean                            -0.0344         -0.0344           366           354           366           354
BM_sinsp_split_container_image_median                          -0.0351         -0.0352           366           353           366           353
BM_sinsp_split_container_image_stddev                          +0.2107         +0.2104             2             3             2             3
BM_sinsp_split_container_image_cv                              +0.2539         +0.2536             0             0             0             0

Copy link

codecov bot commented Sep 10, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 73.58%. Comparing base (215db2d) to head (7a2588f).
Report is 22 commits behind head on master.

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #2049   +/-   ##
=======================================
  Coverage   73.57%   73.58%           
=======================================
  Files         253      253           
  Lines       31860    31867    +7     
  Branches     5640     5655   +15     
=======================================
+ Hits        23442    23450    +8     
- Misses       8407     8417   +10     
+ Partials       11        0   -11     
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.

@FedeDP
Copy link
Contributor Author

FedeDP commented Sep 10, 2024

/hold

@FedeDP
Copy link
Contributor Author

FedeDP commented Sep 10, 2024

/reopen

@poiana poiana reopened this Sep 10, 2024
@poiana
Copy link
Contributor

poiana commented Sep 10, 2024

@FedeDP: Reopened this PR.

In response to this:

/reopen

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.

@poiana poiana added size/M and removed size/XS labels Sep 10, 2024
@poiana
Copy link
Contributor

poiana commented Sep 10, 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

1 similar comment
@poiana
Copy link
Contributor

poiana commented Sep 10, 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

@FedeDP
Copy link
Contributor Author

FedeDP commented Sep 10, 2024

/unhold

message(STATUS "Found LIBELF: include: ${LIBELF_INCLUDE}, lib: ${LIBELF_LIB}")
else()
message(FATAL_ERROR "Couldn't find system libelf")
endif()
# We add a custom target, in this way we can always depend on `libelf` without distinguishing
# between "bundled" and "not-bundled" case
add_custom_target(libelf)
Copy link
Contributor Author

Choose a reason for hiding this comment

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

No need for this since it is already present at the end of the file.

@poiana poiana merged commit b9ec98f into master Sep 20, 2024
47 checks passed
@poiana poiana deleted the cmake/zig_workarounds branch September 20, 2024 13:38
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