Message ID | 20220317165929.527418-1-f_l_k@t-online.de |
---|---|
State | Changes Requested |
Headers | show |
Series | [meta-oe,PATCHv2] perfetto: initial add commit | expand |
On Thu, Mar 17, 2022 at 10:01 AM Markus Volk <f_l_k@t-online.de> wrote: > > mesa 22.0.0 supports profiling GPU acceleration using google perfetto > > This adds a recipe for it > > Signed-off-by: Markus Volk <f_l_k@t-online.de> > --- > ...meson.build-add-pc-file-build-shared.patch | 45 +++++++++++++++++ > .../perfetto/libperfetto_24.2.bb | 28 +++++++++++ > .../perfetto/perfetto_24.2.bb | 48 +++++++++++++++++++ > 3 files changed, 121 insertions(+) > create mode 100644 meta-oe/recipes-devtools/perfetto/libperfetto/0001-meson.build-add-pc-file-build-shared.patch > create mode 100644 meta-oe/recipes-devtools/perfetto/libperfetto_24.2.bb > create mode 100644 meta-oe/recipes-devtools/perfetto/perfetto_24.2.bb > > diff --git a/meta-oe/recipes-devtools/perfetto/libperfetto/0001-meson.build-add-pc-file-build-shared.patch b/meta-oe/recipes-devtools/perfetto/libperfetto/0001-meson.build-add-pc-file-build-shared.patch > new file mode 100644 > index 000000000..46e3ec9ec > --- /dev/null > +++ b/meta-oe/recipes-devtools/perfetto/libperfetto/0001-meson.build-add-pc-file-build-shared.patch > @@ -0,0 +1,45 @@ > +From f70ed62ce4a42525c9738455966bec2ed9647568 Mon Sep 17 00:00:00 2001 > +From: Markus Volk <f_l_k@t-online.de> > +Date: Thu, 17 Mar 2022 15:44:23 +0100 > +Subject: [PATCH] meson.build: add pc file; build shared > + > +--- > + meson.build | 11 ++++++++++- > + 1 file changed, 10 insertions(+), 1 deletion(-) > + > +diff --git a/meson.build b/meson.build > +index 06015141c..74fe2348f 100644 > +--- a/meson.build > ++++ b/meson.build > +@@ -19,6 +19,7 @@ > + project( > + 'perfetto', > + ['c','cpp'], > ++ version : '24.2', > + default_options: ['c_std=c99', 'cpp_std=c++11'] > + ) > + > +@@ -30,7 +31,7 @@ endif > + > + dep_threads = dependency('threads') > + > +-lib_perfetto = static_library( > ++lib_perfetto = shared_library( > + 'perfetto', > + sources: 'sdk/perfetto.cc', > + dependencies: dep_threads, > +@@ -43,3 +44,11 @@ dep_perfetto = declare_dependency( > + link_with: lib_perfetto, > + include_directories: inc_perfetto, > + ) > ++ > ++pkgconfig = import('pkgconfig') > ++pkgconfig.generate( > ++ libraries: lib_perfetto, > ++ version: meson.project_version(), > ++ filebase: meson.project_name(), > ++ name: meson.project_name(), > ++ description: 'Perfetto Tracing Tool') > +-- > +2.25.1 > + > diff --git a/meta-oe/recipes-devtools/perfetto/libperfetto_24.2.bb b/meta-oe/recipes-devtools/perfetto/libperfetto_24.2.bb > new file mode 100644 > index 000000000..07b1a0b4b > --- /dev/null > +++ b/meta-oe/recipes-devtools/perfetto/libperfetto_24.2.bb > @@ -0,0 +1,28 @@ > +SUMMARY = "Perfetto - System profiling, app tracing and trace analysis" > +HOMEPAGE = "https://github.com/google/perfetto" > +BUGTRACKER = "https://github.com/google/perfetto/issues" > +LICENSE = "Apache-2.0" > + > +LIC_FILES_CHKSUM = "file://LICENSE;md5=f87516e0b698007e9e75a1fe1012b390" > + > +SRC_URI = " \ > + git://github.com/google/perfetto.git;protocol=https;branch=releases/v24.x \ > + file://0001-meson.build-add-pc-file-build-shared.patch \ > +" > + > +S = "${WORKDIR}/git" > +PV = "24.2" > +SRCREV = "7cb228c16d69aee297a106ad3ccc7461fa0b8045" > + > +inherit meson > + > +do_install:append() { > + install -d ${D}${includedir} > + install -m 0664 ${S}/sdk/perfetto.h ${D}${includedir} > +} > + > +FILES:${PN} = "${includedir} ${libdir}" > +FILES:${PN}-dev = "" > + > +BBCLASSEXTEND = "native nativesdk" > + > diff --git a/meta-oe/recipes-devtools/perfetto/perfetto_24.2.bb b/meta-oe/recipes-devtools/perfetto/perfetto_24.2.bb > new file mode 100644 > index 000000000..8b056df6b > --- /dev/null > +++ b/meta-oe/recipes-devtools/perfetto/perfetto_24.2.bb > @@ -0,0 +1,48 @@ > +SUMMARY = "Perfetto - System profiling, app tracing and trace analysis" > +HOMEPAGE = "https://github.com/google/perfetto" > +BUGTRACKER = "https://github.com/google/perfetto/issues" > +LICENSE = "Apache-2.0" > + > +LIC_FILES_CHKSUM = "file://LICENSE;md5=f87516e0b698007e9e75a1fe1012b390" > + > +SRC_URI = "git://github.com/google/perfetto.git;protocol=https;branch=releases/v24.x" > + > +DEPENDS = "gn-native ninja-native git-native curl-native" > + > +S = "${WORKDIR}/git" > +PV = "24.2" > +SRCREV = "7cb228c16d69aee297a106ad3ccc7461fa0b8045" > + > +inherit pkgconfig > + > +GN_ARGS = " \ > + build_with_chromium = false \ > + is_perfetto_build_generator = true \ > + perfetto_build_standalone = false \ > + perfetto_build_with_android = false \ > + perfetto_build_with_embedder = true \ > +" > + > + > +OUTPUT_DIR = "out/Release" > +B = "${S}/${OUTPUT_DIR}" > + > +do_configure() { > + cd ${S} > + ./tools/install-build-deps > + gn gen --args='${GN_ARGS}' "${OUTPUT_DIR}" > +} > + > +do_compile() { > + ninja perfetto > +} > + > +do_install() { > + install -d ${D}${bindir} > + for bin in protoc perfetto ipc_plugin cppgen_plugin protozero_plugin; do > + install -m 0755 ${B}/"$bin" ${D}${bindir} > + done > +} > + > +BBCLASSEXTEND = "native nativesdk" > +do_configure[network] = "1" why is this needed ? > -- > 2.25.1 > > > -=-=-=-=-=-=-=-=-=-=-=- > Links: You receive all messages sent to this group. > View/Reply Online (#96040): https://lists.openembedded.org/g/openembedded-devel/message/96040 > Mute This Topic: https://lists.openembedded.org/mt/89850216/1997914 > Group Owner: openembedded-devel+owner@lists.openembedded.org > Unsubscribe: https://lists.openembedded.org/g/openembedded-devel/unsub [raj.khem@gmail.com] > -=-=-=-=-=-=-=-=-=-=-=- >
this fails for mips https://errors.yoctoproject.org/Errors/Details/652008/ I think we need to link in libatomic here LDFLAGS:append:mips = " -latomic" or somesuch might be helpful. On Thu, Mar 17, 2022 at 10:36 AM Khem Raj <raj.khem@gmail.com> wrote: > > On Thu, Mar 17, 2022 at 10:01 AM Markus Volk <f_l_k@t-online.de> wrote: > > > > mesa 22.0.0 supports profiling GPU acceleration using google perfetto > > > > This adds a recipe for it > > > > Signed-off-by: Markus Volk <f_l_k@t-online.de> > > --- > > ...meson.build-add-pc-file-build-shared.patch | 45 +++++++++++++++++ > > .../perfetto/libperfetto_24.2.bb | 28 +++++++++++ > > .../perfetto/perfetto_24.2.bb | 48 +++++++++++++++++++ > > 3 files changed, 121 insertions(+) > > create mode 100644 meta-oe/recipes-devtools/perfetto/libperfetto/0001-meson.build-add-pc-file-build-shared.patch > > create mode 100644 meta-oe/recipes-devtools/perfetto/libperfetto_24.2.bb > > create mode 100644 meta-oe/recipes-devtools/perfetto/perfetto_24.2.bb > > > > diff --git a/meta-oe/recipes-devtools/perfetto/libperfetto/0001-meson.build-add-pc-file-build-shared.patch b/meta-oe/recipes-devtools/perfetto/libperfetto/0001-meson.build-add-pc-file-build-shared.patch > > new file mode 100644 > > index 000000000..46e3ec9ec > > --- /dev/null > > +++ b/meta-oe/recipes-devtools/perfetto/libperfetto/0001-meson.build-add-pc-file-build-shared.patch > > @@ -0,0 +1,45 @@ > > +From f70ed62ce4a42525c9738455966bec2ed9647568 Mon Sep 17 00:00:00 2001 > > +From: Markus Volk <f_l_k@t-online.de> > > +Date: Thu, 17 Mar 2022 15:44:23 +0100 > > +Subject: [PATCH] meson.build: add pc file; build shared > > + > > +--- > > + meson.build | 11 ++++++++++- > > + 1 file changed, 10 insertions(+), 1 deletion(-) > > + > > +diff --git a/meson.build b/meson.build > > +index 06015141c..74fe2348f 100644 > > +--- a/meson.build > > ++++ b/meson.build > > +@@ -19,6 +19,7 @@ > > + project( > > + 'perfetto', > > + ['c','cpp'], > > ++ version : '24.2', > > + default_options: ['c_std=c99', 'cpp_std=c++11'] > > + ) > > + > > +@@ -30,7 +31,7 @@ endif > > + > > + dep_threads = dependency('threads') > > + > > +-lib_perfetto = static_library( > > ++lib_perfetto = shared_library( > > + 'perfetto', > > + sources: 'sdk/perfetto.cc', > > + dependencies: dep_threads, > > +@@ -43,3 +44,11 @@ dep_perfetto = declare_dependency( > > + link_with: lib_perfetto, > > + include_directories: inc_perfetto, > > + ) > > ++ > > ++pkgconfig = import('pkgconfig') > > ++pkgconfig.generate( > > ++ libraries: lib_perfetto, > > ++ version: meson.project_version(), > > ++ filebase: meson.project_name(), > > ++ name: meson.project_name(), > > ++ description: 'Perfetto Tracing Tool') > > +-- > > +2.25.1 > > + > > diff --git a/meta-oe/recipes-devtools/perfetto/libperfetto_24.2.bb b/meta-oe/recipes-devtools/perfetto/libperfetto_24.2.bb > > new file mode 100644 > > index 000000000..07b1a0b4b > > --- /dev/null > > +++ b/meta-oe/recipes-devtools/perfetto/libperfetto_24.2.bb > > @@ -0,0 +1,28 @@ > > +SUMMARY = "Perfetto - System profiling, app tracing and trace analysis" > > +HOMEPAGE = "https://github.com/google/perfetto" > > +BUGTRACKER = "https://github.com/google/perfetto/issues" > > +LICENSE = "Apache-2.0" > > + > > +LIC_FILES_CHKSUM = "file://LICENSE;md5=f87516e0b698007e9e75a1fe1012b390" > > + > > +SRC_URI = " \ > > + git://github.com/google/perfetto.git;protocol=https;branch=releases/v24.x \ > > + file://0001-meson.build-add-pc-file-build-shared.patch \ > > +" > > + > > +S = "${WORKDIR}/git" > > +PV = "24.2" > > +SRCREV = "7cb228c16d69aee297a106ad3ccc7461fa0b8045" > > + > > +inherit meson > > + > > +do_install:append() { > > + install -d ${D}${includedir} > > + install -m 0664 ${S}/sdk/perfetto.h ${D}${includedir} > > +} > > + > > +FILES:${PN} = "${includedir} ${libdir}" > > +FILES:${PN}-dev = "" > > + > > +BBCLASSEXTEND = "native nativesdk" > > + > > diff --git a/meta-oe/recipes-devtools/perfetto/perfetto_24.2.bb b/meta-oe/recipes-devtools/perfetto/perfetto_24.2.bb > > new file mode 100644 > > index 000000000..8b056df6b > > --- /dev/null > > +++ b/meta-oe/recipes-devtools/perfetto/perfetto_24.2.bb > > @@ -0,0 +1,48 @@ > > +SUMMARY = "Perfetto - System profiling, app tracing and trace analysis" > > +HOMEPAGE = "https://github.com/google/perfetto" > > +BUGTRACKER = "https://github.com/google/perfetto/issues" > > +LICENSE = "Apache-2.0" > > + > > +LIC_FILES_CHKSUM = "file://LICENSE;md5=f87516e0b698007e9e75a1fe1012b390" > > + > > +SRC_URI = "git://github.com/google/perfetto.git;protocol=https;branch=releases/v24.x" > > + > > +DEPENDS = "gn-native ninja-native git-native curl-native" > > + > > +S = "${WORKDIR}/git" > > +PV = "24.2" > > +SRCREV = "7cb228c16d69aee297a106ad3ccc7461fa0b8045" > > + > > +inherit pkgconfig > > + > > +GN_ARGS = " \ > > + build_with_chromium = false \ > > + is_perfetto_build_generator = true \ > > + perfetto_build_standalone = false \ > > + perfetto_build_with_android = false \ > > + perfetto_build_with_embedder = true \ > > +" > > + > > + > > +OUTPUT_DIR = "out/Release" > > +B = "${S}/${OUTPUT_DIR}" > > + > > +do_configure() { > > + cd ${S} > > + ./tools/install-build-deps > > + gn gen --args='${GN_ARGS}' "${OUTPUT_DIR}" > > +} > > + > > +do_compile() { > > + ninja perfetto > > +} > > + > > +do_install() { > > + install -d ${D}${bindir} > > + for bin in protoc perfetto ipc_plugin cppgen_plugin protozero_plugin; do > > + install -m 0755 ${B}/"$bin" ${D}${bindir} > > + done > > +} > > + > > +BBCLASSEXTEND = "native nativesdk" > > +do_configure[network] = "1" > > why is this needed ? > > > -- > > 2.25.1 > > > > > > -=-=-=-=-=-=-=-=-=-=-=- > > Links: You receive all messages sent to this group. > > View/Reply Online (#96040): https://lists.openembedded.org/g/openembedded-devel/message/96040 > > Mute This Topic: https://lists.openembedded.org/mt/89850216/1997914 > > Group Owner: openembedded-devel+owner@lists.openembedded.org > > Unsubscribe: https://lists.openembedded.org/g/openembedded-devel/unsub [raj.khem@gmail.com] > > -=-=-=-=-=-=-=-=-=-=-=- > >
In libperfetto: > +From f70ed62ce4a42525c9738455966bec2ed9647568 Mon Sep 17 00:00:00 2001 > +From: Markus Volk <f_l_k@t-online.de> > +Date: Thu, 17 Mar 2022 15:44:23 +0100 > +Subject: [PATCH] meson.build: add pc file; build shared No Upstream-Status or Signed-off-by. > +PV = "24.2" This can be removed. > +do_install:append() { > + install -d ${D}${includedir} > + install -m 0664 ${S}/sdk/perfetto.h ${D}${includedir} > +} As you're editing the meson why not just get it to install these too? > +FILES:${PN} = "${includedir} ${libdir}" > +FILES:${PN}-dev = "" No. Always split into the usual packaging. In perfetto: > +DEPENDS = "gn-native ninja-native git-native curl-native" I guess we get to grumble at google for git/curl here. You *really* want to find out how to avoid this though: can you not pre-loaded sources to the right location in SRC_URI? > +PV = "24.2" Remove, redundant. > +OUTPUT_DIR = "out/Release" > +B = "${S}/${OUTPUT_DIR}" Can you set B to ${WORKDIR}/build to do a proper out-of-tree build? GN/Ninja certainly can normally. You then get to use do_configure[cleandirs] to have a clean build tree. > +do_configure() { > + cd ${S} > + ./tools/install-build-deps YUCK. What is this installing and why can't that be done via DEPENDS and SRC_URI? This breaks offline builds and source archiving. Ross
>> +From f70ed62ce4a42525c9738455966bec2ed9647568 Mon Sep 17 00:00:00 2001 >> +From: Markus Volk <f_l_k@t-online.de> >> +Date: Thu, 17 Mar 2022 15:44:23 +0100 >> +Subject: [PATCH] meson.build: add pc file; build shared > No Upstream-Status or Signed-off-by. > These recipes are pretty ugly. I sent them to the mailing list, mostly in case someone wants to play around with them. If that's really the plan to add them i'll update the status and fix the other little problems >> +do_install:append() { >> + install -d ${D}${includedir} >> + install -m 0664 ${S}/sdk/perfetto.h ${D}${includedir} >> +} > As you're editing the meson why not just get it to install these too? I was just too lazy after I found out that this header was needed for Mesa but was not installed. > >> +FILES:${PN} = "${includedir} ${libdir}" >> +FILES:${PN}-dev = "" > No. Always split into the usual packaging. My issue was, that there is only a .so without version number and symlink. All files got installed into dev. Needed to add dev-elf to INSANE_SKIP and mesa complained about RDEPEND on libperfetto > YUCK. What is this installing and why can't that be done via DEPENDS > and SRC_URI? This breaks offline builds and source archiving. > > Ross This is ugly, i know. Other google projects like highway allow fetching stuff as submodules but to me it looks like only zlib and protobuf can be configured as use_system here. But this is my first approach on building with gn. I'm quite unfamiliar with it. Good chances that i'm just not knowing enough to to it better. https://github.com/google/perfetto/blob/master/tools/install-build-deps When I have more time, I'll take a closer look, but right now it's not a high priority for me. As it is at the moment, this is definitely in need of improvement
> >> YUCK. What is this installing and why can't that be done via DEPENDS >> and SRC_URI? This breaks offline builds and source archiving. >> >> Ross By the way, as I was playing around with Perfetto, I stumbled across this: | INFO:root:Downloading /home/flk/build/poky/build-rock/tmp/work/cortexa72-cortexa53-crypto-poky-linux/perfetto/24.2-r0/git/buildtools/libbacktrace.zip from https://storage.googleapis.com/perfetto/libbacktrace-177940370e4a6b2509e92a0aaa9749184e64af43.zip | curl: (77) error setting certificate file: /home/flk/build/poky/build-rock/tmp/work/x86_64-linux/curl-native/7.82.0-r0/recipe-sysroot-native/etc/ssl/certs/ca-certificates.crt This could be fixed in curl.bb by adding ca-certifiicates as a dependency: PACKAGECONFIG[openssl] = "--with-openssl,--without-openssl,openssl ca-certificates" but wouldn't this also be needed for gnutls? Or should it be added to DEPENDS ?
Mark them RFC or something like that, so its clear that you dont intend to include them. On Thu, Mar 17, 2022 at 4:31 PM Markus Volk <f_l_k@t-online.de> wrote: > > > >> +From f70ed62ce4a42525c9738455966bec2ed9647568 Mon Sep 17 00:00:00 2001 > >> +From: Markus Volk <f_l_k@t-online.de> > >> +Date: Thu, 17 Mar 2022 15:44:23 +0100 > >> +Subject: [PATCH] meson.build: add pc file; build shared > > No Upstream-Status or Signed-off-by. > > > > These recipes are pretty ugly. I sent them to the mailing list, mostly > in case someone wants to play around with them. > > If that's really the plan to add them i'll update the status and fix the > other little problems > > >> +do_install:append() { > >> + install -d ${D}${includedir} > >> + install -m 0664 ${S}/sdk/perfetto.h ${D}${includedir} > >> +} > > As you're editing the meson why not just get it to install these too? > I was just too lazy after I found out that this header was needed for > Mesa but was not installed. > > > >> +FILES:${PN} = "${includedir} ${libdir}" > >> +FILES:${PN}-dev = "" > > No. Always split into the usual packaging. > > My issue was, that there is only a .so without version number and > symlink. All files got installed into dev. > > Needed to add dev-elf to INSANE_SKIP and mesa complained about RDEPEND > on libperfetto > > > YUCK. What is this installing and why can't that be done via DEPENDS > > and SRC_URI? This breaks offline builds and source archiving. > > > > Ross > > This is ugly, i know. Other google projects like highway allow fetching > stuff as submodules > > but to me it looks like only zlib and protobuf can be configured as > use_system here. But this is my first > > approach on building with gn. I'm quite unfamiliar with it. Good chances > that i'm just not knowing enough > > to to it better. > > https://github.com/google/perfetto/blob/master/tools/install-build-deps > > When I have more time, I'll take a closer look, but right now it's not a > high priority for me. As it is at the moment, > > this is definitely in need of improvement > > > > > -=-=-=-=-=-=-=-=-=-=-=- > Links: You receive all messages sent to this group. > View/Reply Online (#96049): https://lists.openembedded.org/g/openembedded-devel/message/96049 > Mute This Topic: https://lists.openembedded.org/mt/89850216/1997914 > Group Owner: openembedded-devel+owner@lists.openembedded.org > Unsubscribe: https://lists.openembedded.org/g/openembedded-devel/unsub [raj.khem@gmail.com] > -=-=-=-=-=-=-=-=-=-=-=- >
Will do this in future. Sorry for that Am 18.03.22 um 01:31 schrieb Khem Raj: > Mark them RFC or something like that, so its clear that you dont > intend to include them. > > On Thu, Mar 17, 2022 at 4:31 PM Markus Volk <f_l_k@t-online.de> wrote: >> >>>> +From f70ed62ce4a42525c9738455966bec2ed9647568 Mon Sep 17 00:00:00 2001 >>>> +From: Markus Volk <f_l_k@t-online.de> >>>> +Date: Thu, 17 Mar 2022 15:44:23 +0100 >>>> +Subject: [PATCH] meson.build: add pc file; build shared >>> No Upstream-Status or Signed-off-by. >>> >> These recipes are pretty ugly. I sent them to the mailing list, mostly >> in case someone wants to play around with them. >> >> If that's really the plan to add them i'll update the status and fix the >> other little problems >> >>>> +do_install:append() { >>>> + install -d ${D}${includedir} >>>> + install -m 0664 ${S}/sdk/perfetto.h ${D}${includedir} >>>> +} >>> As you're editing the meson why not just get it to install these too? >> I was just too lazy after I found out that this header was needed for >> Mesa but was not installed. >>>> +FILES:${PN} = "${includedir} ${libdir}" >>>> +FILES:${PN}-dev = "" >>> No. Always split into the usual packaging. >> My issue was, that there is only a .so without version number and >> symlink. All files got installed into dev. >> >> Needed to add dev-elf to INSANE_SKIP and mesa complained about RDEPEND >> on libperfetto >> >>> YUCK. What is this installing and why can't that be done via DEPENDS >>> and SRC_URI? This breaks offline builds and source archiving. >>> >>> Ross >> This is ugly, i know. Other google projects like highway allow fetching >> stuff as submodules >> >> but to me it looks like only zlib and protobuf can be configured as >> use_system here. But this is my first >> >> approach on building with gn. I'm quite unfamiliar with it. Good chances >> that i'm just not knowing enough >> >> to to it better. >> >> https://github.com/google/perfetto/blob/master/tools/install-build-deps >> >> When I have more time, I'll take a closer look, but right now it's not a >> high priority for me. As it is at the moment, >> >> this is definitely in need of improvement >> >> >> >> >> >> >> >> -=-=-=-=-=-=-=-=-=-=-=- >> Links: You receive all messages sent to this group. >> View/Reply Online (#96051): https://lists.openembedded.org/g/openembedded-devel/message/96051 >> Mute This Topic: https://lists.openembedded.org/mt/89850216/3618223 >> Group Owner: openembedded-devel+owner@lists.openembedded.org >> Unsubscribe: https://lists.openembedded.org/g/openembedded-devel/unsub [f_l_k@t-online.de] >> -=-=-=-=-=-=-=-=-=-=-=- >>
diff --git a/meta-oe/recipes-devtools/perfetto/libperfetto/0001-meson.build-add-pc-file-build-shared.patch b/meta-oe/recipes-devtools/perfetto/libperfetto/0001-meson.build-add-pc-file-build-shared.patch new file mode 100644 index 000000000..46e3ec9ec --- /dev/null +++ b/meta-oe/recipes-devtools/perfetto/libperfetto/0001-meson.build-add-pc-file-build-shared.patch @@ -0,0 +1,45 @@ +From f70ed62ce4a42525c9738455966bec2ed9647568 Mon Sep 17 00:00:00 2001 +From: Markus Volk <f_l_k@t-online.de> +Date: Thu, 17 Mar 2022 15:44:23 +0100 +Subject: [PATCH] meson.build: add pc file; build shared + +--- + meson.build | 11 ++++++++++- + 1 file changed, 10 insertions(+), 1 deletion(-) + +diff --git a/meson.build b/meson.build +index 06015141c..74fe2348f 100644 +--- a/meson.build ++++ b/meson.build +@@ -19,6 +19,7 @@ + project( + 'perfetto', + ['c','cpp'], ++ version : '24.2', + default_options: ['c_std=c99', 'cpp_std=c++11'] + ) + +@@ -30,7 +31,7 @@ endif + + dep_threads = dependency('threads') + +-lib_perfetto = static_library( ++lib_perfetto = shared_library( + 'perfetto', + sources: 'sdk/perfetto.cc', + dependencies: dep_threads, +@@ -43,3 +44,11 @@ dep_perfetto = declare_dependency( + link_with: lib_perfetto, + include_directories: inc_perfetto, + ) ++ ++pkgconfig = import('pkgconfig') ++pkgconfig.generate( ++ libraries: lib_perfetto, ++ version: meson.project_version(), ++ filebase: meson.project_name(), ++ name: meson.project_name(), ++ description: 'Perfetto Tracing Tool') +-- +2.25.1 + diff --git a/meta-oe/recipes-devtools/perfetto/libperfetto_24.2.bb b/meta-oe/recipes-devtools/perfetto/libperfetto_24.2.bb new file mode 100644 index 000000000..07b1a0b4b --- /dev/null +++ b/meta-oe/recipes-devtools/perfetto/libperfetto_24.2.bb @@ -0,0 +1,28 @@ +SUMMARY = "Perfetto - System profiling, app tracing and trace analysis" +HOMEPAGE = "https://github.com/google/perfetto" +BUGTRACKER = "https://github.com/google/perfetto/issues" +LICENSE = "Apache-2.0" + +LIC_FILES_CHKSUM = "file://LICENSE;md5=f87516e0b698007e9e75a1fe1012b390" + +SRC_URI = " \ + git://github.com/google/perfetto.git;protocol=https;branch=releases/v24.x \ + file://0001-meson.build-add-pc-file-build-shared.patch \ +" + +S = "${WORKDIR}/git" +PV = "24.2" +SRCREV = "7cb228c16d69aee297a106ad3ccc7461fa0b8045" + +inherit meson + +do_install:append() { + install -d ${D}${includedir} + install -m 0664 ${S}/sdk/perfetto.h ${D}${includedir} +} + +FILES:${PN} = "${includedir} ${libdir}" +FILES:${PN}-dev = "" + +BBCLASSEXTEND = "native nativesdk" + diff --git a/meta-oe/recipes-devtools/perfetto/perfetto_24.2.bb b/meta-oe/recipes-devtools/perfetto/perfetto_24.2.bb new file mode 100644 index 000000000..8b056df6b --- /dev/null +++ b/meta-oe/recipes-devtools/perfetto/perfetto_24.2.bb @@ -0,0 +1,48 @@ +SUMMARY = "Perfetto - System profiling, app tracing and trace analysis" +HOMEPAGE = "https://github.com/google/perfetto" +BUGTRACKER = "https://github.com/google/perfetto/issues" +LICENSE = "Apache-2.0" + +LIC_FILES_CHKSUM = "file://LICENSE;md5=f87516e0b698007e9e75a1fe1012b390" + +SRC_URI = "git://github.com/google/perfetto.git;protocol=https;branch=releases/v24.x" + +DEPENDS = "gn-native ninja-native git-native curl-native" + +S = "${WORKDIR}/git" +PV = "24.2" +SRCREV = "7cb228c16d69aee297a106ad3ccc7461fa0b8045" + +inherit pkgconfig + +GN_ARGS = " \ + build_with_chromium = false \ + is_perfetto_build_generator = true \ + perfetto_build_standalone = false \ + perfetto_build_with_android = false \ + perfetto_build_with_embedder = true \ +" + + +OUTPUT_DIR = "out/Release" +B = "${S}/${OUTPUT_DIR}" + +do_configure() { + cd ${S} + ./tools/install-build-deps + gn gen --args='${GN_ARGS}' "${OUTPUT_DIR}" +} + +do_compile() { + ninja perfetto +} + +do_install() { + install -d ${D}${bindir} + for bin in protoc perfetto ipc_plugin cppgen_plugin protozero_plugin; do + install -m 0755 ${B}/"$bin" ${D}${bindir} + done +} + +BBCLASSEXTEND = "native nativesdk" +do_configure[network] = "1"
mesa 22.0.0 supports profiling GPU acceleration using google perfetto This adds a recipe for it Signed-off-by: Markus Volk <f_l_k@t-online.de> --- ...meson.build-add-pc-file-build-shared.patch | 45 +++++++++++++++++ .../perfetto/libperfetto_24.2.bb | 28 +++++++++++ .../perfetto/perfetto_24.2.bb | 48 +++++++++++++++++++ 3 files changed, 121 insertions(+) create mode 100644 meta-oe/recipes-devtools/perfetto/libperfetto/0001-meson.build-add-pc-file-build-shared.patch create mode 100644 meta-oe/recipes-devtools/perfetto/libperfetto_24.2.bb create mode 100644 meta-oe/recipes-devtools/perfetto/perfetto_24.2.bb