From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752653AbdLMMgm (ORCPT ); Wed, 13 Dec 2017 07:36:42 -0500 Received: from mx1.redhat.com ([209.132.183.28]:40124 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751910AbdLMMgh (ORCPT ); Wed, 13 Dec 2017 07:36:37 -0500 Date: Wed, 13 Dec 2017 13:36:34 +0100 From: Jiri Olsa To: Arnaldo Carvalho de Melo Cc: Jiri Olsa , David Ahern , Steven Rostedt , lkml , Ingo Molnar , Namhyung Kim , Peter Zijlstra Subject: Re: [PATCH] perf tools: Fix swap for samples with raw data Message-ID: <20171213123634.GA14376@krava> References: <20171129184346.3656-1-jolsa@kernel.org> <20171213123358.GR3958@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20171213123358.GR3958@kernel.org> User-Agent: Mutt/1.9.1 (2017-09-22) X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.30]); Wed, 13 Dec 2017 12:36:37 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Dec 13, 2017 at 09:33:58AM -0300, Arnaldo Carvalho de Melo wrote: > 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 :-) > ouch ;-) > Fixed it this time. thanks, jirka