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

Rebase heaptrack-d onto upstream master #1

Open
wants to merge 448 commits into
base: heaptrack-d
Choose a base branch
from

Conversation

FeepingCreature
Copy link

No description provided.

milianw and others added 30 commits September 24, 2021 15:28
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.
l10n daemon script and others added 30 commits September 15, 2023 02:28
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
Labels
None yet
Projects
None yet