From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S935307AbdACOcu (ORCPT ); Tue, 3 Jan 2017 09:32:50 -0500 Received: from mx1.redhat.com ([209.132.183.28]:54962 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S935039AbdACOcg (ORCPT ); Tue, 3 Jan 2017 09:32:36 -0500 Date: Tue, 3 Jan 2017 15:32:32 +0100 From: Jiri Olsa To: Arnaldo Carvalho de Melo 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: <20170103143232.GA27314@krava> References: <1483431600-19887-1-git-send-email-jolsa@kernel.org> <1483431600-19887-7-git-send-email-jolsa@kernel.org> <20170103142027.GE27864@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20170103142027.GE27864@kernel.org> User-Agent: Mutt/1.7.1 (2016-10-04) X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.28]); Tue, 03 Jan 2017 14:32:37 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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? ;-) jirka