Re: [PATCH] perf, tool: Fix the array pointer to follow event data properly

From: Stephane Eranian
Date: Sat Mar 24 2012 - 13:21:44 EST


Yes, and I haven't heard back since then

On Sat, Mar 24, 2012 at 5:00 PM, David Ahern <dsahern@xxxxxxxxx> 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@xxxxxxxxxx>
>> ---
>> Â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@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/