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(userspace/libsinsp): only link libanl if present. #2036

Merged
merged 1 commit into from
Sep 5, 2024

Conversation

FedeDP
Copy link
Contributor

@FedeDP FedeDP commented Aug 29, 2024

What type of PR is this?

/kind cleanup

Any specific area of the project related to this PR?

/area libsinsp

Does this PR require a change in the driver versions?

What this PR does / why we need it:

libanl is only available for glibc; only link it when it is present in the system.
Also, this is another step forward to support building libs with zig compiler.

Which issue(s) this PR fixes:

Fixes #1948

Special notes for your reviewer:

Does this PR introduce a user-facing change?:

NONE

Signed-off-by: Federico Di Pierro <nierro92@gmail.com>
@FedeDP
Copy link
Contributor Author

FedeDP commented Aug 29, 2024

Putting this in milestone 0.19.
/milestone 0.19.0

@poiana poiana added this to the 0.19.0 milestone Aug 29, 2024
Copy link

Perf diff from master - unit tests

     3.14%     +1.19%  [.] sinsp_thread_manager::get_thread_ref
     6.65%     +0.96%  [.] sinsp::next
     5.72%     -0.81%  [.] next
     1.27%     +0.73%  [.] 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> >::_M_find_before_node
     3.50%     -0.63%  [.] sinsp_thread_manager::find_thread
     9.57%     +0.60%  [.] sinsp_parser::reset
     1.20%     -0.52%  [.] sinsp_evt::get_direction
     0.21%     +0.42%  [.] scap_cgroup_resolve_v2
     0.81%     +0.40%  [.] 0x00000000000e93c0
     0.22%     +0.40%  [.] 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.0352         +0.0353           145           151           145           151
BM_sinsp_split_median                                          +0.0382         +0.0383           145           151           145           151
BM_sinsp_split_stddev                                          +0.2012         +0.1990             1             1             1             1
BM_sinsp_split_cv                                              +0.1603         +0.1581             0             0             0             0
BM_sinsp_concatenate_paths_relative_path_mean                  +0.1720         +0.1721            42            49            42            49
BM_sinsp_concatenate_paths_relative_path_median                +0.1874         +0.1875            42            50            42            50
BM_sinsp_concatenate_paths_relative_path_stddev                +2.2457         +2.2446             0             1             0             1
BM_sinsp_concatenate_paths_relative_path_cv                    +1.7694         +1.7682             0             0             0             0
BM_sinsp_concatenate_paths_empty_path_mean                     -0.0143         -0.0142            17            17            17            17
BM_sinsp_concatenate_paths_empty_path_median                   -0.0163         -0.0161            17            17            17            17
BM_sinsp_concatenate_paths_empty_path_stddev                   +0.1341         +0.1334             0             0             0             0
BM_sinsp_concatenate_paths_empty_path_cv                       +0.1505         +0.1498             0             0             0             0
BM_sinsp_concatenate_paths_absolute_path_mean                  +0.1577         +0.1578            43            50            43            50
BM_sinsp_concatenate_paths_absolute_path_median                +0.1581         +0.1582            43            50            43            50
BM_sinsp_concatenate_paths_absolute_path_stddev                -0.2176         -0.2166             0             0             0             0
BM_sinsp_concatenate_paths_absolute_path_cv                    -0.3242         -0.3233             0             0             0             0
BM_sinsp_split_container_image_mean                            -0.0037         -0.0036           349           347           349           347
BM_sinsp_split_container_image_median                          -0.0062         -0.0061           350           347           349           347
BM_sinsp_split_container_image_stddev                          -0.1194         -0.1197             3             3             3             3
BM_sinsp_split_container_image_cv                              -0.1162         -0.1165             0             0             0             0

Copy link

codecov bot commented Aug 29, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 74.31%. Comparing base (e2c5174) to head (3f713fa).
Report is 28 commits behind head on master.

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #2036   +/-   ##
=======================================
  Coverage   74.31%   74.31%           
=======================================
  Files         253      253           
  Lines       30966    30966           
  Branches     5403     5393   -10     
=======================================
  Hits        23011    23011           
+ Misses       7942     7927   -15     
- Partials       13       28   +15     
Flag Coverage Δ
libsinsp 74.31% <ø> (ø)

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

@Andreagit97 Andreagit97 modified the milestones: 0.19.0, 0.18.0 Sep 5, 2024
@poiana
Copy link
Contributor

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

@poiana poiana merged commit 0c67af0 into master Sep 5, 2024
47 checks passed
@poiana poiana deleted the chore/link_libanl_if_present branch September 5, 2024 06:40
@FedeDP
Copy link
Contributor Author

FedeDP commented Sep 5, 2024

/milestone 0.18.0

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.

Building on musl fails to link against libanl when not using static linking (aka MUSL_OPTIMIZED_BUILD)
4 participants