Skip to contentSkip to conversation

linux-imx: Add a patch to fix perf compilation issue.

PATCH Superseded Noor, Ahsan 3 participants 3 messages Dec 19, 2012 Arm i.MX and Layerscape

v2 of 3 Superseded Latest is v3 →

lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 linux-imx: Add a patch to fix perf compilation issue.

From: Noor Ahsan <[email protected]>

* Perf gived compilation error
CC builtin-sched.o
builtin-sched.c: In function ‘get_cpu_usage_nsec_parent’:
builtin-sched.c:399:16: error: storage size of ‘ru’ isn’t known
* Added a patch from linux kernel git repo commit id 7b78f13603c6fcb64e020a0bbe31a651ea2b657b which include resource.h file in builtin-sched.c.
* Bump PR.
* Verified it on Saberlite machine.

---
 .../linux/linux-imx/fix_getrusage_for_perf.patch   |   33 ++++++++++++++++++++
 recipes-kernel/linux/linux-imx_3.0.35.bb           |    5 ++-
 2 files changed, 37 insertions(+), 1 deletion(-)
recipes-kernel/linux/linux-imx/fix_getrusage_for_perf.patch new file +33 -0
new file mode 100644
index 0000000..24a311c
@@ -0,0 +1,33 @@
+commit 7b78f13603c6fcb64e020a0bbe31a651ea2b657b
+Author: Markus Trippelsdorf <[email protected]>
+Date:   Wed Apr 4 10:45:27 2012 +0200
+
+    perf tools: Fix getrusage() related build failure on glibc trunk
+    
+    On a system running glibc trunk perf doesn't build:
+    
+        CC builtin-sched.o
+    builtin-sched.c: In function ‘get_cpu_usage_nsec_parent’: builtin-sched.c:399:16: error: storage size of ‘ru’ isn’t known builtin-sched.c:403:2: error: implicit declaration of function ‘getrusage’ [-Werror=implicit-function-declaration]
+        [...]
+    
+    Fix it by including sys/resource.h.
+    
+    Signed-off-by: Markus Trippelsdorf <[email protected]>
+    Cc: Peter Zijlstra <[email protected]>
+    Link: http://lkml.kernel.org/r/20120404084527.GA294@x4
+    Signed-off-by: Ingo Molnar <[email protected]>
+
+Upstream-Status: merged
+
+diff --git a/tools/perf/builtin-sched.c b/tools/perf/builtin-sched.c
+index fb8b5f8..1cad3af 100644
+--- a/tools/perf/builtin-sched.c
++++ b/tools/perf/builtin-sched.c
+@@ -17,6 +17,7 @@
+ #include "util/debug.h"
+ 
+ #include <sys/prctl.h>
++#include <sys/resource.h>
+ 
+ #include <semaphore.h>
+ #include <pthread.h>
recipes-kernel/linux/linux-imx_3.0.35.bb +4 -1
index 4aa5f08..c06696e 100644
@@ -3,7 +3,7 @@
 
 include linux-imx.inc
 
-PR = "${INC_PR}.5"
+PR = "${INC_PR}.6"
 
 COMPATIBLE_MACHINE = "(mx6)"
 
@@ -13,3 +13,6 @@ LOCALVERSION = "-12.09.01+yocto"
 
 # iMX6Q SabreLITE changes done by Boundary Devices
 SRC_URI_append_imx6qsabrelite = " file://sync-boundary-changes.patch"
+
+SRC_URI += "file://fix_getrusage_for_perf.patch \
+           "
Signature · 1 line
1.7.9.5
#1 lore raw
Quoted 12 lines · Ahsan

From: Noor Ahsan <[email protected]>

* Perf gived compilation error
CC builtin-sched.o
builtin-sched.c: In function ‘get_cpu_usage_nsec_parent’:
builtin-sched.c:399:16: error: storage size of ‘ru’ isn’t known
* Added a patch from linux kernel git repo commit id 7b78f13603c6fcb64e020a0bbe31a651ea2b657b which include resource.h file in builtin-sched.c.
* Bump PR.
* Verified it on Saberlite machine.

Quoted 1 line

We're almost OK, just minor issues...

Quoted 21 lines
---
 .../linux/linux-imx/fix_getrusage_for_perf.patch   |   33 ++++++++++++++++++++
 recipes-kernel/linux/linux-imx_3.0.35.bb           |    5 ++-
 2 files changed, 37 insertions(+), 1 deletion(-)
recipes-kernel/linux/linux-imx/fix_getrusage_for_perf.patch new file +10 -0
new file mode 100644
index 0000000..24a311c
@@ -0,0 +1,33 @@
+commit 7b78f13603c6fcb64e020a0bbe31a651ea2b657b
+Author: Markus Trippelsdorf <[email protected]>
+Date:   Wed Apr 4 10:45:27 2012 +0200
+
+    perf tools: Fix getrusage() related build failure on glibc trunk
+
+    On a system running glibc trunk perf doesn't build:
+
+        CC builtin-sched.o
+    builtin-sched.c: In function ‘get_cpu_usage_nsec_parent’: builtin-sched.c:399:16: error: storage size of ‘ru’ isn’t known builtin-sched.c:403:2: error: implicit declaration of function ‘getrusage’ [-Werror=implicit-function-declaration]

recipes-kernel/linux/linux-imx/fix_getrusage_for_perf.patch line 20

Quoted 10 lines
recipes-kernel/linux/linux-imx/fix_getrusage_for_perf.patch new file +10 -0
+        [...]
+
+    Fix it by including sys/resource.h.
+
+    Signed-off-by: Markus Trippelsdorf <[email protected]>
+    Cc: Peter Zijlstra <[email protected]>
+    Link: http://lkml.kernel.org/r/20120404084527.GA294@x4
+    Signed-off-by: Ingo Molnar <[email protected]>
+
+Upstream-Status: merged

Please check the compatible Upstream-Status values at
http://www.openembedded.org/wiki/Commit_Patch_Message_Guidelines#Patch_Header_Recommendations
and adjust the patch.

...

Quoted 12 lines
recipes-kernel/linux/linux-imx_3.0.35.bb +1 -1
@@ -3,7 +3,7 @@
 
 include linux-imx.inc
 
-PR = "${INC_PR}.5"
+PR = "${INC_PR}.6"
 
 COMPATIBLE_MACHINE = "(mx6)"
 

recipes-kernel/linux/linux-imx_3.0.35.bb LOCALVERSION = "-12.09.01+yocto" · line 18

Quoted 6 lines
recipes-kernel/linux/linux-imx_3.0.35.bb +3 -0
@@ -13,3 +13,6 @@ LOCALVERSION = "-12.09.01+yocto"
 
 # iMX6Q SabreLITE changes done by Boundary Devices
 SRC_URI_append_imx6qsabrelite = " file://sync-boundary-changes.patch"
+
+SRC_URI += "file://fix_getrusage_for_perf.patch \
+           "

I'd prefer if SRC_URI += would be put *before* the SabreLITE one as it would be read *before* than board specific changes.

Please check those minor issues and please send a v3.

Regards,

--
Otavio Salvador O.S. Systems
E-mail: [email protected] http://www.ossystems.com.br
Mobile: +55 53 9981-7854 http://projetos.ossystems.com.br

#2 lore raw
Quoted 13 lines · Otavio Salvador
Quoted 12 lines · Ahsan

From: Noor Ahsan <[email protected]>

* Perf gived compilation error
CC builtin-sched.o
builtin-sched.c: In function ‘get_cpu_usage_nsec_parent’:
builtin-sched.c:399:16: error: storage size of ‘ru’ isn’t known
* Added a patch from linux kernel git repo commit id 7b78f13603c6fcb64e020a0bbe31a651ea2b657b which include resource.h file in builtin-sched.c.
* Bump PR.
* Verified it on Saberlite machine.

Quoted 3 lines
Quoted 1 line

We're almost OK, just minor issues...

Can I ask you do this for the meta-fsl-ppc version as well? Use the upstream patch?

-M

Quoted 72 lines
Quoted 22 lines
---
 .../linux/linux-imx/fix_getrusage_for_perf.patch   |   33 ++++++++++++++++++++
 recipes-kernel/linux/linux-imx_3.0.35.bb           |    5 ++-
 2 files changed, 37 insertions(+), 1 deletion(-)
recipes-kernel/linux/linux-imx/fix_getrusage_for_perf.patch new file +10 -0
new file mode 100644
index 0000000..24a311c
@@ -0,0 +1,33 @@
+commit 7b78f13603c6fcb64e020a0bbe31a651ea2b657b
+Author: Markus Trippelsdorf <[email protected]>
+Date:   Wed Apr 4 10:45:27 2012 +0200
+
+    perf tools: Fix getrusage() related build failure on glibc trunk
+
+    On a system running glibc trunk perf doesn't build:
+
+        CC builtin-sched.o
+    builtin-sched.c: In function ‘get_cpu_usage_nsec_parent’: builtin-sched.c:399:16: error: storage size of ‘ru’ isn’t known builtin-sched.c:403:2: error: implicit declaration of function ‘getrusage’ [-Werror=implicit-function-declaration]

recipes-kernel/linux/linux-imx/fix_getrusage_for_perf.patch line 20

Quoted 10 lines
recipes-kernel/linux/linux-imx/fix_getrusage_for_perf.patch new file +10 -0
+        [...]
+
+    Fix it by including sys/resource.h.
+
+    Signed-off-by: Markus Trippelsdorf <[email protected]>
+    Cc: Peter Zijlstra <[email protected]>
+    Link: http://lkml.kernel.org/r/20120404084527.GA294@x4
+    Signed-off-by: Ingo Molnar <[email protected]>
+
+Upstream-Status: merged

Please check the compatible Upstream-Status values at
http://www.openembedded.org/wiki/Commit_Patch_Message_Guidelines#Patch_Header_Recommendations
and adjust the patch.

...

Quoted 12 lines
recipes-kernel/linux/linux-imx_3.0.35.bb +1 -1
@@ -3,7 +3,7 @@
 
 include linux-imx.inc
 
-PR = "${INC_PR}.5"
+PR = "${INC_PR}.6"
 
 COMPATIBLE_MACHINE = "(mx6)"
 

recipes-kernel/linux/linux-imx_3.0.35.bb LOCALVERSION = "-12.09.01+yocto" · line 18

Quoted 6 lines
recipes-kernel/linux/linux-imx_3.0.35.bb +3 -0
@@ -13,3 +13,6 @@ LOCALVERSION = "-12.09.01+yocto"
 
 # iMX6Q SabreLITE changes done by Boundary Devices
 SRC_URI_append_imx6qsabrelite = " file://sync-boundary-changes.patch"
+
+SRC_URI += "file://fix_getrusage_for_perf.patch \
+           "

I'd prefer if SRC_URI += would be put *before* the SabreLITE one as it would be read *before* than board specific changes.

Please check those minor issues and please send a v3.

Regards,

--
Otavio Salvador O.S. Systems
E-mail: [email protected] http://www.ossystems.com.br
Mobile: +55 53 9981-7854 http://projetos.ossystems.com.br
_______________________________________________
meta-freescale mailing list [email protected]
https://lists.yoctoproject.org/listinfo/meta-freescale