diff options
-rw-r--r-- | meta-oe/recipes-devtools/heaptrack/heaptrack/0001-track-Check-for-unw_set_caching_policy-before-using.patch | 41 | ||||
-rw-r--r-- | meta-oe/recipes-devtools/heaptrack/heaptrack_1.2.0.bb | 1 |
2 files changed, 42 insertions, 0 deletions
diff --git a/meta-oe/recipes-devtools/heaptrack/heaptrack/0001-track-Check-for-unw_set_caching_policy-before-using.patch b/meta-oe/recipes-devtools/heaptrack/heaptrack/0001-track-Check-for-unw_set_caching_policy-before-using.patch new file mode 100644 index 0000000000..a6547eded8 --- /dev/null +++ b/meta-oe/recipes-devtools/heaptrack/heaptrack/0001-track-Check-for-unw_set_caching_policy-before-using.patch | |||
@@ -0,0 +1,41 @@ | |||
1 | From bcfc4c8d7dc70bd81367c183a68cc9ee02ab4744 Mon Sep 17 00:00:00 2001 | ||
2 | From: Khem Raj <raj.khem@gmail.com> | ||
3 | Date: Fri, 28 May 2021 17:52:57 -0700 | ||
4 | Subject: [PATCH] track: Check for unw_set_caching_policy before using | ||
5 | |||
6 | llvm libunwind does not implement unw_cache_* functions yet | ||
7 | Include inttypes.h got PRI* macros | ||
8 | |||
9 | Upstream-Status: Submitted [https://github.com/KDE/heaptrack/pull/33] | ||
10 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
11 | --- | ||
12 | src/track/trace_libunwind.cpp | 3 +++ | ||
13 | 1 file changed, 3 insertions(+) | ||
14 | |||
15 | diff --git a/src/track/trace_libunwind.cpp b/src/track/trace_libunwind.cpp | ||
16 | index c76337c..96b2176 100644 | ||
17 | --- a/src/track/trace_libunwind.cpp | ||
18 | +++ b/src/track/trace_libunwind.cpp | ||
19 | @@ -26,6 +26,7 @@ | ||
20 | |||
21 | #define UNW_LOCAL_ONLY | ||
22 | #include <libunwind.h> | ||
23 | +#include <inttypes.h> | ||
24 | |||
25 | #include <stdio.h> | ||
26 | |||
27 | @@ -60,9 +61,11 @@ void Trace::print() | ||
28 | void Trace::setup() | ||
29 | { | ||
30 | // configure libunwind for better speed | ||
31 | +#if UNW_CACHE_PER_THREAD | ||
32 | if (unw_set_caching_policy(unw_local_addr_space, UNW_CACHE_PER_THREAD)) { | ||
33 | fprintf(stderr, "WARNING: Failed to enable per-thread libunwind caching.\n"); | ||
34 | } | ||
35 | +#endif | ||
36 | #if LIBUNWIND_HAS_UNW_SET_CACHE_SIZE | ||
37 | if (unw_set_cache_size(unw_local_addr_space, 1024, 0)) { | ||
38 | fprintf(stderr, "WARNING: Failed to set libunwind cache size.\n"); | ||
39 | -- | ||
40 | 2.31.1 | ||
41 | |||
diff --git a/meta-oe/recipes-devtools/heaptrack/heaptrack_1.2.0.bb b/meta-oe/recipes-devtools/heaptrack/heaptrack_1.2.0.bb index f2235afef3..207c45284f 100644 --- a/meta-oe/recipes-devtools/heaptrack/heaptrack_1.2.0.bb +++ b/meta-oe/recipes-devtools/heaptrack/heaptrack_1.2.0.bb | |||
@@ -14,6 +14,7 @@ SRC_URI = "git://github.com/KDE/heaptrack.git;protocol=https \ | |||
14 | file://0002-heaptrack_inject-Include-dlfcn.h-for-dlopen-dlclose.patch \ | 14 | file://0002-heaptrack_inject-Include-dlfcn.h-for-dlopen-dlclose.patch \ |
15 | file://0003-heaptrack_preload-Make-noexcept-attribute-conditiona.patch \ | 15 | file://0003-heaptrack_preload-Make-noexcept-attribute-conditiona.patch \ |
16 | file://0004-backtrace-Always-include-stdint.h.patch \ | 16 | file://0004-backtrace-Always-include-stdint.h.patch \ |
17 | file://0001-track-Check-for-unw_set_caching_policy-before-using.patch \ | ||
17 | " | 18 | " |
18 | 19 | ||
19 | SRCREV = "bc9e3744bcc47de978673d1e382f4125a1ab5fa8" | 20 | SRCREV = "bc9e3744bcc47de978673d1e382f4125a1ab5fa8" |