oprofile: move from oe-core, as it's being deprecated there
PATCH 1/1 oprofile: move from oe-core, as it's being deprecated there
From: Denys Dmytriyenko <[email protected]>
oe-core will focus on perf as a better alternative moving forward. Existing users of oprofile are encouraged to move to perf, but for now can be unblocked with oprofile moved to meta-oe.
Signed-off-by Denys Dmytriyenko <[email protected]>
--- meta-oe/recipes-kernel/oprofile/oprofile.inc | 65 +++ ...Add-rmb-definition-for-NIOS2-architecture.patch | 30 ++ .../0001-Fix-FTBFS-problem-with-GCC-6.patch | 51 ++ .../recipes-kernel/oprofile/oprofile/acinclude.m4 | 581 +++++++++++++++++++++ .../oprofile/oprofile/automake-foreign.patch | 12 + .../recipes-kernel/oprofile/oprofile/musl.patch | 46 ++ .../oprofile/oprofile-cross-compile-tests.patch | 98 ++++ .../oprofile/oprofile/root-home-dir.patch | 44 ++ meta-oe/recipes-kernel/oprofile/oprofile/run-ptest | 19 + meta-oe/recipes-kernel/oprofile/oprofile_1.1.0.bb | 10 + 10 files changed, 956 insertions(+) create mode 100644 meta-oe/recipes-kernel/oprofile/oprofile.inc create mode 100644 meta-oe/recipes-kernel/oprofile/oprofile/0001-Add-rmb-definition-for-NIOS2-architecture.patch create mode 100644 meta-oe/recipes-kernel/oprofile/oprofile/0001-Fix-FTBFS-problem-with-GCC-6.patch create mode 100644 meta-oe/recipes-kernel/oprofile/oprofile/acinclude.m4 create mode 100644 meta-oe/recipes-kernel/oprofile/oprofile/automake-foreign.patch create mode 100644 meta-oe/recipes-kernel/oprofile/oprofile/musl.patch create mode 100644 meta-oe/recipes-kernel/oprofile/oprofile/oprofile-cross-compile-tests.patch create mode 100644 meta-oe/recipes-kernel/oprofile/oprofile/root-home-dir.patch create mode 100644 meta-oe/recipes-kernel/oprofile/oprofile/run-ptest create mode 100644 meta-oe/recipes-kernel/oprofile/oprofile_1.1.0.bb
meta-oe/recipes-kernel/oprofile/oprofile.inc new file +65 -0
@@ -0,0 +1,65 @@ +SUMMARY = "System-Wide Profiler" +DESCRIPTION = "OProfile is a system-wide profiler for Linux systems, capable \ +of profiling all running code at low overhead." +HOMEPAGE = "http://oprofile.sourceforge.net/news/" +BUGTRACKER = "http://sourceforge.net/tracker/?group_id=16191&atid=116191" + +LICENSE = "LGPLv2.1+ & GPLv2" +LIC_FILES_CHKSUM = "file://COPYING;md5=94d55d512a9ba36caa9b7df079bae19f \ + file://libopagent/opagent.h;beginline=5;endline=26;md5=4f16f72c7a493d8a4704aa18d03d15c6 \ + " +SECTION = "devel" + +DEPENDS = "popt binutils" +RDEPENDS_${PN} = "binutils-symlinks" +RRECOMMENDS_${PN} = "kernel-vmlinux" + +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" + +SRC_URI = "${SOURCEFORGE_MIRROR}/${BPN}/${BPN}-${PV}.tar.gz \ + file://acinclude.m4 \ + file://automake-foreign.patch \ + file://oprofile-cross-compile-tests.patch \ + file://run-ptest \ + file://root-home-dir.patch \ + file://0001-Add-rmb-definition-for-NIOS2-architecture.patch \ + file://0001-Fix-FTBFS-problem-with-GCC-6.patch \ +" +UPSTREAM_CHECK_REGEX = "oprofile-(?P<pver>\d+(\.\d+)+)/" +UPSTREAM_CHECK_URI = "https://sourceforge.net/projects/oprofile/files/oprofile/" + +SRC_URI_append_libc-musl = " file://musl.patch" + +inherit autotools pkgconfig ptest + +EXTRA_OECONF = "--with-kernel=${STAGING_DIR_HOST}${prefix} --without-x ac_cv_prog_XSLTPROC=" +do_configure () { + cp ${WORKDIR}/acinclude.m4 ${S}/ + autotools_do_configure +} + +EXTRA_OEMAKE = "SRCDIR=${PTEST_PATH}/libutil++/tests" +do_compile_ptest() { + oe_runmake check +} + +do_install_ptest() { + subdirs="libdb/tests libutil++/tests libregex/tests libutil/tests libop/tests libdb/tests " + for tooltest in ${subdirs} + do + find ${tooltest} -perm /u=x -type f| cpio -pvdu ${D}${PTEST_PATH} + done + + # needed by some libop tests + cp -r events ${D}${PTEST_PATH} + + # needed by libregex regex_test + cp libregex/stl.pat ${D}${PTEST_PATH}/libregex + cp libregex/tests/mangled-name ${D}${PTEST_PATH}/libregex/tests + + # needed by litutil++ file_manip_tests + cp ${S}/libutil++/tests/file_manip_tests.cpp \ + libutil++/tests/file_manip_tests.o ${D}${PTEST_PATH}/libutil++/tests +}
meta-oe/recipes-kernel/oprofile/oprofile/0001-Add-rmb-definition-for-NIOS2-architecture.patch new file +30 -0
@@ -0,0 +1,30 @@ +From 34b0d9b1a32fb404a30327a7ae8931c7c75583bf Mon Sep 17 00:00:00 2001 +From: Marek Vasut <[email protected]> +Date: Tue, 9 Feb 2016 02:00:29 +0100 +Subject: [PATCH] Add rmb() definition for NIOS2 architecture + +Signed-off-by: Marek Vasut <[email protected]> +Upstream-Status: Submitted [ http://marc.info/?l=oprofile-list&m=145501915931874&w=2 ] +--- + libperf_events/operf_utils.h | 5 +++++ + 1 file changed, 5 insertions(+) + +diff --git a/libperf_events/operf_utils.h b/libperf_events/operf_utils.h +index 32954cc..8270e53 100644 +--- a/libperf_events/operf_utils.h ++++ b/libperf_events/operf_utils.h +@@ -178,6 +178,11 @@ void op_release_resources(void); + #define cpu_relax() asm volatile("" ::: "memory") + #endif + ++#ifdef __nios2__ ++#define rmb() asm volatile("" ::: "memory") ++#define cpu_relax() asm volatile("" ::: "memory") ++#endif ++ + #ifdef __tile__ + #include <asm/unistd.h> + #define rmb() __insn_mf() +-- +2.7.0 +
meta-oe/recipes-kernel/oprofile/oprofile/0001-Fix-FTBFS-problem-with-GCC-6.patch new file +51 -0
51 lines not on this page · raw message
meta-oe/recipes-kernel/oprofile/oprofile/acinclude.m4 new file +581 -0
581 lines not on this page · raw message
meta-oe/recipes-kernel/oprofile/oprofile/automake-foreign.patch new file +12 -0
@@ -0,0 +1,12 @@ +oprofile doesn't want GNU-levels of automake strictness so tell it to be "foreign". + +Upstream-Status: Pending +Signed-off-by: Ross Burton <[email protected]> + +diff --git a/configure.ac b/configure.ac +index 5740585..cf6c316 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -16 +16 @@ AC_CONFIG_SRCDIR([libop/op_config.h]) +-AM_INIT_AUTOMAKE ++AM_INIT_AUTOMAKE([foreign])
meta-oe/recipes-kernel/oprofile/oprofile/musl.patch new file +46 -0
46 lines not on this page · raw message
meta-oe/recipes-kernel/oprofile/oprofile/oprofile-cross-compile-tests.patch new file +98 -0
98 lines not on this page · raw message
meta-oe/recipes-kernel/oprofile/oprofile/root-home-dir.patch new file +44 -0
44 lines not on this page · raw message
meta-oe/recipes-kernel/oprofile/oprofile/run-ptest new file +19 -0
@@ -0,0 +1,19 @@ +#!/bin/sh + +saved_dir=$PWD +for dir in */tests ; do + cd $dir + for atest in * ; do + if [ \( -x $atest \) -a \( -f $atest \) ] ; then + ./$atest > ${atest}.stdout 2> ${atest}.stderr + if [ $? = 0 ] ; then + echo "PASS: $dir $atest" + rm ${atest}.stdout ${atest}.stderr + else + echo "FAIL: ${dir}/${atest}" + fi + fi + done + cd $saved_dir +done +
meta-oe/recipes-kernel/oprofile/oprofile_1.1.0.bb new file +10 -0
@@ -0,0 +1,10 @@ +require oprofile.inc + +DEPENDS += "virtual/kernel" +DEPENDS_append_powerpc64 = " libpfm4" + +SRC_URI[md5sum] = "248c4c069f9476f427fa7195563f9867" +SRC_URI[sha256sum] = "cf759a6de1a6033d5dfc93bda129a9f2e128aecc4238cc657feb0801d1b0366c" + +S = "${WORKDIR}/oprofile-${PV}" +
Signature · 1 line
2.7.4