From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1758554AbdACOvK (ORCPT ); Tue, 3 Jan 2017 09:51:10 -0500 Received: from mail.kernel.org ([198.145.29.136]:49042 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933594AbdACOt7 (ORCPT ); Tue, 3 Jan 2017 09:49:59 -0500 Date: Tue, 3 Jan 2017 11:49:55 -0300 From: Arnaldo Carvalho de Melo To: Jiri Olsa Cc: Jiri Olsa , David Ahern , Namhyung Kim , Peter Zijlstra , Wang Nan , lkml , Ingo Molnar Subject: Re: [PATCH 6/7] perf record: Add switch-output size option argument Message-ID: <20170103144955.GH27864@kernel.org> References: <1483431600-19887-1-git-send-email-jolsa@kernel.org> <1483431600-19887-7-git-send-email-jolsa@kernel.org> <20170103142027.GE27864@kernel.org> <20170103143232.GA27314@krava> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20170103143232.GA27314@krava> X-Url: http://acmel.wordpress.com User-Agent: Mutt/1.7.1 (2016-10-04) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Em Tue, Jan 03, 2017 at 03:32:32PM +0100, Jiri Olsa escreveu: > On Tue, Jan 03, 2017 at 11:20:27AM -0300, Arnaldo Carvalho de Melo wrote: > > Em Tue, Jan 03, 2017 at 09:19:59AM +0100, Jiri Olsa escreveu: > > > It's now possible to specify the threshold size for > > > perf.data like: > > > > > > $ perf record --switch-output=2G ... > > > > > > Once it's reached, the current data are dumped in to the > > > perf.data. file and session does on. > > > > s/does/goes/g > > > > But: > > > > [root@jouet ~]# perf record -F9000 -a --switch-output=1K sleep 5 > > [ perf record: dump data: Woken up 0 times ] > > [ perf record: Dump perf.data.2017010311185502 ] > > [ perf record: dump data: Woken up 1 times ] > > [ perf record: Dump perf.data.2017010311190003 ] > > [ perf record: Woken up 0 times to write data ] > > [ perf record: Dump perf.data.2017010311190020 ] > > [ perf record: Captured and wrote 2.240 MB perf.data. ] > > [root@jouet ~]# ls -larth perf.data.* > > -rw-------. 1 root root 2.3M Jan 3 11:18 perf.data.2017010311181984 > > -rw-------. 1 root root 2.3M Jan 3 11:18 perf.data.2017010311182002 > > -rw-------. 1 root root 2.3M Jan 3 11:18 perf.data.2017010311185502 > > -rw-------. 1 root root 2.3M Jan 3 11:19 perf.data.2017010311190003 > > -rw-------. 1 root root 2.3M Jan 3 11:19 perf.data.2017010311190020 > > [root@jouet ~]# > > > > What is that I am missing? > > hum, I think the size you configured is smaller then the size > of the shared kernel buffer and perf gets woken up by default > only when we cross some level of data that's in.. would need > to check > > also I dont think 1K won't fit even the perf.data > header.. are you trying to break it? ;-) I'm trying to follow the documentation ;-) Your explanation sounds reasonable, could you get this code to check those constraints and emit a sensible error message? - Arnaldo