From 5da44d9d0b16f4793f961a76237d586cd3bc77d0 Mon Sep 17 00:00:00 2001 From: Pablo Saavedra Date: Mon, 11 Nov 2024 18:04:27 +0100 Subject: sysprof: Upgrade to 47.1 The versioning scheme was changed to align to GNOME releases. This version resolves stack frames properly, as opposed to 3.48. Depends on libdex/libpanel recipes to be able to build the sysprof UI, besides the sysprof-cli executable. Co-Authored-By: Nikolas Zimmermann Signed-off-by: Pablo Saavedra Signed-off-by: Khem Raj --- ...Check-for-unw_set_caching_policy-before-u.patch | 27 ----------- ...-for-libunwind-instead-of-libunwind-gener.patch | 28 ++++++------ ...t-invoke-the-commands-to-update-the-icon-.patch | 9 ++-- ...Check-for-unw_set_caching_policy-before-u.patch | 32 +++++++++++++ meta-gnome/recipes-gnome/sysprof/sysprof_3.48.0.bb | 53 ---------------------- meta-gnome/recipes-gnome/sysprof/sysprof_47.1.bb | 50 ++++++++++++++++++++ 6 files changed, 100 insertions(+), 99 deletions(-) delete mode 100644 meta-gnome/recipes-gnome/sysprof/sysprof/0001-libsysprof-Check-for-unw_set_caching_policy-before-u.patch create mode 100644 meta-gnome/recipes-gnome/sysprof/sysprof/0003-libsysprof-Check-for-unw_set_caching_policy-before-u.patch delete mode 100644 meta-gnome/recipes-gnome/sysprof/sysprof_3.48.0.bb create mode 100644 meta-gnome/recipes-gnome/sysprof/sysprof_47.1.bb diff --git a/meta-gnome/recipes-gnome/sysprof/sysprof/0001-libsysprof-Check-for-unw_set_caching_policy-before-u.patch b/meta-gnome/recipes-gnome/sysprof/sysprof/0001-libsysprof-Check-for-unw_set_caching_policy-before-u.patch deleted file mode 100644 index 2dca95dac5..0000000000 --- a/meta-gnome/recipes-gnome/sysprof/sysprof/0001-libsysprof-Check-for-unw_set_caching_policy-before-u.patch +++ /dev/null @@ -1,27 +0,0 @@ -From a3316e607db2a64e030df8551455c5700b5ddfcf Mon Sep 17 00:00:00 2001 -From: Khem Raj -Date: Thu, 25 Jul 2024 20:18:17 -0700 -Subject: [PATCH] libsysprof: Check for unw_set_caching_policy before using - -llvm libunwind does not implement unw_cache_* functions yet - -Upstream-Status: Submitted [https://gitlab.gnome.org/GNOME/sysprof/-/merge_requests/95] -Signed-off-by: Khem Raj ---- - src/libsysprof/preload/backtrace-helper.h | 2 ++ - 1 file changed, 2 insertions(+) - -diff --git a/src/libsysprof/preload/backtrace-helper.h b/src/libsysprof/preload/backtrace-helper.h -index 88dc194..5c23ad3 100644 ---- a/src/libsysprof/preload/backtrace-helper.h -+++ b/src/libsysprof/preload/backtrace-helper.h -@@ -32,7 +32,9 @@ static void - backtrace_init (void) - { - #ifdef ENABLE_LIBUNWIND -+# ifdef UNW_CACHE_PER_THREAD - unw_set_caching_policy (unw_local_addr_space, UNW_CACHE_PER_THREAD); -+# endif - # ifdef HAVE_UNW_SET_CACHE_SIZE - unw_set_cache_size (unw_local_addr_space, 1024, 0); - #endif diff --git a/meta-gnome/recipes-gnome/sysprof/sysprof/0001-meson-Check-for-libunwind-instead-of-libunwind-gener.patch b/meta-gnome/recipes-gnome/sysprof/sysprof/0001-meson-Check-for-libunwind-instead-of-libunwind-gener.patch index ea9bdb2eb5..0dc7cb35a6 100644 --- a/meta-gnome/recipes-gnome/sysprof/sysprof/0001-meson-Check-for-libunwind-instead-of-libunwind-gener.patch +++ b/meta-gnome/recipes-gnome/sysprof/sysprof/0001-meson-Check-for-libunwind-instead-of-libunwind-gener.patch @@ -1,30 +1,32 @@ -From 19188367bee87b0084ab34869455155da5cb1731 Mon Sep 17 00:00:00 2001 -From: Khem Raj -Date: Wed, 13 Apr 2022 08:47:39 -0700 +From 779bbfebcd414a2cb4ab73ff1c4eb987cfdab456 Mon Sep 17 00:00:00 2001 +From: Pablo Saavedra +Date: Mon, 11 Nov 2024 13:05:15 +0100 Subject: [PATCH] meson: Check for libunwind instead of libunwind-generic This helps it to use llvm unwinder since libunwind-generic is specific to nongnu libunwind. Upstream-Status: Submitted [https://gitlab.gnome.org/GNOME/sysprof/-/merge_requests/95] + +Original-by: Khem Raj +Modified-by: Pablo Saavedra + Signed-off-by: Khem Raj +Signed-off-by: Pablo Saavedra --- meson.build | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/meson.build b/meson.build -index 3d3d8b5..4a1963d 100644 +index 96c1d09..86b9df4 100644 --- a/meson.build +++ b/meson.build -@@ -96,7 +96,7 @@ config_h.set10('HAVE_POLKIT', polkit_dep.found()) - if get_option('libunwind') - # Force libunwind usage if it's specified to avoid back compiles - # and backtrace() showing up in builds +@@ -107,7 +107,7 @@ polkit_dep = dependency('polkit-gobject-1', version: polkit_req_version, require + config_h.set10('HAVE_POLKIT', polkit_dep.found()) + + if need_libsysprof - libunwind_dep = dependency('libunwind-generic', required: true) + libunwind_dep = dependency('libunwind', required: true) config_h.set('ENABLE_LIBUNWIND', libunwind_dep.found()) - config_h.set('HAVE_UNW_SET_CACHE_SIZE', libunwind_dep.found() and cc.has_header_symbol('libunwind.h', 'unw_set_cache_size', dependencies: [libunwind_dep])) - endif --- -2.35.2 - + config_h.set('HAVE_UNW_SET_CACHE_SIZE', + cc.has_header_symbol('libunwind.h', diff --git a/meta-gnome/recipes-gnome/sysprof/sysprof/0002-meson-Do-not-invoke-the-commands-to-update-the-icon-.patch b/meta-gnome/recipes-gnome/sysprof/sysprof/0002-meson-Do-not-invoke-the-commands-to-update-the-icon-.patch index 998c20c657..77374ffc56 100644 --- a/meta-gnome/recipes-gnome/sysprof/sysprof/0002-meson-Do-not-invoke-the-commands-to-update-the-icon-.patch +++ b/meta-gnome/recipes-gnome/sysprof/sysprof/0002-meson-Do-not-invoke-the-commands-to-update-the-icon-.patch @@ -1,4 +1,4 @@ -From 9ad120283f4b61b97da67f18a95bb3b4f1e8a3b9 Mon Sep 17 00:00:00 2001 +From cc0c0b518d46bf82ad34eeea8d40496c9ad971dd Mon Sep 17 00:00:00 2001 From: Carlos Alberto Lopez Perez Date: Wed, 24 Jul 2024 15:51:05 +0100 Subject: [PATCH] meson: Do not invoke the commands to update the icon caches @@ -15,10 +15,10 @@ Signed-off-by: Carlos Alberto Lopez Perez 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/meson.build b/meson.build -index 3d3d8b5..da622f1 100644 +index 86b9df4..fe75ef9 100644 --- a/meson.build +++ b/meson.build -@@ -250,7 +250,7 @@ configure_file( +@@ -269,7 +269,7 @@ configure_file( configuration: config_h ) @@ -27,6 +27,3 @@ index 3d3d8b5..da622f1 100644 gnome.post_install( gtk_update_icon_cache: true, update_desktop_database: true --- -2.39.2 - diff --git a/meta-gnome/recipes-gnome/sysprof/sysprof/0003-libsysprof-Check-for-unw_set_caching_policy-before-u.patch b/meta-gnome/recipes-gnome/sysprof/sysprof/0003-libsysprof-Check-for-unw_set_caching_policy-before-u.patch new file mode 100644 index 0000000000..303e78a866 --- /dev/null +++ b/meta-gnome/recipes-gnome/sysprof/sysprof/0003-libsysprof-Check-for-unw_set_caching_policy-before-u.patch @@ -0,0 +1,32 @@ +From 68425b541e88f9f03a418cfda052b46b2a185e4e Mon Sep 17 00:00:00 2001 +From: Khem Raj +Date: Thu, 25 Jul 2024 20:18:17 -0700 +Subject: [PATCH] libsysprof: Check for unw_set_caching_policy before using + +llvm libunwind does not implement unw_cache_* functions yet + +Upstream-Status: Submitted [https://gitlab.gnome.org/GNOME/sysprof/-/merge_requests/95] + +Original-by: Khem Raj +Modified-by: Pablo Saavedra + +Signed-off-by: Khem Raj +Signed-off-by: Pablo Saavedra +--- + src/preload/backtrace-helper.h | 2 ++ + 1 file changed, 2 insertions(+) + +diff --git a/src/preload/backtrace-helper.h b/src/preload/backtrace-helper.h +index ac4f8e9..e60032d 100644 +--- a/src/preload/backtrace-helper.h ++++ b/src/preload/backtrace-helper.h +@@ -26,7 +26,9 @@ + static void + backtrace_init (void) + { ++# ifdef UNW_CACHE_PER_THREAD + unw_set_caching_policy (unw_local_addr_space, UNW_CACHE_PER_THREAD); ++#endif + #ifdef HAVE_UNW_SET_CACHE_SIZE + unw_set_cache_size (unw_local_addr_space, 1024, 0); + #endif diff --git a/meta-gnome/recipes-gnome/sysprof/sysprof_3.48.0.bb b/meta-gnome/recipes-gnome/sysprof/sysprof_3.48.0.bb deleted file mode 100644 index a02bd0c91a..0000000000 --- a/meta-gnome/recipes-gnome/sysprof/sysprof_3.48.0.bb +++ /dev/null @@ -1,53 +0,0 @@ -SUMMARY = "System-wide Performance Profiler for Linux" -HOMEPAGE = "http://www.sysprof.com" -LICENSE = "GPL-3.0-or-later" -LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504 \ - file://src/sysprof/sysprof-application.c;endline=17;md5=a3de8df3b0f8876dd01e1388d2d4b607" - -inherit gnomebase gnome-help gettext systemd upstream-version-is-even gsettings mime mime-xdg features_check - -DEPENDS += " \ - glib-2.0-native \ - yelp-tools-native \ - libxml2-native \ - glib-2.0 \ - json-glib \ -" - -SRC_URI += "file://0001-meson-Check-for-libunwind-instead-of-libunwind-gener.patch \ - file://0002-meson-Do-not-invoke-the-commands-to-update-the-icon-.patch \ - file://0001-libsysprof-Check-for-unw_set_caching_policy-before-u.patch \ - " -SRC_URI[archive.sha256sum] = "07d9081a66cf2fb52753f48ff2b85ada75c60ff1bc1af1bd14d8aeb627972168" - -# reason: gtk4 requires opengl distro feature -REQUIRED_DISTRO_FEATURES = "${@bb.utils.contains('PACKAGECONFIG', 'gtk', 'opengl', '', d)}" - -PACKAGECONFIG ?= "${@bb.utils.contains('DISTRO_FEATURES', 'polkit', 'sysprofd', '', d)} \ - ${@bb.utils.contains_any('DISTRO_FEATURES', '${GTK3DISTROFEATURES}', 'gtk', '', d)} \ - agent \ - libsysprof \ - libunwind \ - " -# nongnu libunwind needs porting to RV32 -PACKAGECONFIG:remove:riscv32 = "libunwind" - -PACKAGECONFIG[gtk] = "-Dgtk=true,-Dgtk=false,gtk4 libadwaita" -PACKAGECONFIG[sysprofd] = "-Dsysprofd=bundled,-Dsysprofd=none,polkit" -PACKAGECONFIG[libsysprof] = "-Dlibsysprof=true,-Dlibsysprof=false,json-glib" -PACKAGECONFIG[libunwind] = "-Dlibunwind=true,-Dlibunwind=false,libunwind" -PACKAGECONFIG[agent] = "-Dagent=true,-Dagent=false," - -EXTRA_OEMESON += "-Dsystemdunitdir=${systemd_unitdir}/system" - -SOLIBS = ".so" -FILES_SOLIBSDEV = "" - -SYSTEMD_SERVICE:${PN} = "${@bb.utils.contains('PACKAGECONFIG', 'sysprofd', 'sysprof2.service sysprof3.service', '', d)}" - -FILES:${PN} += " \ - ${datadir}/dbus-1/system-services \ - ${datadir}/dbus-1/system.d \ - ${datadir}/dbus-1/interfaces \ - ${datadir}/metainfo \ -" diff --git a/meta-gnome/recipes-gnome/sysprof/sysprof_47.1.bb b/meta-gnome/recipes-gnome/sysprof/sysprof_47.1.bb new file mode 100644 index 0000000000..e1b7be5180 --- /dev/null +++ b/meta-gnome/recipes-gnome/sysprof/sysprof_47.1.bb @@ -0,0 +1,50 @@ +SUMMARY = "System-wide Performance Profiler for Linux" +HOMEPAGE = "http://www.sysprof.com" +LICENSE = "GPL-3.0-or-later" +LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504 \ + file://src/sysprof/sysprof-application.c;endline=17;md5=a3de8df3b0f8876dd01e1388d2d4b607" + +inherit gnomebase gnome-help gettext systemd gsettings gtk-icon-cache mime mime-xdg features_check + +DEPENDS += " \ + desktop-file-utils-native \ + glib-2.0 \ + glib-2.0-native \ + json-glib \ + libdex \ + libunwind \ + libxml2-native \ + yelp-tools-native \ +" + +SRC_URI += "file://0001-meson-Check-for-libunwind-instead-of-libunwind-gener.patch \ + file://0002-meson-Do-not-invoke-the-commands-to-update-the-icon-.patch \ + file://0003-libsysprof-Check-for-unw_set_caching_policy-before-u.patch \ + " +SRC_URI[archive.sha256sum] = "d3baba814be0cdaef28704c8004ff3110e99525422060f2a993a22a47b9334eb" + +# reason: gtk4 requires opengl distro feature +REQUIRED_DISTRO_FEATURES = "${@bb.utils.contains('PACKAGECONFIG', 'gtk', 'opengl', '', d)}" + +PACKAGECONFIG ?= "${@bb.utils.contains('DISTRO_FEATURES', 'polkit', 'sysprofd libsysprof', '', d)} \ + ${@bb.utils.contains_any('DISTRO_FEATURES', '${GTK3DISTROFEATURES}', 'gtk', '', d)} \ + " + +PACKAGECONFIG[gtk] = "-Dgtk=true,-Dgtk=false,gtk4 libpanel" +PACKAGECONFIG[sysprofd] = "-Dsysprofd=bundled,-Dsysprofd=none,polkit" +PACKAGECONFIG[libsysprof] = "-Dlibsysprof=true,-Dlibsysprof=false,polkit" + +EXTRA_OEMESON += "-Dsystemdunitdir=${systemd_unitdir}/system" + +SOLIBS = ".so" +FILES_SOLIBSDEV = "${libdir}/libsysprof-6.so" + +SYSTEMD_SERVICE:${PN} = "${@bb.utils.contains('PACKAGECONFIG', 'sysprofd', 'sysprof3.service', '', d)}" + +FILES:${PN} += " \ + ${datadir}/dbus-1/system-services \ + ${datadir}/dbus-1/system.d \ + ${datadir}/dbus-1/interfaces \ + ${datadir}/metainfo \ + ${libdir}/libsysprof-6*.so.* \ +" -- cgit v1.2.3-54-g00ecf