From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752518AbcAFJJm (ORCPT ); Wed, 6 Jan 2016 04:09:42 -0500 Received: from mx1.redhat.com ([209.132.183.28]:50086 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752203AbcAFJJj (ORCPT ); Wed, 6 Jan 2016 04:09:39 -0500 Date: Wed, 6 Jan 2016 10:09:34 +0100 From: Jiri Olsa To: Arnaldo Carvalho de Melo Cc: Jiri Olsa , Andi Kleen , Ulrich Drepper , Will Deacon , Stephane Eranian , Don Zickus , lkml , David Ahern , Ingo Molnar , Namhyung Kim , Peter Zijlstra , "Liang, Kan" Subject: Re: [PATCHv8 0/8] perf stat: Add scripting support Message-ID: <20160106090934.GB17939@krava.brq.redhat.com> References: <1452028152-26762-1-git-send-email-jolsa@kernel.org> <20160105223920.GF25916@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20160105223920.GF25916@kernel.org> User-Agent: Mutt/1.5.24 (2015-08-30) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Jan 05, 2016 at 07:39:20PM -0300, Arnaldo Carvalho de Melo wrote: > Em Tue, Jan 05, 2016 at 10:09:04PM +0100, Jiri Olsa escreveu: > > hi, > > sending another version of stat scripting. > > > > v8 changes: > > - check for stat callbacks properly [Namhyung] > > - used '#!/usr/bin/env python' for stat-cpi.py [Namhyung] > > - used tuple_set_u64 for storing u64 into python tuple [Namhyung] > > While testing this I noticed I failed to notice that after adding all > these new user meta events we have: > > [acme@zoo linux]$ perf stat -e cycles record usleep 1 > > Performance counter stats for 'usleep 1': > > 1,049,367 cycles > > 0.002616357 seconds time elapsed > > [acme@zoo linux]$ oldperf report --stdio > 0xf0 [0x28]: failed to process type: 73 > Error: > failed to process sample > # To display the perf.data header info, please use > # --header/--header-only options. > # > [acme@zoo linux]$ > > While it should just have ignored the user meta events if doesn't > support and state that the perf.data file had no samples :-\ > > So I think I'll make perf_session__process_user_event() return 0 > for events it doesn't support, just adding a pr_debug(), ok? ok, but please put there something more visible.. so it's obvious it was hit jirka