* [PATCH] perf, tool: Fix the array pointer to follow event data properly
@ 2012-03-24 14:19 Jiri Olsa
2012-03-24 16:00 ` David Ahern
0 siblings, 1 reply; 4+ messages in thread
From: Jiri Olsa @ 2012-03-24 14:19 UTC (permalink / raw)
To: acme, a.p.zijlstra, mingo, paulus, cjashfor, fweisbec
Cc: linux-kernel, Jiri Olsa
Currently we dont update the 'array' pointer properly after
processing the RAW data. This way perf might report wrong data
for branch stack if it is used along with tracepoint sample.
I'm not sure tracepoint could be connected with branch stack,
but I think the array pointer should have correct value after
each sample processing.
Signed-off-by: Jiri Olsa <jolsa@redhat.com>
---
tools/perf/util/evsel.c | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)
diff --git a/tools/perf/util/evsel.c b/tools/perf/util/evsel.c
index d9da62a..56a96896 100644
--- a/tools/perf/util/evsel.c
+++ b/tools/perf/util/evsel.c
@@ -580,6 +580,7 @@ int perf_event__parse_sample(const union perf_event *event, u64 type,
return -EFAULT;
data->raw_data = (void *) pdata;
+ array = (u64 *)(((char *)array) + data->raw_size + sizeof(u32));
}
if (type & PERF_SAMPLE_BRANCH_STACK) {
--
1.7.7.6
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] perf, tool: Fix the array pointer to follow event data properly
2012-03-24 14:19 [PATCH] perf, tool: Fix the array pointer to follow event data properly Jiri Olsa
@ 2012-03-24 16:00 ` David Ahern
2012-03-24 17:21 ` Stephane Eranian
0 siblings, 1 reply; 4+ messages in thread
From: David Ahern @ 2012-03-24 16:00 UTC (permalink / raw)
To: Jiri Olsa
Cc: acme, a.p.zijlstra, mingo, paulus, cjashfor, Frederic Weisbecker,
linux-kernel, Stephane Eranian
Stephane submitted a similar patch a week ago:
https://lkml.org/lkml/2012/3/17/91
David
On 3/24/12 8:19 AM, Jiri Olsa wrote:
> Currently we dont update the 'array' pointer properly after
> processing the RAW data. This way perf might report wrong data
> for branch stack if it is used along with tracepoint sample.
>
> I'm not sure tracepoint could be connected with branch stack,
> but I think the array pointer should have correct value after
> each sample processing.
>
> Signed-off-by: Jiri Olsa<jolsa@redhat.com>
> ---
> tools/perf/util/evsel.c | 1 +
> 1 files changed, 1 insertions(+), 0 deletions(-)
>
> diff --git a/tools/perf/util/evsel.c b/tools/perf/util/evsel.c
> index d9da62a..56a96896 100644
> --- a/tools/perf/util/evsel.c
> +++ b/tools/perf/util/evsel.c
> @@ -580,6 +580,7 @@ int perf_event__parse_sample(const union perf_event *event, u64 type,
> return -EFAULT;
>
> data->raw_data = (void *) pdata;
> + array = (u64 *)(((char *)array) + data->raw_size + sizeof(u32));
> }
>
> if (type& PERF_SAMPLE_BRANCH_STACK) {
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] perf, tool: Fix the array pointer to follow event data properly
2012-03-24 16:00 ` David Ahern
@ 2012-03-24 17:21 ` Stephane Eranian
2012-03-25 15:30 ` Arnaldo Carvalho de Melo
0 siblings, 1 reply; 4+ messages in thread
From: Stephane Eranian @ 2012-03-24 17:21 UTC (permalink / raw)
To: David Ahern
Cc: Jiri Olsa, acme, a.p.zijlstra, mingo, paulus, cjashfor,
Frederic Weisbecker, linux-kernel
Yes, and I haven't heard back since then
On Sat, Mar 24, 2012 at 5:00 PM, David Ahern <dsahern@gmail.com> wrote:
> Stephane submitted a similar patch a week ago:
> https://lkml.org/lkml/2012/3/17/91
>
> David
>
>
> On 3/24/12 8:19 AM, Jiri Olsa wrote:
>>
>> Currently we dont update the 'array' pointer properly after
>> processing the RAW data. This way perf might report wrong data
>> for branch stack if it is used along with tracepoint sample.
>>
>> I'm not sure tracepoint could be connected with branch stack,
>> but I think the array pointer should have correct value after
>> each sample processing.
>>
>> Signed-off-by: Jiri Olsa<jolsa@redhat.com>
>> ---
>> tools/perf/util/evsel.c | 1 +
>> 1 files changed, 1 insertions(+), 0 deletions(-)
>>
>> diff --git a/tools/perf/util/evsel.c b/tools/perf/util/evsel.c
>> index d9da62a..56a96896 100644
>> --- a/tools/perf/util/evsel.c
>> +++ b/tools/perf/util/evsel.c
>> @@ -580,6 +580,7 @@ int perf_event__parse_sample(const union perf_event
>> *event, u64 type,
>> return -EFAULT;
>>
>> data->raw_data = (void *) pdata;
>> + array = (u64 *)(((char *)array) + data->raw_size +
>> sizeof(u32));
>> }
>>
>> if (type& PERF_SAMPLE_BRANCH_STACK) {
>
>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] perf, tool: Fix the array pointer to follow event data properly
2012-03-24 17:21 ` Stephane Eranian
@ 2012-03-25 15:30 ` Arnaldo Carvalho de Melo
0 siblings, 0 replies; 4+ messages in thread
From: Arnaldo Carvalho de Melo @ 2012-03-25 15:30 UTC (permalink / raw)
To: Stephane Eranian
Cc: David Ahern, Jiri Olsa, a.p.zijlstra, mingo, paulus, cjashfor,
Frederic Weisbecker, linux-kernel
Em Sat, Mar 24, 2012 at 06:21:05PM +0100, Stephane Eranian escreveu:
> Yes, and I haven't heard back since then
>
> On Sat, Mar 24, 2012 at 5:00 PM, David Ahern <dsahern@gmail.com> wrote:
> > Stephane submitted a similar patch a week ago:
> > https://lkml.org/lkml/2012/3/17/91
Gack, I updated one of my machines and the postfix setup had some issues
with SELinux.
Yeah, I noticed its the same fix Stephane submitted last week and that I
should have already sent Ingo's way.
Ingo, please apply the one from Stephane, next time I process it if you
haven't yet I'll make sure it gets pushed.
- Arnaldo
> > David
> >
> >
> > On 3/24/12 8:19 AM, Jiri Olsa wrote:
> >>
> >> Currently we dont update the 'array' pointer properly after
> >> processing the RAW data. This way perf might report wrong data
> >> for branch stack if it is used along with tracepoint sample.
> >>
> >> I'm not sure tracepoint could be connected with branch stack,
> >> but I think the array pointer should have correct value after
> >> each sample processing.
> >>
> >> Signed-off-by: Jiri Olsa<jolsa@redhat.com>
> >> ---
> >> tools/perf/util/evsel.c | 1 +
> >> 1 files changed, 1 insertions(+), 0 deletions(-)
> >>
> >> diff --git a/tools/perf/util/evsel.c b/tools/perf/util/evsel.c
> >> index d9da62a..56a96896 100644
> >> --- a/tools/perf/util/evsel.c
> >> +++ b/tools/perf/util/evsel.c
> >> @@ -580,6 +580,7 @@ int perf_event__parse_sample(const union perf_event
> >> *event, u64 type,
> >> return -EFAULT;
> >>
> >> data->raw_data = (void *) pdata;
> >> + array = (u64 *)(((char *)array) + data->raw_size +
> >> sizeof(u32));
> >> }
> >>
> >> if (type& PERF_SAMPLE_BRANCH_STACK) {
> >
> >
> --
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at http://www.tux.org/lkml/
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2012-03-25 15:30 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-03-24 14:19 [PATCH] perf, tool: Fix the array pointer to follow event data properly Jiri Olsa
2012-03-24 16:00 ` David Ahern
2012-03-24 17:21 ` Stephane Eranian
2012-03-25 15:30 ` Arnaldo Carvalho de Melo
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.