sysprof: add aarch64 support
PATCH 1/1 sysprof: add aarch64 support
Enable sysprof compilation for aarch64.
--- .../recipes-kernel/sysprof/files/collector_c.patch | 30 ++++++++++++++++++++ meta/recipes-kernel/sysprof/files/rmb-arm.patch | 2 +- meta/recipes-kernel/sysprof/sysprof_git.bb | 2 + 3 files changed, 33 insertions(+), 1 deletions(-) create mode 100644 meta/recipes-kernel/sysprof/files/collector_c.patch
meta/recipes-kernel/sysprof/files/collector_c.patch new file +30 -0
@@ -0,0 +1,30 @@ +sysprof: recognize aarch64 + +Value for __NR_perf_counter_open set to value of __NR_perf_event_open +in usr/include/asm/unistd.h. + +Upstream-Status: Pending + +Signed-off-by: [email protected] + + +--- a/collector.c ++++ b/collector.c +@@ -157,6 +157,8 @@ sysprof_perf_counter_open (struct perf_e + #define __NR_perf_counter_open 298 + #elif defined(__arm__) + #define __NR_perf_counter_open 364 ++#elif defined(__aarch64__) ++#define __NR_perf_counter_open 241 + #elif defined(__bfin__) + #define __NR_perf_counter_open 369 + #elif defined(__frv__) +@@ -185,6 +187,8 @@ sysprof_perf_counter_open (struct perf_e + #define __NR_perf_counter_open 364 + #elif defined(__sparc__) || defined(__sparc64__) + #define __NR_perf_counter_open 327 ++#else ++#error "___NR_perf_counter_open is not defined" + #endif + #endif +
meta/recipes-kernel/sysprof/files/rmb-arm.patch +1 -1
@@ -9,7 +9,7 @@ Index: git/util.h #define cpu_relax() asm volatile("" ::: "memory"); #endif -+#ifdef __arm__ ++#if defined(__arm__) || defined(__aarch64__) +/* + * Use the __kuser_memory_barrier helper in the CPU helper page. See + * arch/arm/kernel/entry-armv.S in the kernel source for details.
meta/recipes-kernel/sysprof/sysprof_git.bb +2 -0
@@ -9,9 +9,11 @@ PV = "1.2.0+git${SRCPV}" SRC_URI = "git://git.gnome.org/sysprof \ file://define-NT_GNU_BUILD_ID.patch \ + file://collector_c.patch \ " SRC_URI_append_arm = " file://rmb-arm.patch" +SRC_URI_append_aarch64 = " file://rmb-arm.patch" SRC_URI_append_mips = " file://rmb-mips.patch" SRC_URI_append_mips64 = " file://rmb-mips.patch"
Signature · 1 line
1.7.3.4
Quoted 1 line · Joe Slater
+++
b/meta/recipes-kernel/sysprof/files/rmb-arm.patch
This patch is missing a signed-off-by and upstream-status.
Ross
Quoted 9 lines
-----Original Message-----
From: Burton, Ross [mailto:[email protected]]
Sent: Sunday, September 14, 2014 1:44 PM
To: Slater, Joseph
Cc: OE-core
Subject: Re: [OE-core] [oe-core][PATCH 1/1] sysprof: add aarch64 support
Quoted 4 lines
Quoted 1 line · Joe Slater
+++
b/meta/recipes-kernel/sysprof/files/rmb-arm.patchThis patch is missing a signed-off-by and upstream-status.
I am not creating this patch, just modifying it. The existing patch does have an upstream-status. To avoid this issue, I will fold the change to util.h into the new patch and not touch rmb-arm.patch.
Joe
Quoted 2 lines
Ross
Quoted 8 lines · Joseph W (Wind River)
Quoted 4 lines · Joe Slater
Quoted 1 line
+++
b/meta/recipes-kernel/sysprof/files/rmb-arm.patchThis patch is missing a signed-off-by and upstream-status.
I am not creating this patch, just modifying it. The existing patch does have an upstream-status. To avoid this issue, I will fold the change to
util.hinto the new patch and not touch rmb-arm.patch.
You're right, sorry. Don't worry about changing your patch.
Ross
Quoted 3 lines · Joe Slater
-+#ifdef
__arm__
++#ifdefined(__arm__)||defined(__aarch64__)
+/*
This code defined memory barriers for 32bit, Are you sure it should be same for 64bit as well ?
how was this tested ?
It is not runtime tested. The intent is to allow world builds for aarch64.
Joe
Quoted 15 lines
-----Original Message-----
From: Khem Raj [mailto:[email protected]]
Sent: Monday, September 15, 2014 11:10 PM
To: Slater, Joseph
Cc: Patches and discussions about the oe-core layer
Subject: Re: [OE-core] [oe-core][PATCH 1/1] sysprof: add aarch64 supportQuoted 3 lines · Joe Slater
-+#ifdef
__arm__
++#ifdefined(__arm__)||defined(__aarch64__)
+/*This code defined memory barriers for 32bit, Are you sure it should be same for 64bit as well ?
how was this tested ?
Quoted 1 line · Joseph
It is not runtime tested. The intent is to allow world builds for aarch64.
In that case would it be more suitable to use COMPATIBLE_* to exclude aarch64 until it is tested?
Ross
Quoted 9 lines · Ross
Quoted 1 line · On 16 September 2014 20:27, Slater, Joseph <[email protected]…
It is not runtime tested. The intent is to allow world builds for
aarch64.
In that case would it be more suitable to use COMPATIBLE_* to exclude aarch64 until it is tested?
Yes please. Such patches can cause larger pain later. I would avoid them if not tested
Quoted 2 lines
Ross