oprofile: enable 'operf' perf_events mode
cover oprofile: enable 'operf' perf_events mode
From: Tom Zanussi <[email protected]>
This patchset fixes oprofile-0.9.8 so that it finds perf_events and configures accordingly to enable 'operf' and not just 'legacy oprofile'
I've added a new section on operf to the Yocto Tracing and Profiling Guide' (just the wiki version for now, until I can submit a patch for the official Guide):
https://wiki.yoctoproject.org/wiki/Tracing_and_Profiling#operf
I've tested this on real hardware (x86 crownbay), and build-tested on the other arches (powerpc didn't build due to YOCTO bug #3717, but that's not a regression).
The following changes since commit cfb082961a6c9ac3d65738031c4071210529cd07:
bitbake: build.py: Dump out performance data of individual tasks (2013-01-28 14:49:05 +0000)
are available in the git repository at:
git://git.yoctoproject.org/poky-contrib.git tzanussi/oprofile-operf-enable-v1
http://git.yoctoproject.org/cgit/cgit.cgi/poky-contrib/log/?h=tzanussi/oprofile-operf-enable-v1
Tom Zanussi (2):
oprofile: add kernel dependency
oprofile: remove AX_KERNEL_VERSION from acinclude.m4
meta/recipes-kernel/oprofile/oprofile.inc | 2 +- meta/recipes-kernel/oprofile/oprofile/acinclude.m4 | 19 ------------------- meta/recipes-kernel/oprofile/oprofile_0.9.8.bb | 2 ++ 3 files changed, 3 insertions(+), 20 deletions(-)
Signature · 1 line
1.7.11.4
PATCH 1/2 oprofile: add kernel dependency
From: Tom Zanussi <[email protected]>
oprofile-0.9.8 adds 'operf' which depends on the kernel's perf_events subsystem to be present when building, which adds the kernel dependency that we specify in a new DEPENDS for oprofile-0.9.8.
--- meta/recipes-kernel/oprofile/oprofile_0.9.8.bb | 2 ++ 1 file changed, 2 insertions(+)
meta/recipes-kernel/oprofile/oprofile_0.9.8.bb +2 -0
@@ -2,6 +2,8 @@ require oprofile.inc PR = "${INC_PR}.1" +DEPENDS += "virtual/kernel" + SRC_URI += "${SOURCEFORGE_MIRROR}/${BPN}/${BPN}-${PV}.tar.gz \ file://0001-Add-rmb-definition-for-AArch64-architecture.patch \ file://0001-OProfile-doesn-t-build-for-32-bit-ppc-the-operf_util.patch \
Signature · 1 line
1.7.11.4
PATCH 2/2 oprofile: remove AX_KERNEL_VERSION from acinclude.m4
From: Tom Zanussi <[email protected]>
The version of this macro in acinclude.m4 is preventing the correct version in the package's kernelversion.m4 from being used.
Since the version in acinclude.m4 includes the obsolete config.h, any test that uses it with newer (> 2.6.19) kernels fails. In the case of oprofile it means that perf_events support is never detected and thus 'legacy oprofile' is always built.
Fixing this allows the new perf_events 'operf' support to be built.
Fixes [YOCTO #3447]
--- meta/recipes-kernel/oprofile/oprofile.inc | 2 +- meta/recipes-kernel/oprofile/oprofile/acinclude.m4 | 19 ------------------- 2 files changed, 1 insertion(+), 20 deletions(-)
meta/recipes-kernel/oprofile/oprofile.inc +1 -1
@@ -19,7 +19,7 @@ FILES_${PN} = "${bindir} ${libdir}/${BPN}/lib*${SOLIBS} ${datadir}/${BPN}" FILES_${PN}-dev += "${libdir}/${BPN}/lib*${SOLIBSDEV} ${libdir}/${BPN}/lib*.la" FILES_${PN}-staticdev += "${libdir}/${BPN}/lib*.a" -INC_PR = "r1" +INC_PR = "r2" SRC_URI = "file://opstart.patch \ file://oprofile-no-query-modules.patch \
meta/recipes-kernel/oprofile/oprofile/acinclude.m4 +0 -19
@@ -104,25 +104,6 @@ AC_SUBST(OPROFILE_MODULE_ARCH) ] ) -dnl AX_KERNEL_VERSION(major, minor, level, comparison, action-if-true, action-if-false) -AC_DEFUN([AX_KERNEL_VERSION], [ -SAVE_CFLAGS=$CFLAGS -CFLAGS="-I$KINC -D__KERNEL__ -Werror" -AC_TRY_COMPILE( - [ - #include <linux/version.h> - #include <linux/config.h> - ], - [ - #if LINUX_VERSION_CODE $4 KERNEL_VERSION($1, $2, $3) - break_me_hard(\\\); - #endif - ], -[$5],[$6],) -CFLAGS=$SAVE_CFLAGS -]) - - dnl AX_MSG_RESULT_YN(a) dnl results "yes" iff a==1, "no" else AC_DEFUN([AX_MSG_RESULT_YN], [x=no
Signature · 1 line
1.7.11.4