lkml.org 
[lkml]   [2012]   [Mar]   [28]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Subject[PATCH 01/15] perf, tool: Fix the array pointer to follow event data properly
    Date
    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..56a9689 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.1


    \
     
     \ /
      Last update: 2012-03-28 14:39    [W:0.018 / U:22.088 seconds]
    ©2003-2017 Jasper Spaans. hosted at Digital OceanAdvertise on this site