From 2a56a141e09b1540875abb572229e5eaec68aef8 Mon Sep 17 00:00:00 2001 From: Gustavo Zacarias Date: Wed, 26 Oct 2011 21:21:43 -0300 Subject: oprofile: bump to version 0.9.7 and fixes * Bump to version 0.9.7 * Style fixes * Build fix for x86: i386 is expected, not some other random i?86 as arch Signed-off-by: Gustavo Zacarias Signed-off-by: Peter Korsgaard --- ...ile-0.9.4-001-avr32-enable-lookup_dcookie.patch | 24 ---------------------- .../oprofile-0.9.4-002-no-query-modules.patch | 21 ------------------- ...ile-0.9.7-001-avr32-enable-lookup_dcookie.patch | 24 ++++++++++++++++++++++ .../oprofile-0.9.7-002-no-query-modules.patch | 21 +++++++++++++++++++ package/oprofile/oprofile.mk | 21 ++++++++++--------- 5 files changed, 56 insertions(+), 55 deletions(-) delete mode 100644 package/oprofile/oprofile-0.9.4-001-avr32-enable-lookup_dcookie.patch delete mode 100644 package/oprofile/oprofile-0.9.4-002-no-query-modules.patch create mode 100644 package/oprofile/oprofile-0.9.7-001-avr32-enable-lookup_dcookie.patch create mode 100644 package/oprofile/oprofile-0.9.7-002-no-query-modules.patch diff --git a/package/oprofile/oprofile-0.9.4-001-avr32-enable-lookup_dcookie.patch b/package/oprofile/oprofile-0.9.4-001-avr32-enable-lookup_dcookie.patch deleted file mode 100644 index 7c4138946..000000000 --- a/package/oprofile/oprofile-0.9.4-001-avr32-enable-lookup_dcookie.patch +++ /dev/null @@ -1,24 +0,0 @@ -Index: oprofile-0.9.4/daemon/opd_cookie.c -=================================================================== ---- oprofile-0.9.4.orig/daemon/opd_cookie.c 2008-07-25 16:00:17.000000000 +0200 -+++ oprofile-0.9.4/daemon/opd_cookie.c 2008-07-25 16:00:20.000000000 +0200 -@@ -78,6 +78,19 @@ - (unsigned long)(cookie & 0xffffffff), - (unsigned long)(cookie >> 32), buf, size); - } -+#elif (defined(__avr32__)) -+static inline int lookup_dcookie(cookie_t cookie, char * buf, size_t size) -+{ -+ /* On avr32, the first 64bit arg (cookie) is expected to be in -+ * r11(MSW)/r10(LSW) which normally hold arg 2 and arg 3. The second arg -+ * (buf) is then expected to be in r12 which normally holds the first -+ * arg. Third arg (size) is at the right position. -+ */ -+ return syscall(__NR_lookup_dcookie, buf, -+ (unsigned long)(cookie >> 32), -+ (unsigned long)(cookie & 0xffffffff), -+ size); -+} - #else - static inline int lookup_dcookie(cookie_t cookie, char * buf, size_t size) - { diff --git a/package/oprofile/oprofile-0.9.4-002-no-query-modules.patch b/package/oprofile/oprofile-0.9.4-002-no-query-modules.patch deleted file mode 100644 index 9f00da641..000000000 --- a/package/oprofile/oprofile-0.9.4-002-no-query-modules.patch +++ /dev/null @@ -1,21 +0,0 @@ -diff -urN oprofile-0.9.4-0rig//daemon/liblegacy/opd_kernel.c oprofile-0.9.4/daemon/liblegacy/opd_kernel.c ---- oprofile-0.9.4-0rig//daemon/liblegacy/opd_kernel.c 2005-05-04 04:47:03.000000000 +0200 -+++ oprofile-0.9.4/daemon/liblegacy/opd_kernel.c 2009-01-21 07:40:20.000000000 +0100 -@@ -270,6 +270,9 @@ - */ - static void opd_drop_module_sample(unsigned long eip) - { -+ verbprintf(vmodule, "query_module not available on linux-2.6: %s\n", strerror(EPERM)); -+ -+#if 0 - char * module_names; - char * name; - size_t size = 1024; -@@ -307,6 +310,7 @@ - - if (module_names) - free(module_names); -+#endif - } - - diff --git a/package/oprofile/oprofile-0.9.7-001-avr32-enable-lookup_dcookie.patch b/package/oprofile/oprofile-0.9.7-001-avr32-enable-lookup_dcookie.patch new file mode 100644 index 000000000..7c4138946 --- /dev/null +++ b/package/oprofile/oprofile-0.9.7-001-avr32-enable-lookup_dcookie.patch @@ -0,0 +1,24 @@ +Index: oprofile-0.9.4/daemon/opd_cookie.c +=================================================================== +--- oprofile-0.9.4.orig/daemon/opd_cookie.c 2008-07-25 16:00:17.000000000 +0200 ++++ oprofile-0.9.4/daemon/opd_cookie.c 2008-07-25 16:00:20.000000000 +0200 +@@ -78,6 +78,19 @@ + (unsigned long)(cookie & 0xffffffff), + (unsigned long)(cookie >> 32), buf, size); + } ++#elif (defined(__avr32__)) ++static inline int lookup_dcookie(cookie_t cookie, char * buf, size_t size) ++{ ++ /* On avr32, the first 64bit arg (cookie) is expected to be in ++ * r11(MSW)/r10(LSW) which normally hold arg 2 and arg 3. The second arg ++ * (buf) is then expected to be in r12 which normally holds the first ++ * arg. Third arg (size) is at the right position. ++ */ ++ return syscall(__NR_lookup_dcookie, buf, ++ (unsigned long)(cookie >> 32), ++ (unsigned long)(cookie & 0xffffffff), ++ size); ++} + #else + static inline int lookup_dcookie(cookie_t cookie, char * buf, size_t size) + { diff --git a/package/oprofile/oprofile-0.9.7-002-no-query-modules.patch b/package/oprofile/oprofile-0.9.7-002-no-query-modules.patch new file mode 100644 index 000000000..9f00da641 --- /dev/null +++ b/package/oprofile/oprofile-0.9.7-002-no-query-modules.patch @@ -0,0 +1,21 @@ +diff -urN oprofile-0.9.4-0rig//daemon/liblegacy/opd_kernel.c oprofile-0.9.4/daemon/liblegacy/opd_kernel.c +--- oprofile-0.9.4-0rig//daemon/liblegacy/opd_kernel.c 2005-05-04 04:47:03.000000000 +0200 ++++ oprofile-0.9.4/daemon/liblegacy/opd_kernel.c 2009-01-21 07:40:20.000000000 +0100 +@@ -270,6 +270,9 @@ + */ + static void opd_drop_module_sample(unsigned long eip) + { ++ verbprintf(vmodule, "query_module not available on linux-2.6: %s\n", strerror(EPERM)); ++ ++#if 0 + char * module_names; + char * name; + size_t size = 1024; +@@ -307,6 +310,7 @@ + + if (module_names) + free(module_names); ++#endif + } + + diff --git a/package/oprofile/oprofile.mk b/package/oprofile/oprofile.mk index ae4cddeb1..734839f24 100644 --- a/package/oprofile/oprofile.mk +++ b/package/oprofile/oprofile.mk @@ -3,25 +3,26 @@ # oprofile # ############################################################# -OPROFILE_VERSION := 0.9.6 -OPROFILE_CONF_OPT := --localstatedir=/var \ - --with-kernel-support -OPROFILE_BINARIES := utils/ophelp -OPROFILE_BINARIES += pp/opannotate pp/oparchive pp/opgprof pp/opreport opjitconv/opjitconv -OPROFILE_BINARIES += daemon/oprofiled +OPROFILE_VERSION = 0.9.7 +OPROFILE_CONF_OPT = --localstatedir=/var --with-kernel-support +OPROFILE_BINARIES = utils/ophelp pp/opannotate pp/oparchive pp/opgprof +OPROFILE_BINARIES += pp/opreport opjitconv/opjitconv daemon/oprofiled +ifeq ($(BR2_i386),y) +OPROFILE_ARCH = i386 +endif ifeq ($(BR2_powerpc),y) -OPROFILE_ARCH := ppc +OPROFILE_ARCH = ppc endif ifeq ($(BR2_x86_64),y) -OPROFILE_ARCH := x86-64 +OPROFILE_ARCH = x86-64 endif ifeq ($(OPROFILE_ARCH),) -OPROFILE_ARCH := $(BR2_ARCH) +OPROFILE_ARCH = $(BR2_ARCH) endif -OPROFILE_DEPENDENCIES := popt binutils +OPROFILE_DEPENDENCIES = popt binutils define OPROFILE_INSTALL_TARGET_CMDS $(INSTALL) -d -m 755 $(TARGET_DIR)/usr/bin -- cgit v1.2.3