lkml.org 
[lkml]   [2017]   [Dec]   [13]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: [PATCH] perf tools: Fix swap for samples with raw data
    Em Wed, Nov 29, 2017 at 07:43:46PM +0100, Jiri Olsa escreveu:
    > The fix is basically to swap back the raw data if different
    > endianity is detected.

    > +++ b/tools/perf/util/evsel.c
    > @@ -36,6 +36,7 @@
    > #include "trace-event.h"
    > #include "stat.h"
    > +#include "memswap.h"

    > @@ -2131,14 +2132,27 @@ int perf_evsel__parse_sample(struct perf_evsel *evsel, union perf_event *event,
    > if (type & PERF_SAMPLE_RAW) {

    > + if (swapped)
    > + mem_bswap_64((void *) array, data->raw_size);
    > +


    you forgot to add util/memswap.c to tools/perf/util/python-ext-sources,
    breaking 'perf test python'.

    Please run 'perf test' before sending pull requests :-)

    Fixed it this time.

    - Arnaldo

    \
     
     \ /
      Last update: 2017-12-13 13:34    [W:2.327 / U:1.064 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site