From 84b0f629c1e1a8692eb1c489f0dd7110476876e3cb30814ade59b69e793f860c Mon Sep 17 00:00:00 2001 From: Luca Beltrame Date: Wed, 23 May 2018 14:05:34 +0000 Subject: [PATCH 1/3] Accepting request 611656 from home:Vogtinator:branches:KDE:Extra - Update to version 1.1.0: * Stability and performance improvements * When extended debug information is available, stack traces now include inlined frames. * Split debug information in separate files is now supported. * Compressed debug information is properly handled. * The embedded flamegraph view is now searchable. * More details available on https://www.kdab.com/heaptrack-v1-1-0-release/ - Remove patches, now upstream: * fix-build.patch OBS-URL: https://build.opensuse.org/request/show/611656 OBS-URL: https://build.opensuse.org/package/show/KDE:Extra/heaptrack?expand=0&rev=5 --- fix-build.patch | 137 ----------------------------------------- heaptrack-1.0.0.tar.xz | 3 - heaptrack-1.1.0.tar.xz | 3 + heaptrack.changes | 13 ++++ heaptrack.spec | 24 ++++---- 5 files changed, 27 insertions(+), 153 deletions(-) delete mode 100644 fix-build.patch delete mode 100644 heaptrack-1.0.0.tar.xz create mode 100644 heaptrack-1.1.0.tar.xz diff --git a/fix-build.patch b/fix-build.patch deleted file mode 100644 index ea56900..0000000 --- a/fix-build.patch +++ /dev/null @@ -1,137 +0,0 @@ -From f0a682550118b7019e74af71d9e8624902b8a984 Mon Sep 17 00:00:00 2001 -From: Milian Wolff -Date: Thu, 31 Aug 2017 09:51:34 +0200 -Subject: Use check_symbol_exists() to check if cfree() is available - -Thanks to Daniel Vratil for the initial work. - -heaptrack now compiles on Fedora rawhide and Arch Linux x86_64 -with glibc 2.26 or newer. - -Differential Revision: https://phabricator.kde.org/D7621 ---- - CMakeLists.txt | 5 +++++ - src/track/heaptrack_inject.cpp | 7 +------ - src/track/heaptrack_preload.cpp | 6 +----- - src/util/config.h.cmake | 4 ++++ - tests/manual/CMakeLists.txt | 4 ++++ - tests/manual/test.cpp | 6 ++++++ - 6 files changed, 21 insertions(+), 11 deletions(-) - -diff --git a/CMakeLists.txt b/CMakeLists.txt -index 0cdde70..7ff93df 100644 ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -73,6 +73,11 @@ if (NOT HAVE_LINUX_HEADERS) - message(FATAL_ERROR "You are missing some Linux headers required to compile heaptrack.") - endif() - -+# cfree() does not exist in glibc 2.26+. -+# See: https://bugs.kde.org/show_bug.cgi?id=383889 -+include(CheckSymbolExists) -+check_symbol_exists(cfree malloc.h HAVE_CFREE) -+ - set(BIN_INSTALL_DIR "bin") - set(LIB_SUFFIX "" CACHE STRING "Define suffix of directory name (32/64)") - set(LIB_INSTALL_DIR "lib${LIB_SUFFIX}") -diff --git a/src/track/heaptrack_inject.cpp b/src/track/heaptrack_inject.cpp -index 93508e0..c24a266 100644 ---- a/src/track/heaptrack_inject.cpp -+++ b/src/track/heaptrack_inject.cpp -@@ -18,6 +18,7 @@ - */ - - #include "libheaptrack.h" -+#include "util/config.h" - - #include - #include -@@ -43,12 +44,6 @@ - #error unsupported word size - #endif - --#if defined(_BSD_SOURCE) || defined(_SVID_SOURCE) || defined(__USE_MISC) --#define HAVE_CFREE 1 --#else --#define HAVE_CFREE 0 --#endif -- - namespace { - - namespace Elf { -diff --git a/src/track/heaptrack_preload.cpp b/src/track/heaptrack_preload.cpp -index d8dde24..b77774a 100644 ---- a/src/track/heaptrack_preload.cpp -+++ b/src/track/heaptrack_preload.cpp -@@ -18,6 +18,7 @@ - */ - - #include "libheaptrack.h" -+#include "util/config.h" - - #include - #include -@@ -30,7 +31,6 @@ using namespace std; - using namespace std; - - #define HAVE_ALIGNED_ALLOC defined(_ISOC11_SOURCE) --#define HAVE_CFREE (defined(_BSD_SOURCE) || defined(_SVID_SOURCE) || defined(__USE_MISC)) - - namespace { - -diff --git a/src/util/config.h.cmake b/src/util/config.h.cmake -index 7bad362..861c1f7 100644 ---- a/src/util/config.h.cmake -+++ b/src/util/config.h.cmake -@@ -30,4 +30,8 @@ - - #define HEAPTRACK_DEBUG_BUILD @HEAPTRACK_DEBUG_BUILD@ - -+// cfree() does not exist in glibc 2.26+. -+// See: https://bugs.kde.org/show_bug.cgi?id=383889 -+#cmakedefine01 HAVE_CFREE -+ - #endif // HEAPTRACK_CONFIG_H -diff --git a/tests/manual/CMakeLists.txt b/tests/manual/CMakeLists.txt -index fe9602b..8996201 100644 ---- a/tests/manual/CMakeLists.txt -+++ b/tests/manual/CMakeLists.txt -@@ -2,6 +2,10 @@ set(CMAKE_BUILD_TYPE Debug) - - add_executable(test_c test.c) - add_executable(test_cpp test.cpp) -+set_target_properties(test_cpp PROPERTIES -+ INCLUDE_DIRECTORIES ${CMAKE_CURRENT_BINARY_DIR}/../../src/ -+) -+ - add_executable(threaded threaded.cpp) - target_link_libraries(threaded ${CMAKE_THREAD_LIBS_INIT}) - -diff --git a/tests/manual/test.cpp b/tests/manual/test.cpp -index a77dbd7..4c7b0d2 100644 ---- a/tests/manual/test.cpp -+++ b/tests/manual/test.cpp -@@ -1,6 +1,8 @@ - #include - #include - -+#include "util/config.h" -+ - #define HAVE_ALIGNED_ALLOC defined(_ISOC11_SOURCE) - - struct Foo -@@ -60,7 +62,11 @@ int main() - - buf = calloc(5, 5); - printf("calloc: %p\n", buf); -+#if HAVE_CFREE - cfree(buf); -+#else -+ free(buf); -+#endif - - #if HAVE_ALIGNED_ALLOC - buf = aligned_alloc(16, 160); --- -cgit v0.11.2 - diff --git a/heaptrack-1.0.0.tar.xz b/heaptrack-1.0.0.tar.xz deleted file mode 100644 index 0b16bdb..0000000 --- a/heaptrack-1.0.0.tar.xz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:01d87ea1b424a67f943483ff141c0a32a46c5b6109834e2e832ebef898a4474f -size 853976 diff --git a/heaptrack-1.1.0.tar.xz b/heaptrack-1.1.0.tar.xz new file mode 100644 index 0000000..a9bdba1 --- /dev/null +++ b/heaptrack-1.1.0.tar.xz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:120f8b276f772aa3409fc3d628dbe7c4fa9d0d98cd710982b6007e6113e13f3b +size 900460 diff --git a/heaptrack.changes b/heaptrack.changes index 7c09bc4..2c4ccd5 100644 --- a/heaptrack.changes +++ b/heaptrack.changes @@ -1,3 +1,16 @@ +------------------------------------------------------------------- +Wed May 23 13:40:54 UTC 2018 - fabian@ritter-vogt.de + +- Update to version 1.1.0: + * Stability and performance improvements + * When extended debug information is available, stack traces now include inlined frames. + * Split debug information in separate files is now supported. + * Compressed debug information is properly handled. + * The embedded flamegraph view is now searchable. + * More details available on https://www.kdab.com/heaptrack-v1-1-0-release/ +- Remove patches, now upstream: + * fix-build.patch + ------------------------------------------------------------------- Sat Sep 2 15:03:19 UTC 2017 - wbauer@tmo.at diff --git a/heaptrack.spec b/heaptrack.spec index 6c74da0..9caddbc 100644 --- a/heaptrack.spec +++ b/heaptrack.spec @@ -1,7 +1,7 @@ # # spec file for package heaptrack # -# Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany. +# Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -12,36 +12,35 @@ # license that conforms to the Open Source Definition (Version 1.9) # published by the Open Source Initiative. -# Please submit bugfixes or comments via +# Please submit bugfixes or comments via http://bugs.opensuse.org/ # + %bcond_without lang Name: heaptrack -Version: 1.0.0 +Version: 1.1.0 Release: 0 %define kf5_version 5.26.0 Summary: Heap Memory Allocation Profiler License: LGPL-2.1+ Group: Development/Tools/Other -Url: https://userbase.kde.org/Heaptrack -Source0: https://download.kde.org/stable/heaptrack/%{version}/src/%{name}-%{version}.tar.xz -# PATCH-FIX-UPSTREAM -Patch: fix-build.patch +Url: https://userbase.kde.org/Heaptrack +Source0: https://download.kde.org/stable/heaptrack/%{version}/%{name}-%{version}.tar.xz # Needs office-chart-area icon BuildRequires: breeze5-icons BuildRequires: extra-cmake-modules -BuildRequires: cmake(Qt5Core) >= 5.2.0 -BuildRequires: cmake(Qt5DBus) -BuildRequires: cmake(Qt5Widgets) BuildRequires: kf5-filesystem BuildRequires: cmake(KChart) >= 2.6.0 +BuildRequires: cmake(KF5ConfigWidgets) BuildRequires: cmake(KF5CoreAddons) BuildRequires: cmake(KF5I18n) BuildRequires: cmake(KF5ItemModels) BuildRequires: cmake(KF5KIO) BuildRequires: cmake(KF5ThreadWeaver) -BuildRequires: cmake(KF5ConfigWidgets) +BuildRequires: cmake(Qt5Core) >= 5.2.0 +BuildRequires: cmake(Qt5DBus) +BuildRequires: cmake(Qt5Widgets) %if 0%{?suse_version} >= 1330 BuildRequires: libboost_iostreams-devel BuildRequires: libboost_program_options-devel @@ -50,8 +49,8 @@ BuildRequires: boost-devel %endif BuildRequires: libdwarf-devel BuildRequires: libunwind-devel -BuildRequires: zlib-devel BuildRequires: update-desktop-files +BuildRequires: zlib-devel Recommends: %{name}-lang Suggests: heaptrack-gui BuildRoot: %{_tmppath}/%{name}-%{version}-build @@ -65,7 +64,6 @@ A memory profiler for Linux, tracking heap allocations. %prep %setup -q -%patch -p1 # Disable building tests, they're not used and post-build-checks trips over it sed -i"" '/add_subdirectory(tests)/d' CMakeLists.txt From 10a4924dbb3dc1adb0734cdb81802f1547df334486bbdf1334e3b6b1adef0df3 Mon Sep 17 00:00:00 2001 From: Fabian Vogt Date: Wed, 23 May 2018 15:25:12 +0000 Subject: [PATCH 2/3] Accepting request 611710 from home:wolfi323:branches:KDE:Extra - Add Fix-compile-on-32bit.patch to make it build on 32bit (kde#394330) - Don't install office-chart-area icon from breeze to hicolor anymore, heaptrack comes with its own application icon now - Mark license files as %license instead of %doc - Install README.md as well, it contains instructions on how to use it OBS-URL: https://build.opensuse.org/request/show/611710 OBS-URL: https://build.opensuse.org/package/show/KDE:Extra/heaptrack?expand=0&rev=6 --- Fix-compile-on-32bit.patch | 29 +++++++++++++++++++++++++++++ heaptrack.changes | 11 +++++++++++ heaptrack.spec | 17 ++++++++--------- 3 files changed, 48 insertions(+), 9 deletions(-) create mode 100644 Fix-compile-on-32bit.patch diff --git a/Fix-compile-on-32bit.patch b/Fix-compile-on-32bit.patch new file mode 100644 index 0000000..859c82e --- /dev/null +++ b/Fix-compile-on-32bit.patch @@ -0,0 +1,29 @@ +From 76fd2e84ba133e96d2cfdf90cb715e66e923eb8f Mon Sep 17 00:00:00 2001 +From: Milian Wolff +Date: Thu, 17 May 2018 13:31:25 +0200 +Subject: Fix compile on 32bit + +BUG: 394330 +--- + src/util/linewriter.h | 5 +++++ + 1 file changed, 5 insertions(+) + +diff --git a/src/util/linewriter.h b/src/util/linewriter.h +index 73a7930..e895e87 100644 +--- a/src/util/linewriter.h ++++ b/src/util/linewriter.h +@@ -158,6 +158,11 @@ public: + return __builtin_clzl(V); + } + ++ inline static unsigned clz(long long unsigned V) ++ { ++ return __builtin_clzll(V); ++ } ++ + template + static char* writeHexNumber(char* buffer, V value) + { +-- +cgit v0.11.2 + diff --git a/heaptrack.changes b/heaptrack.changes index 2c4ccd5..1c88684 100644 --- a/heaptrack.changes +++ b/heaptrack.changes @@ -1,3 +1,14 @@ +------------------------------------------------------------------- +Wed May 23 15:06:59 UTC 2018 - wbauer@tmo.at + +- Add Fix-compile-on-32bit.patch to make it build on 32bit + (kde#394330) +- Don't install office-chart-area icon from breeze to hicolor + anymore, heaptrack comes with its own application icon now +- Mark license files as %license instead of %doc +- Install README.md as well, it contains instructions on how to use + it + ------------------------------------------------------------------- Wed May 23 13:40:54 UTC 2018 - fabian@ritter-vogt.de diff --git a/heaptrack.spec b/heaptrack.spec index 9caddbc..5eff018 100644 --- a/heaptrack.spec +++ b/heaptrack.spec @@ -27,8 +27,8 @@ License: LGPL-2.1+ Group: Development/Tools/Other Url: https://userbase.kde.org/Heaptrack Source0: https://download.kde.org/stable/heaptrack/%{version}/%{name}-%{version}.tar.xz -# Needs office-chart-area icon -BuildRequires: breeze5-icons +# PATCH-FIX-UPSTREAM +Patch: Fix-compile-on-32bit.patch BuildRequires: extra-cmake-modules BuildRequires: kf5-filesystem BuildRequires: cmake(KChart) >= 2.6.0 @@ -64,6 +64,7 @@ A memory profiler for Linux, tracking heap allocations. %prep %setup -q +%patch -p1 # Disable building tests, they're not used and post-build-checks trips over it sed -i"" '/add_subdirectory(tests)/d' CMakeLists.txt @@ -76,9 +77,6 @@ sed -i"" '/add_subdirectory(tests)/d' CMakeLists.txt %if %{with lang} %find_lang %{name} --all-name %endif - # Install icon from breeze - mkdir -p %{buildroot}%{_kf5_iconsdir}/hicolor/scalable/apps/ - cp %{_kf5_iconsdir}/breeze/actions/24/office-chart-area.svg %{buildroot}%{_kf5_iconsdir}/hicolor/scalable/apps/ # Fixup desktop file %suse_update_desktop_file org.kde.heaptrack Development Profiling @@ -101,19 +99,20 @@ A Qt5/KF5 based GUI for Heaptrack. %files %defattr(-,root,root) -%doc COPYING* +%license COPYING* +%doc README.md %{_kf5_bindir}/heaptrack %{_kf5_bindir}/heaptrack_print %{_libexecdir}/heaptrack %files devel %defattr(-,root,root) -%doc COPYING* +%license COPYING* %{_includedir}/heaptrack_api.h %files gui %defattr(-,root,root) -%doc COPYING* +%license COPYING* %{_kf5_bindir}/heaptrack_gui %{_datadir}/applications/org.kde.heaptrack.desktop %{_kf5_appstreamdir}/org.kde.heaptrack.appdata.xml @@ -123,7 +122,7 @@ A Qt5/KF5 based GUI for Heaptrack. %if %{with lang} %files lang -f %{name}.lang -%doc COPYING* +%license COPYING* %endif %changelog From 64728b858183c644cf515b2955ce03a9dc5f7f9a77a084647a7a1a989efb34fc Mon Sep 17 00:00:00 2001 From: Fabian Vogt Date: Wed, 23 May 2018 15:26:03 +0000 Subject: [PATCH 3/3] Run spec-cleaner OBS-URL: https://build.opensuse.org/package/show/KDE:Extra/heaptrack?expand=0&rev=7 --- heaptrack.spec | 24 ++++++++++-------------- 1 file changed, 10 insertions(+), 14 deletions(-) diff --git a/heaptrack.spec b/heaptrack.spec index 5eff018..bc7d428 100644 --- a/heaptrack.spec +++ b/heaptrack.spec @@ -16,21 +16,24 @@ # +%define kf5_version 5.26.0 %bcond_without lang - Name: heaptrack Version: 1.1.0 Release: 0 -%define kf5_version 5.26.0 Summary: Heap Memory Allocation Profiler License: LGPL-2.1+ Group: Development/Tools/Other Url: https://userbase.kde.org/Heaptrack Source0: https://download.kde.org/stable/heaptrack/%{version}/%{name}-%{version}.tar.xz # PATCH-FIX-UPSTREAM -Patch: Fix-compile-on-32bit.patch +Patch0: Fix-compile-on-32bit.patch BuildRequires: extra-cmake-modules BuildRequires: kf5-filesystem +BuildRequires: libdwarf-devel +BuildRequires: libunwind-devel +BuildRequires: update-desktop-files +BuildRequires: zlib-devel BuildRequires: cmake(KChart) >= 2.6.0 BuildRequires: cmake(KF5ConfigWidgets) BuildRequires: cmake(KF5CoreAddons) @@ -41,19 +44,14 @@ BuildRequires: cmake(KF5ThreadWeaver) BuildRequires: cmake(Qt5Core) >= 5.2.0 BuildRequires: cmake(Qt5DBus) BuildRequires: cmake(Qt5Widgets) +Recommends: %{name}-lang +Suggests: heaptrack-gui %if 0%{?suse_version} >= 1330 BuildRequires: libboost_iostreams-devel BuildRequires: libboost_program_options-devel %else BuildRequires: boost-devel %endif -BuildRequires: libdwarf-devel -BuildRequires: libunwind-devel -BuildRequires: update-desktop-files -BuildRequires: zlib-devel -Recommends: %{name}-lang -Suggests: heaptrack-gui -BuildRoot: %{_tmppath}/%{name}-%{version}-build %description A memory profiler for Linux, tracking heap allocations. @@ -64,7 +62,8 @@ A memory profiler for Linux, tracking heap allocations. %prep %setup -q -%patch -p1 +%autopatch -p1 + # Disable building tests, they're not used and post-build-checks trips over it sed -i"" '/add_subdirectory(tests)/d' CMakeLists.txt @@ -98,7 +97,6 @@ Requires: %{name} = %{version} A Qt5/KF5 based GUI for Heaptrack. %files -%defattr(-,root,root) %license COPYING* %doc README.md %{_kf5_bindir}/heaptrack @@ -106,12 +104,10 @@ A Qt5/KF5 based GUI for Heaptrack. %{_libexecdir}/heaptrack %files devel -%defattr(-,root,root) %license COPYING* %{_includedir}/heaptrack_api.h %files gui -%defattr(-,root,root) %license COPYING* %{_kf5_bindir}/heaptrack_gui %{_datadir}/applications/org.kde.heaptrack.desktop