perf: Make built-in libtraceevent plugins cohabit with external libtraceevent
PATCH 1/1 perf: Make built-in libtraceevent plugins cohabit with external libtraceevent
This will package the plugins built by perf into kernel specific dir under libdir, so it does not conflict with plugins from newly added libtraceevent recipe
Fixesdo_sdk_depends: The file /usr/lib/traceevent/plugins/plugin_cfg80211.so is installed by both perf and libtraceevent, aborting
--- meta/recipes-kernel/perf/perf.bb | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
meta/recipes-kernel/perf/perf.bb +3 -1
@@ -137,6 +137,8 @@ PERF_EXTRA_LDFLAGS:mipsarchn64el = "-m elf64ltsmip" do_compile() { # Linux kernel build system is expected to do the right thing unset CFLAGS + sed -i -e 's|\$(libdir)/traceevent/plugins|\$(libdir)/traceevent_${KERNEL_VERSION}/plugins|g' ${S}/tools/lib/traceevent/plugins/Makefile + sed -i -e 's|\$(libdir)/traceevent/plugins|\$(libdir)/traceevent_${KERNEL_VERSION}/plugins|g' ${S}/tools/perf/Makefile.config oe_runmake all }
@@ -364,7 +366,7 @@ RSUGGESTS_SCRIPTING = "${@bb.utils.contains('PACKAGECONFIG', 'scripting', '${PN} RSUGGESTS:${PN} += "${PN}-archive ${PN}-tests ${RSUGGESTS_SCRIPTING}" FILES_SOLIBSDEV = "" -FILES:${PN} += "${libexecdir}/perf-core ${exec_prefix}/libexec/perf-core ${libdir}/traceevent ${libdir}/libperf-jvmti.so" +FILES:${PN} += "${libexecdir}/perf-core ${exec_prefix}/libexec/perf-core ${libdir}/traceevent* ${libdir}/libperf-jvmti.so" FILES:${PN}-archive = "${libdir}/perf/perf-core/perf-archive" FILES:${PN}-tests = "${libdir}/perf/perf-core/tests ${libexecdir}/perf-core/tests" FILES:${PN}-python = " \
Signature · 1 line
2.40.1
Hi Khem
Quoted 6 lines · Khem Raj
This will package the plugins built by perf into kernel specific dir under libdir, so it does not conflict with plugins from newly added libtraceevent recipe
Fixes
do_sdk_depends: The file/usr/lib/traceevent/plugins/plugin_cfg80211.so
is installed by both perf and libtraceevent, aborting
Starting with kernel version 6.4 libtraceevent is removed from the kernel sources and perf depends of an externally provided libtraceevent unless explicitely opted out.
perf.bb with this patch will fail when built with a 6.4 kernel.
I guess as an interim solution building perf on 6.4 without traceevent would fix the SDK issue you see with older kernels.
I could then try out how to build perf with an external libtraceevent also for older kernels (LIBTRACEEVENT_DYNAMIC) so that it would work for all kernel/perf versions.
Regards
Max
meta/recipes-kernel/perf/
Quoted 8 lines
Signed-off-by Khem Raj <[email protected]>Cc Max Krummenacher <[email protected]>--- meta/recipes-kernel/perf/perf.bb | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)meta/recipes-kernel/perf/ renamed from meta/recipes-kernel/perf/perf.bb +0
-0
perf.bb
meta/recipes-kernel/perf/perf.bb PERF_EXTRA_LDFLAGS:mipsarchn64el = "-m elf64ltsmip" · line 140
Quoted 8 lines
index
67b01a7f65a..d31f59f460b100644meta/recipes-kernel/perf/perf.bb +1
-0@@ -137,6 +137,8 @@ PERF_EXTRA_LDFLAGS:mipsarchn64el = "-m elf64ltsmip" do_compile() { # Linux kernel build system is expected to do the right thing unset CFLAGS + sed -i -e
's|\$(libdir)/traceevent/plugins|\$(libdir)/traceevent_${KERNEL_VERSION}/plugins|g' ${S}/tools/lib/traceevent/plugins/Makefile
meta/recipes-kernel/perf/perf.bb PERF_EXTRA_LDFLAGS:mipsarchn64el = "-m elf64ltsmip" · line 141
Quoted 1 line
meta/recipes-kernel/perf/perf.bb +1
-0+ sed -i -e
's|\$(libdir)/traceevent/plugins|\$(libdir)/traceevent_${KERNEL_VERSION}/plugins|g' ${S}/tools/perf/Makefile.config
meta/recipes-kernel/perf/perf.bb RSUGGESTS_SCRIPTING =
Quoted 4 lines
meta/recipes-kernel/perf/perf.bb +0
-0oe_runmake all }@@ -364,7 +366,7 @@ RSUGGESTS_SCRIPTING =
"${@bb.utils.contains('PACKAGECONFIG', 'scripting', '${PN}
meta/recipes-kernel/perf/perf.bb RSUGGESTS_SCRIPTING = "${@bb.utils.contains('PACKAGECONFIG', 'scripting', '${PN}
Quoted 4 lines
meta/recipes-kernel/perf/perf.bb +0
-1RSUGGESTS:${PN} += "${PN}-archive ${PN}-tests ${RSUGGESTS_SCRIPTING}" FILES_SOLIBSDEV = "" -FILES:${PN} += "${libexecdir}/perf-core ${exec_prefix}/libexec/perf-core
${libdir}/traceevent ${libdir}/libperf-jvmti.so"
meta/recipes-kernel/perf/perf.bb RSUGGESTS_SCRIPTING = · line 369
Quoted 1 line
meta/recipes-kernel/perf/perf.bb +1
-0+FILES:${PN} += "${libexecdir}/perf-core ${exec_prefix}/libexec/perf-core
${libdir}/traceevent* ${libdir}/libperf-jvmti.so"
meta/recipes-kernel/perf/perf.bb RSUGGESTS_SCRIPTING = · line 371
Quoted 2 lines
meta/recipes-kernel/perf/perf.bb +0
-0FILES:${PN}-archive = "${libdir}/perf/perf-core/perf-archive" FILES:${PN}-tests = "${libdir}/perf/perf-core/tests
${libexecdir}/perf-core/tests"
Quoted 5 lines
meta/recipes-kernel/perf/perf.bb +0
-1FILES:${PN}-python = " \ --2.40.1
Quoted 9 lines · Max Krummenacher
Hi Khem
Quoted 6 lines · Khem Raj
This will package the plugins built by perf into kernel specific dir under libdir, so it does not conflict with plugins from newly added libtraceevent recipe
Fixes
do_sdk_depends: The file/usr/lib/traceevent/plugins/plugin_cfg80211.so
Quoted 8 lines
is installed by both perf and libtraceevent, aborting
Starting with kernel version 6.4 libtraceevent is removed from the kernel sources and perf depends of an externally provided libtraceevent unless explicitely opted out.
perf.bb with this patch will fail when built with a 6.4 kernel.
Why will it fail ?
Quoted 52 lines
I guess as an interim solution building perf on 6.4 without traceevent would fix the SDK issue you see with older kernels.
I could then try out how to build perf with an external libtraceevent also for older kernels (LIBTRACEEVENT_DYNAMIC) so that it would work for all kernel/perf versions.Regards
MaxReview
Quoted 8 lines
Signed-off-by Khem Raj <[email protected]>Cc Max Krummenacher <[email protected]>--- meta/recipes-kernel/perf/perf.bb | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)(quoted diff) +0
-0b/meta/recipes-kernel/perf/perf.bb
meta/recipes-kernel/perf/perf.bb PERF_EXTRA_LDFLAGS:mipsarchn64el = "-m elf64ltsmip" · line 140
Quoted 8 lines
index
67b01a7f65a..d31f59f460b100644meta/recipes-kernel/perf/perf.bb +1
-0@@ -137,6 +137,8 @@ PERF_EXTRA_LDFLAGS:mipsarchn64el = "-m elf64ltsmip" do_compile() { # Linux kernel build system is expected to do the right thing unset CFLAGS + sed -i -e's|\$(libdir)/traceevent/plugins|\$(libdir)/traceevent_${KERNEL_VERSION}/plugins|g' ${S}/tools/lib/traceevent/plugins/Makefile
meta/recipes-kernel/perf/perf.bb PERF_EXTRA_LDFLAGS:mipsarchn64el = "-m elf64ltsmip" · line 141
Quoted 1 line
meta/recipes-kernel/perf/perf.bb +1
-0+ sed -i -e's|\$(libdir)/traceevent/plugins|\$(libdir)/traceevent_${KERNEL_VERSION}/plugins|g'
${S}/tools/perf/Makefile.configmeta/recipes-kernel/perf/perf.bb RSUGGESTS_SCRIPTING =
Quoted 4 lines
meta/recipes-kernel/perf/perf.bb +0
-0oe_runmake all }@@ -364,7 +366,7 @@ RSUGGESTS_SCRIPTING ="${@bb.utils.contains('PACKAGECONFIG', 'scripting', '${PN}
meta/recipes-kernel/perf/perf.bb RSUGGESTS_SCRIPTING = "${@bb.utils.contains('PACKAGECONFIG', 'scripting', '${PN}
Quoted 4 lines
meta/recipes-kernel/perf/perf.bb +0
-1RSUGGESTS:${PN} += "${PN}-archive ${PN}-tests ${RSUGGESTS_SCRIPTING}" FILES_SOLIBSDEV = "" -FILES:${PN} += "${libexecdir}/perf-core${exec_prefix}/libexec/perf-core ${libdir}/traceevent ${libdir}/libperf-jvmti.so"
meta/recipes-kernel/perf/perf.bb RSUGGESTS_SCRIPTING = · line 369
Quoted 1 line
meta/recipes-kernel/perf/perf.bb +1
-0+FILES:${PN} += "${libexecdir}/perf-core${exec_prefix}/libexec/perf-core ${libdir}/traceevent* ${libdir}/libperf-jvmti.so"
meta/recipes-kernel/perf/perf.bb RSUGGESTS_SCRIPTING = · line 371
Quoted 2 lines
meta/recipes-kernel/perf/perf.bb +0
-0FILES:${PN}-archive = "${libdir}/perf/perf-core/perf-archive" FILES:${PN}-tests = "${libdir}/perf/perf-core/tests${libexecdir}/perf-core/tests"
Quoted 5 lines
meta/recipes-kernel/perf/perf.bb +0
-1FILES:${PN}-python = " \ --2.40.1
Quoted 3 lines · Khem Raj
On Thu, May 25, 2023 at 7:44 PM Max Krummenacher <[email protected]>
Quoted 10 lines · wrote:
Quoted 10 lines
Hi Khem
Quoted 6 lines · Khem Raj
This will package the plugins built by perf into kernel specific dir under libdir, so it does not conflict with plugins from newly added libtraceevent recipe
Fixes
do_sdk_depends: The file
/usr/lib/traceevent/plugins/plugin_cfg80211.so is installed by both perf and libtraceevent, aborting
Quoted 2 lines
Quoted 2 lines
Starting with kernel version 6.4 libtraceevent is removed from the
kernel sources and perf depends of an externally provided libtraceevent unless explicitely opted out.
Quoted 4 lines
Quoted 2 lines
perf.bb with this patch will fail when built with a 6.4 kernel.
Why will it fail ?
The file which sed works on, ${S}/tools/lib/traceevent/plugins/Makefile, no longer exists.
Quoted 2 lines
Quoted 2 lines
I guess as an interim solution building perf on 6.4 without traceevent
would fix the SDK issue you see with older kernels.
Quoted 1 line
Quoted 1 line
I could then try out how to build perf with an external libtraceevent
also for older kernels (LIBTRACEEVENT_DYNAMIC) so that it would work for all kernel/perf versions.
Quoted 11 lines
Quoted 11 lines
Regards
MaxReview
Quoted 8 lines
Signed-off-by Khem Raj <[email protected]>Cc Max Krummenacher <[email protected]>--- meta/recipes-kernel/perf/perf.bb | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)(quoted diff) +0
-0
b/meta/recipes-kernel/perf/perf.bb
Quoted 8 lines
Quoted 8 lines
meta/recipes-kernel/perf/perf.bb PERF_EXTRA_LDFLAGS:mipsarchn64el = "-m elf64ltsmip" · line 140
Quoted 8 lines
index
67b01a7f65a..d31f59f460b100644meta/recipes-kernel/perf/perf.bb +1
-0@@ -137,6 +137,8 @@ PERF_EXTRA_LDFLAGS:mipsarchn64el = "-m elf64ltsmip" do_compile() { # Linux kernel build system is expected to do the right thing unset CFLAGS + sed -i -e
's|\$(libdir)/traceevent/plugins|\$(libdir)/traceevent_${KERNEL_VERSION}/plugins|g' ${S}/tools/lib/traceevent/plugins/Makefile
Quoted 1 line
Quoted 1 line
meta/recipes-kernel/perf/perf.bb PERF_EXTRA_LDFLAGS:mipsarchn64el = "-m elf64ltsmip" · line 141
Quoted 1 line
meta/recipes-kernel/perf/perf.bb +1
-0+ sed -i -e
's|\$(libdir)/traceevent/plugins|\$(libdir)/traceevent_${KERNEL_VERSION}/plugins|g' ${S}/tools/perf/Makefile.config
Quoted 4 lines
Quoted 4 lines
meta/recipes-kernel/perf/perf.bb RSUGGESTS_SCRIPTING =
Quoted 4 lines
meta/recipes-kernel/perf/perf.bb +0
-0oe_runmake all }@@ -364,7 +366,7 @@ RSUGGESTS_SCRIPTING =
"${@bb.utils.contains('PACKAGECONFIG', 'scripting', '${PN}
Quoted 4 lines
Quoted 4 lines
meta/recipes-kernel/perf/perf.bb RSUGGESTS_SCRIPTING = "${@bb.utils.contains('PACKAGECONFIG', 'scripting', '${PN}
Quoted 4 lines
meta/recipes-kernel/perf/perf.bb +0
-1RSUGGESTS:${PN} += "${PN}-archive ${PN}-tests ${RSUGGESTS_SCRIPTING}" FILES_SOLIBSDEV = "" -FILES:${PN} += "${libexecdir}/perf-core
${exec_prefix}/libexec/perf-core ${libdir}/traceevent ${libdir}/libperf-jvmti.so"
Quoted 1 line
Quoted 1 line
meta/recipes-kernel/perf/perf.bb RSUGGESTS_SCRIPTING = · line 369
Quoted 1 line
meta/recipes-kernel/perf/perf.bb +1
-0+FILES:${PN} += "${libexecdir}/perf-core
${exec_prefix}/libexec/perf-core ${libdir}/traceevent* ${libdir}/libperf-jvmti.so"
Quoted 2 lines
Quoted 2 lines
meta/recipes-kernel/perf/perf.bb RSUGGESTS_SCRIPTING = · line 371
Quoted 2 lines
meta/recipes-kernel/perf/perf.bb +0
-0FILES:${PN}-archive = "${libdir}/perf/perf-core/perf-archive" FILES:${PN}-tests = "${libdir}/perf/perf-core/tests
${libexecdir}/perf-core/tests"
Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
meta/recipes-kernel/perf/perf.bb +0
-1FILES:${PN}-python = " \ --2.40.1
Quoted 18 lines · Max Krummenacher
Quoted 14 lines · Khem Raj
Quoted 11 lines · Max Krummenacher
Hi Khem
Quoted 6 lines · Khem Raj
This will package the plugins built by perf into kernel specific dir under libdir, so it does not conflict with plugins from newly added libtraceevent recipe
Fixes
do_sdk_depends: The file/usr/lib/traceevent/plugins/plugin_cfg80211.sois installed by both perf and libtraceevent, aborting
Quoted 8 lines
Quoted 5 lines
Quoted 3 lines
Starting with kernel version 6.4 libtraceevent is removed from the kernel sources and perf depends of an externally provided libtraceevent unless explicitely opted out.
perf.bb with this patch will fail when built with a 6.4 kernel.
Why will it fail ?
The file which sed works on, ${S}/tools/lib/traceevent/plugins/Makefile, no longer exists.
Right, sent a v2 to address that
Quoted 39 lines
Quoted 39 lines
Quoted 39 lines
I guess as an interim solution building perf on 6.4 without traceevent would fix the SDK issue you see with older kernels.
I could then try out how to build perf with an external libtraceevent also for older kernels (LIBTRACEEVENT_DYNAMIC) so that it would work for all kernel/perf versions.Regards
MaxQuoted 33 lines
Signed-off-by Khem Raj <[email protected]>Cc Max Krummenacher <[email protected]>--- meta/recipes-kernel/perf/perf.bb | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)meta/recipes-kernel/perf/perf.bb +3
-2@@ -137,6 +137,8 @@ PERF_EXTRA_LDFLAGS:mipsarchn64el = "-m elf64ltsmip" do_compile() { # Linux kernel build system is expected to do the right thing unset CFLAGS + sed -i -e 's|\$(libdir)/traceevent/plugins|\$(libdir)/traceevent_${KERNEL_VERSION}/plugins|g' ${S}/tools/lib/traceevent/plugins/Makefile + sed -i -e 's|\$(libdir)/traceevent/plugins|\$(libdir)/traceevent_${KERNEL_VERSION}/plugins|g' ${S}/tools/perf/Makefile.config oe_runmake all }@@ -364,7 +366,7 @@ RSUGGESTS_SCRIPTING = "${@bb.utils.contains('PACKAGECONFIG', 'scripting', '${PN} RSUGGESTS:${PN} += "${PN}-archive ${PN}-tests ${RSUGGESTS_SCRIPTING}" FILES_SOLIBSDEV = "" -FILES:${PN} += "${libexecdir}/perf-core ${exec_prefix}/libexec/perf-core ${libdir}/traceevent ${libdir}/libperf-jvmti.so" +FILES:${PN} += "${libexecdir}/perf-core ${exec_prefix}/libexec/perf-core ${libdir}/traceevent* ${libdir}/libperf-jvmti.so" FILES:${PN}-archive = "${libdir}/perf/perf-core/perf-archive" FILES:${PN}-tests = "${libdir}/perf/perf-core/tests ${libexecdir}/perf-core/tests" FILES:${PN}-python = " \ --2.40.1