linux-perf: Fix FTBFS with gcc 6 (used on hppa, sparc64)
This commit is contained in:
parent
ec2f54f0aa
commit
68515dfcb9
|
@ -1,3 +1,9 @@
|
||||||
|
linux-tools (4.4-1~exp2) experimental; urgency=medium
|
||||||
|
|
||||||
|
* linux-perf: Fix FTBFS with gcc 6 (used on hppa, sparc64)
|
||||||
|
|
||||||
|
-- Ben Hutchings <ben@decadent.org.uk> Tue, 19 Jan 2016 22:11:13 +0000
|
||||||
|
|
||||||
linux-tools (4.4-1~exp1) experimental; urgency=medium
|
linux-tools (4.4-1~exp1) experimental; urgency=medium
|
||||||
|
|
||||||
* New upstream release
|
* New upstream release
|
||||||
|
|
|
@ -0,0 +1,30 @@
|
||||||
|
From: Markus Trippelsdorf <markus@trippelsdorf.de>
|
||||||
|
Subject: Add missing braces to if statement
|
||||||
|
Date: Mon, 14 Dec 2015 16:44:03 +0100
|
||||||
|
Origin: http://article.gmane.org/gmane.linux.kernel/2108038
|
||||||
|
|
||||||
|
Add missing braces to if statement.
|
||||||
|
|
||||||
|
The issue was pointed out by gcc-6's -Wmisleading-indentation.
|
||||||
|
|
||||||
|
Acked-by: Ingo Molnar <mingo@kernel.org>
|
||||||
|
Signed-off-by: Markus Trippelsdorf <markus@trippelsdorf.de>
|
||||||
|
---
|
||||||
|
diff --git a/tools/perf/ui/browsers/annotate.c b/tools/perf/ui/browsers/annotate.c
|
||||||
|
index d4d7cc27252f..718bd46d47fa 100644
|
||||||
|
--- a/tools/perf/ui/browsers/annotate.c
|
||||||
|
+++ b/tools/perf/ui/browsers/annotate.c
|
||||||
|
@@ -755,11 +755,11 @@ static int annotate_browser__run(struct annotate_browser *browser,
|
||||||
|
nd = browser->curr_hot;
|
||||||
|
break;
|
||||||
|
case K_UNTAB:
|
||||||
|
- if (nd != NULL)
|
||||||
|
+ if (nd != NULL) {
|
||||||
|
nd = rb_next(nd);
|
||||||
|
if (nd == NULL)
|
||||||
|
nd = rb_first(&browser->entries);
|
||||||
|
- else
|
||||||
|
+ } else
|
||||||
|
nd = browser->curr_hot;
|
||||||
|
break;
|
||||||
|
case K_F1:
|
|
@ -0,0 +1,26 @@
|
||||||
|
From: Markus Trippelsdorf <markus@trippelsdorf.de>
|
||||||
|
Subject: Fix misleadingly indented assignment (whitespace)
|
||||||
|
Date: Mon, 14 Dec 2015 16:44:40 +0100
|
||||||
|
Origin: http://article.gmane.org/gmane.linux.kernel/2108042
|
||||||
|
|
||||||
|
Fix misleadingly indented assignment.
|
||||||
|
This is just a simple whitespace fix.
|
||||||
|
|
||||||
|
The issue was pointed out by gcc-6's -Wmisleading-indentation.
|
||||||
|
|
||||||
|
Acked-by: Ingo Molnar <mingo@kernel.org>
|
||||||
|
Signed-off-by: Markus Trippelsdorf <markus@trippelsdorf.de>
|
||||||
|
---
|
||||||
|
diff --git a/tools/perf/util/pmu.c b/tools/perf/util/pmu.c
|
||||||
|
index e4b173dec4b9..c900b664ab8f 100644
|
||||||
|
--- a/tools/perf/util/pmu.c
|
||||||
|
+++ b/tools/perf/util/pmu.c
|
||||||
|
@@ -153,7 +153,7 @@ static int perf_pmu__parse_unit(struct perf_pmu_alias *alias, char *dir, char *n
|
||||||
|
if (fd == -1)
|
||||||
|
return -1;
|
||||||
|
|
||||||
|
- sret = read(fd, alias->unit, UNIT_MAX_LEN);
|
||||||
|
+ sret = read(fd, alias->unit, UNIT_MAX_LEN);
|
||||||
|
if (sret < 0)
|
||||||
|
goto error;
|
||||||
|
|
|
@ -0,0 +1,26 @@
|
||||||
|
From: Markus Trippelsdorf <markus@trippelsdorf.de>
|
||||||
|
Subject: Remove wrong semicolon in while loop
|
||||||
|
Date: Mon, 14 Dec 2015 16:43:35 +0100
|
||||||
|
Origin: http://article.gmane.org/gmane.linux.kernel/2108037
|
||||||
|
|
||||||
|
The while loop was spinning. Fix by removing a semicolon.
|
||||||
|
|
||||||
|
The issue was pointed out by gcc-6's -Wmisleading-indentation.
|
||||||
|
|
||||||
|
Reviewed-by: Matt Fleming <matt@codeblueprint.co.uk>
|
||||||
|
Acked-by: Ingo Molnar <mingo@kernel.org>
|
||||||
|
Signed-off-by: Markus Trippelsdorf <markus@trippelsdorf.de>
|
||||||
|
---
|
||||||
|
diff --git a/tools/perf/arch/x86/tests/intel-cqm.c b/tools/perf/arch/x86/tests/intel-cqm.c
|
||||||
|
index d28c1b6a3b54..fa5d17af88b7 100644
|
||||||
|
--- a/tools/perf/arch/x86/tests/intel-cqm.c
|
||||||
|
+++ b/tools/perf/arch/x86/tests/intel-cqm.c
|
||||||
|
@@ -17,7 +17,7 @@ static pid_t spawn(void)
|
||||||
|
if (pid)
|
||||||
|
return pid;
|
||||||
|
|
||||||
|
- while(1);
|
||||||
|
+ while(1)
|
||||||
|
sleep(5);
|
||||||
|
return 0;
|
||||||
|
}
|
|
@ -0,0 +1,75 @@
|
||||||
|
From: Ben Hutchings <ben@decadent.org.uk>
|
||||||
|
Date: Tue, 19 Jan 2016 21:12:41 +0000
|
||||||
|
Subject: perf tools: Fix unused variables: x86_{32,64}_regoffset_table
|
||||||
|
Forwarded: http://mid.gmane.org/20160119213306.GE2637@decadent.org.uk
|
||||||
|
|
||||||
|
gcc 5 doesn't seem to care about these, but gcc 6 does and that
|
||||||
|
results in a build failure.
|
||||||
|
|
||||||
|
Fixes: bbbe6bf6037d ("perf tools: Introduce regs_query_register_offset() ...")
|
||||||
|
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
|
||||||
|
---
|
||||||
|
tools/perf/arch/x86/util/dwarf-regs.c | 38 ++++++++++++++++-------------------
|
||||||
|
1 file changed, 17 insertions(+), 21 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/tools/perf/arch/x86/util/dwarf-regs.c b/tools/perf/arch/x86/util/dwarf-regs.c
|
||||||
|
index 9223c16..fe1e516 100644
|
||||||
|
--- a/tools/perf/arch/x86/util/dwarf-regs.c
|
||||||
|
+++ b/tools/perf/arch/x86/util/dwarf-regs.c
|
||||||
|
@@ -55,26 +55,10 @@ struct pt_regs_offset {
|
||||||
|
|
||||||
|
#define REG_OFFSET_END {.name = NULL, .offset = 0}
|
||||||
|
|
||||||
|
+/* TODO: switching by dwarf address size */
|
||||||
|
#ifdef __x86_64__
|
||||||
|
-# define REG_OFFSET_NAME_64(n, r) {.name = n, .offset = offsetof(struct pt_regs, r)}
|
||||||
|
-# define REG_OFFSET_NAME_32(n, r) {.name = n, .offset = -1}
|
||||||
|
-#else
|
||||||
|
-# define REG_OFFSET_NAME_64(n, r) {.name = n, .offset = -1}
|
||||||
|
-# define REG_OFFSET_NAME_32(n, r) {.name = n, .offset = offsetof(struct pt_regs, r)}
|
||||||
|
-#endif
|
||||||
|
-
|
||||||
|
-static const struct pt_regs_offset x86_32_regoffset_table[] = {
|
||||||
|
- REG_OFFSET_NAME_32("%ax", eax),
|
||||||
|
- REG_OFFSET_NAME_32("%cx", ecx),
|
||||||
|
- REG_OFFSET_NAME_32("%dx", edx),
|
||||||
|
- REG_OFFSET_NAME_32("%bx", ebx),
|
||||||
|
- REG_OFFSET_NAME_32("$stack", esp), /* Stack address instead of %sp */
|
||||||
|
- REG_OFFSET_NAME_32("%bp", ebp),
|
||||||
|
- REG_OFFSET_NAME_32("%si", esi),
|
||||||
|
- REG_OFFSET_NAME_32("%di", edi),
|
||||||
|
- REG_OFFSET_END,
|
||||||
|
-};
|
||||||
|
|
||||||
|
+#define REG_OFFSET_NAME_64(n, r) {.name = n, .offset = offsetof(struct pt_regs, r)}
|
||||||
|
static const struct pt_regs_offset x86_64_regoffset_table[] = {
|
||||||
|
REG_OFFSET_NAME_64("%ax", rax),
|
||||||
|
REG_OFFSET_NAME_64("%dx", rdx),
|
||||||
|
@@ -94,12 +78,24 @@ static const struct pt_regs_offset x86_64_regoffset_table[] = {
|
||||||
|
REG_OFFSET_NAME_64("%r15", r15),
|
||||||
|
REG_OFFSET_END,
|
||||||
|
};
|
||||||
|
-
|
||||||
|
-/* TODO: switching by dwarf address size */
|
||||||
|
-#ifdef __x86_64__
|
||||||
|
#define regoffset_table x86_64_regoffset_table
|
||||||
|
+
|
||||||
|
#else
|
||||||
|
+
|
||||||
|
+#define REG_OFFSET_NAME_32(n, r) {.name = n, .offset = offsetof(struct pt_regs, r)}
|
||||||
|
+static const struct pt_regs_offset x86_32_regoffset_table[] = {
|
||||||
|
+ REG_OFFSET_NAME_32("%ax", eax),
|
||||||
|
+ REG_OFFSET_NAME_32("%cx", ecx),
|
||||||
|
+ REG_OFFSET_NAME_32("%dx", edx),
|
||||||
|
+ REG_OFFSET_NAME_32("%bx", ebx),
|
||||||
|
+ REG_OFFSET_NAME_32("$stack", esp), /* Stack address instead of %sp */
|
||||||
|
+ REG_OFFSET_NAME_32("%bp", ebp),
|
||||||
|
+ REG_OFFSET_NAME_32("%si", esi),
|
||||||
|
+ REG_OFFSET_NAME_32("%di", edi),
|
||||||
|
+ REG_OFFSET_END,
|
||||||
|
+};
|
||||||
|
#define regoffset_table x86_32_regoffset_table
|
||||||
|
+
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/* Minus 1 for the ending REG_OFFSET_END */
|
|
@ -16,3 +16,7 @@ revert-perf-build-fix-libunwind-feature-detection-on.patch
|
||||||
alpha-uapi-add-support-for-__sane_userspace_types__.patch
|
alpha-uapi-add-support-for-__sane_userspace_types__.patch
|
||||||
nvme-stop-installing-kernel-only-linux-nvme.h-as-uap.patch
|
nvme-stop-installing-kernel-only-linux-nvme.h-as-uap.patch
|
||||||
perf-tools-fix-reading-of-build-id-from-vdso.patch
|
perf-tools-fix-reading-of-build-id-from-vdso.patch
|
||||||
|
perf-fix-misleadingly-indented-assignment-whitespace.patch
|
||||||
|
perf-add-missing-braces-to-if-statement.patch
|
||||||
|
perf-tools-fix-unused-variables-x86_-32-64-_regoffse.patch
|
||||||
|
perf-remove-wrong-semicolon-in-while-loop.patch
|
||||||
|
|
Loading…
Reference in New Issue