From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757482AbdACJyp (ORCPT ); Tue, 3 Jan 2017 04:54:45 -0500 Received: from szxga02-in.huawei.com ([119.145.14.65]:11266 "EHLO szxga02-in.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750879AbdACJyi (ORCPT ); Tue, 3 Jan 2017 04:54:38 -0500 Subject: Re: [PATCH 0/7] perf tools: Add switch-output size and time threshold options To: Jiri Olsa , Arnaldo Carvalho de Melo References: <1483431600-19887-1-git-send-email-jolsa@kernel.org> CC: lkml , Ingo Molnar , "Peter Zijlstra" , Namhyung Kim , "David Ahern" From: "Wangnan (F)" Message-ID: <60078f5d-0497-4567-ff1c-099c879fcf0d@huawei.com> Date: Tue, 3 Jan 2017 17:51:46 +0800 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.5.1 MIME-Version: 1.0 In-Reply-To: <1483431600-19887-1-git-send-email-jolsa@kernel.org> Content-Type: text/plain; charset="utf-8"; format=flowed Content-Transfer-Encoding: 7bit X-Originating-IP: [10.111.194.139] X-CFilter-Loop: Reflected X-Mirapoint-Virus-RAPID-Raw: score=unknown(0), refid=str=0001.0A020206.586B74D2.0388,ss=1,re=0.000,recu=0.000,reip=0.000,cl=1,cld=1,fgs=0, ip=0.0.0.0, so=2013-06-18 04:22:30, dmn=2013-03-21 17:37:32 X-Mirapoint-Loop-Id: e2e020d6b9d5c79ee393eef3f4560825 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2017/1/3 16:19, Jiri Olsa wrote: > hi, > adding a way to configure switch data output > for size and time, like: > > $ sudo perf record -e 'sched:*' --switch-output=10M -avg > callchain: type FP > switch-output with 10M size threshold > mmap size 528384B > [ perf record: dump data: Woken up 37 times ] > [ perf record: Dump perf.data.2017010309135512 ] > [ perf record: dump data: Woken up 39 times ] > [ perf record: Dump perf.data.2017010309135771 ] > [ perf record: dump data: Woken up 38 times ] > [ perf record: Dump perf.data.2017010309140005 ] > ^C[ perf record: Woken up 16 times to write data ] > [ perf record: Dump perf.data.2017010309140111 ] > [ perf record: Captured and wrote 4.748 MB perf.data. ] > ... > > the default for switch-output option stays > and does the SIGUSR2 output switch > > Also available in: > git://git.kernel.org/pub/scm/linux/kernel/git/jolsa/perf.git > perf/fixes > > thanks, > jirka > > > Cc: Wang Nan > --- Good functions, and thank you for fixing documentations. You didn't cc patch 1 and 2 to me. Tested-by: Wang Nan > Jiri Olsa (7): > tools lib subcmd: Add OPT_STRING_OPTARG_SET option > perf record: Make __record_options static > perf record: Fix --switch-output documentation and comment > perf record: Add struct switch_output > perf record: Change switch-output option to take optional argument > perf record: Add switch-output size option argument > perf record: Add switch-output time option argument > > tools/lib/subcmd/parse-options.c | 3 ++ > tools/lib/subcmd/parse-options.h | 5 ++++ > tools/perf/Documentation/perf-record.txt | 13 +++++++-- > tools/perf/builtin-record.c | 134 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++---------- > 4 files changed, 139 insertions(+), 16 deletions(-)