From: David Ahern <dsahern@gmail.com>
To: Jiri Olsa <jolsa@redhat.com>
Cc: acme@redhat.com, a.p.zijlstra@chello.nl, mingo@elte.hu,
paulus@samba.org, cjashfor@linux.vnet.ibm.com,
Frederic Weisbecker <fweisbec@gmail.com>,
linux-kernel@vger.kernel.org,
Stephane Eranian <eranian@google.com>
Subject: Re: [PATCH] perf, tool: Fix the array pointer to follow event data properly
Date: Sat, 24 Mar 2012 10:00:06 -0600 [thread overview]
Message-ID: <4F6DEF86.7050303@gmail.com> (raw)
In-Reply-To: <1332598796-3586-1-git-send-email-jolsa@redhat.com>
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) {
next prev parent reply other threads:[~2012-03-24 16:00 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
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 [this message]
2012-03-24 17:21 ` Stephane Eranian
2012-03-25 15:30 ` Arnaldo Carvalho de Melo
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4F6DEF86.7050303@gmail.com \
--to=dsahern@gmail.com \
--cc=a.p.zijlstra@chello.nl \
--cc=acme@redhat.com \
--cc=cjashfor@linux.vnet.ibm.com \
--cc=eranian@google.com \
--cc=fweisbec@gmail.com \
--cc=jolsa@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=paulus@samba.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.