On Thu, Mar 17, 2022 at 10:01 AM Markus Volk <f_...@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_...@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_...@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 (#96041): https://lists.openembedded.org/g/openembedded-devel/message/96041 Mute This Topic: https://lists.openembedded.org/mt/89850216/21656 Group Owner: openembedded-devel+ow...@lists.openembedded.org Unsubscribe: https://lists.openembedded.org/g/openembedded-devel/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-