perf tools: fix build for rbtree.c change
PATCH 1/2 perf tools: fix build for rbtree.c change
From: Andi Kleen <[email protected]>
rbtree.c in the main tree now includes linux/export.h, so this file needs a stub too. This makes perf build again in mainline.
--- tools/perf/util/include/linux/export.h | 1 + 1 files changed, 1 insertions(+), 0 deletions(-) create mode 100644 tools/perf/util/include/linux/export.h
tools/perf/util/include/linux/export.h new file +1 -0
@@ -0,0 +1 @@ +#include <linux/module.h>
Signature · 1 line
1.7.7.6
PATCH 2/2 perf tools: Fix record sample overlap check for callchains
From: Andi Kleen <[email protected]>
perf record checks for buffer overflow, but checked for the wrong size for callchains. callchains are 8 bytes each, not 1.
--- tools/perf/util/evsel.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
tools/perf/util/evsel.c +1 -1
@@ -550,7 +550,7 @@ int perf_event__parse_sample(const union perf_event *event, u64 type, data->callchain = (struct ip_callchain *)array; -if (sample_overlap (event, array, data->callchain->nr)) +if (sample_overlap (event, array, (1 + data->callchain->nr) *8 ))return -EFAULT ; array +=1 + data->callchain->nr;
Signature · 1 line
1.7.7.6
Re: [PATCH 2/2] perf tools: Fix record sample overlap check for callchains
Quoted 15 lines · Andi Kleen
From: Andi Kleen<[email protected]>
perf record checks for buffer overflow, but checked for the wrong size for callchains. callchains are 8 bytes each, not 1.
Signed-off-by Andi Kleen<[email protected]>--- tools/perf/util/evsel.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)tools/perf/util/evsel.c +0
-0
tools/perf/util/evsel.c int perf_event__parse_sample(const union perf_event *event, u64 type, · line 553
Quoted 5 lines
tools/perf/util/evsel.c +1
-1@@ -550,7 +550,7 @@ int perf_event__parse_sample(const union perf_event *event, u64 type, data->callchain = (struct ip_callchain *)array; -if (sample_overlap (event, array, data->callchain->nr)) +if (sample_overlap (event, array, (1 + data->callchain->nr) *8 ))
sizeof(u64) rather than the magic 8?
David
Quoted 3 lines
tools/perf/util/evsel.c +0
-0return -EFAULT ; array +=1 + data->callchain->nr;
Quoted 6 lines · Andi Kleen
From: Andi Kleen <[email protected]>
rbtree.cin the main tree now includeslinux/export.h, so this file needs a stub too. This makes perf build again in mainline.Signed-off-by Andi Kleen <[email protected]>
Apparently 'perf-urgent-for-linus' isn't as urgent as it sounds?
josh
Em Fri, Mar 30, 2012 at 01:47:53PM -0400, Josh Boyer escreveu:
Quoted 11 lines · Andi Kleen
Quoted 6 lines
From: Andi Kleen <[email protected]>
rbtree.cin the main tree now includeslinux/export.h, so this file needs a stub too. This makes perf build again in mainline.Signed-off-by Andi Kleen <[email protected]>Apparently 'perf-urgent-for-linus' isn't as urgent as it sounds?
There was a delay due to a resolution on getting rid of pre-generated bison/flex files, but Ingo should expedite that pull request RSN.
- Arnaldo
Em Fri, Mar 30, 2012 at 10:38:33AM -0700, Andi Kleen escreveu:
Quoted 4 lines
From: Andi Kleen <[email protected]>
rbtree.cin the main tree now includeslinux/export.h, so this file needs a stub too. This makes perf build again in mainline.
Thank you, this one got fixed already.
Quoted 15 lines
Signed-off-by Andi Kleen <[email protected]>--- tools/perf/util/include/linux/export.h | 1 + 1 files changed, 1 insertions(+), 0 deletions(-) create mode 100644 tools/perf/util/include/linux/export.htools/perf/util/include/linux/export.h new file +1
-0@@ -0,0 +1 @@ +#include <linux/module.h> Signature · 1 line
1.7.7.6