Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1032625AbbKFIYF (ORCPT ); Fri, 6 Nov 2015 03:24:05 -0500 Received: from mx1.redhat.com ([209.132.183.28]:54631 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1757237AbbKFIYE (ORCPT ); Fri, 6 Nov 2015 03:24:04 -0500 Date: Fri, 6 Nov 2015 09:24:00 +0100 From: Jiri Olsa To: Arnaldo Carvalho de Melo Cc: Jiri Olsa , lkml , David Ahern , Ingo Molnar , Namhyung Kim , Peter Zijlstra , "Liang, Kan" Subject: Re: [PATCH 02/25] perf stat record: Add record command Message-ID: <20151106082400.GA14928@krava.brq.redhat.com> References: <1446734469-11352-1-git-send-email-jolsa@kernel.org> <1446734469-11352-3-git-send-email-jolsa@kernel.org> <20151105205101.GY13236@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20151105205101.GY13236@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 Content-Length: 1799 Lines: 58 On Thu, Nov 05, 2015 at 05:51:01PM -0300, Arnaldo Carvalho de Melo wrote: SNIP > In the second case it almost works, modulo that warning. > > I think that what we need to achieve is for older tools to be able to, with a > file produced by 'perf stat record', to show this: > > [root@zoo ~]# perf report --no-header --stdio > Error: > The perf.data file has no samples! > # To display the perf.data header info, please use --header/--header-only options. > # > [root@zoo ~]# > > > I.e. the file should look like one that is produced by this command, purposely > to not create any sample: > > # perf record -e syscalls:sys_enter_accept usleep 1 > [ perf record: Woken up 1 times to write data ] > [ perf record: Captured and wrote 0.018 MB perf.data ] > > > I applied the first patch and added it to that perf/stat branch. well.. it's either simple patches and step by step functionality or one big with everything.. [PATCH 02/25] perf stat record: Add record command - adds record command that creates empty perf.data [PATCH 03/25] perf stat record: Initialize record features - adds FEATURES initialization for stat data [PATCH 04/25] perf stat record: Synthesize stat record data - adds meta data [PATCH 05/25] perf stat record: Store events IDs in perf data file - adds event IDs ... you get proper warning right after patch 3/25, where we store STAT feature bit and properly check it when opening perf.data I can merge patch 2 and 3 to get the proper warning from begining.. but that'd be bigger patch ;-) thanks, jirka -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/