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

Add unwind information eviction #125

Merged
merged 1 commit into from
Jan 3, 2025
Merged

Conversation

javierhonduco
Copy link
Owner

This rather large commit adds unwind information eviction. This can be triggered in two ways: if an unwind information bucket is full, object file that last appeared in the profiles will be evicted to leave space for the new unwind info. There's also a new flag
(--max-native-unwind-info-size-mb) that will be used as a rough limit for the size of BPF maps used to store unwind information.

By default there's no limit on the unwind info stored in BPF maps.

Additionally, there's a new event to notify of addresses don't have unwind information as now this can happen after an eviction.

Several other changes were made too, such as a bugfis on how the unwind info pages were being deleted, and the addition of --enable-deadlock-detector to start a thread that checks for deadlocks in parking_lot's locking facilities.

Future changes

Something that stood out during the development of this feature is that the generation of compact unwind information from .eh_frame data might be called more frequently. This is perhaps something worth caching on disk, but that'll happen in another PR.

Test Plan

Ran for a while without issues, also with lower memory limits set.

This rather large commit adds unwind information eviction. This can be
triggered in two ways: if an unwind information bucket is full, object
file that last appeared in the profiles will be evicted to leave space
for the new unwind info. There's also a new flag
(`--max-native-unwind-info-size-mb`) that will be used as a rough limit
for the size of BPF maps used to store unwind information.

By default there's no limit on the unwind info stored in BPF maps.

Additionally, there's a new event to notify of addresses don't have
unwind information as now this can happen after an eviction.

Several other changes were made too, such as a bugfis on how the unwind
info pages were being deleted, and the addition of
`--enable-deadlock-detector` to start a thread that checks for deadlocks
in `parking_lot`'s locking facilities.

Future changes
==============

Something that stood out during the development of this feature is that
the generation of compact unwind information from .eh_frame data might
be called more frequently. This is perhaps something worth caching on
disk, but that'll happen in another PR.

Test Plan
=========

Ran for a while without issues, also with lower memory limits set.
@javierhonduco javierhonduco merged commit 0c2e122 into main Jan 3, 2025
4 checks passed
@javierhonduco javierhonduco deleted the unwind-information-eviction branch January 3, 2025 15:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant