forked from KDE/heaptrack
-
Notifications
You must be signed in to change notification settings - Fork 2
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
Rebase heaptrack-d onto upstream master #1
Open
FeepingCreature
wants to merge
448
commits into
tim-dlang:heaptrack-d
Choose a base branch
from
FeepingCreature:heaptrack-d
base: heaptrack-d
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Rebase heaptrack-d onto upstream master #1
FeepingCreature
wants to merge
448
commits into
tim-dlang:heaptrack-d
from
FeepingCreature:heaptrack-d
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Assimilates behavior with hotspot
Calling __libc_freeres is dangerous when we are not the last library that gets its cleanup handler called. Sadly, there is no way to make us reliably get into that last spot, see also: https://sourceware.org/bugzilla/show_bug.cgi?id=28248 If we call __libc_freeres we might trigger cleanup of plugins too early, which can then result in runtime crashes on exit: ``` (gdb) bt #0 0x00007fffe9c4d340 in ?? () tim-dlang#1 0x00007ffff06033ac in ?? () from /usr/lib/qt/plugins/kf5/sonnet/sonnet_aspell.so KDE#2 0x00007ffff66c7ba2 in ?? () from /usr/lib/libQt5Core.so.5 KDE#3 0x00007ffff66cbef5 in ?? () from /usr/lib/libQt5Core.so.5 KDE#4 0x00007ffff66c9319 in ?? () from /usr/lib/libQt5Core.so.5 KDE#5 0x00007ffff6076a8e in __cxa_finalize () from /usr/lib/libc.so.6 KDE#6 0x00007ffff64ca478 in ?? () from /usr/lib/libQt5Core.so.5 KDE#7 0x00007fffffffc730 in ?? () KDE#8 0x00007ffff7fdd1a4 in _dl_fini () from /lib64/ld-linux-x86-64.so.2 ``` Instead, we now ship with a (small for now, patches welcome!) list of builtin suppressions which the user can disable if desired. CCBUG: 378765
Seems like cmake doesn't support binaries with spaces in them when using the makefile generator. It works for ninja, so let's just skip this when using make.
This then also allows us to show the avg size of allocations, which is mostly useful for the "more than 1KB" bucket. In the future, we could even use the total allocations as a separate y-axes.
Since KF5I18n is optional AND dependent on HEAPTRACK_BUILD_GUI, we have to call ki18n_install(po) conditionally on our own and in addition tell releaseme not to touch CMakeLists.txt to do the same. Otherwise releaseme adds the following code unconditionally at the end of the file: find_package(KF5I18n CONFIG REQUIRED) ki18n_install(po) ki18n_install checks for existence of po subdir and returns silently if none found, so it is safe for git sources too. Signed-off-by: Andreas Sturmlechner <asturm@gentoo.org>
Needed to detect client failures during heap-tracking. Note that set -e is not applicable here as we still have to wait for $debuggee even on client failure.
Signed-off-by: Snehit Sah <snehitsah@protonmail.com>
This fixes a bunch of deprecation warnings. We lose the ability to run the benchmarks on systems that only have the older mallinfo API, but I'm fine with that myself.
This way allocations/free done by it are tracked regardless of whether it's used via a dynamic override (e.g., preload) or directly via api.
This way we can clearly define the optional hooks, which applies to the new mi_* allocation functions but also some others that are not necessarily required for normal operation of heaptrack.
Hopefully this fixes the compilation when using -flto as reported by Christophe Giboudeaux.
Don't assume that dlopen will resolve the weak symbol. I guess this worked in the past but clearly does not work anymore. So instead, manually ask for the symbol via dlsym and call the function indirectly through that then.
In case of conflict in i18n, keep the version of the branch "ours" To resolve a particular conflict, "git checkout --ours path/to/file.desktop"
These are only used for assertions
I removed the unneeded contents of the tarball, i.e. tests, doxygen and ci setup files. While at it, also leverage the proper cmake target from upstream
This way we don't get compiler warnings in those headers that are outside of our control.
In case of conflict in i18n, keep the version of the branch "ours" To resolve a particular conflict, "git checkout --ours path/to/file.desktop"
Apparently this isn't available on freebsd
(while at it, -Werror=return-type is always good to have, too)
In case of conflict in i18n, keep the version of the branch "ours" To resolve a particular conflict, "git checkout --ours path/to/file.desktop"
In case of conflict in i18n, keep the version of the branch "ours" To resolve a particular conflict, "git checkout --ours path/to/file.desktop"
When using it, druntime has to be linked dynamically. It also only works, when the application is launched by heaptrack, and not, when heaptrack is attached later. The modified heaptrack will now only work with D applications.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
No description provided.