From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S934122AbdACIUN (ORCPT ); Tue, 3 Jan 2017 03:20:13 -0500 Received: from mx1.redhat.com ([209.132.183.28]:36044 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932874AbdACIUF (ORCPT ); Tue, 3 Jan 2017 03:20:05 -0500 From: Jiri Olsa To: Arnaldo Carvalho de Melo Cc: Wang Nan , lkml , Ingo Molnar , Peter Zijlstra , Namhyung Kim , David Ahern Subject: [PATCH 0/7] perf tools: Add switch-output size and time threshold options Date: Tue, 3 Jan 2017 09:19:53 +0100 Message-Id: <1483431600-19887-1-git-send-email-jolsa@kernel.org> X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.29]); Tue, 03 Jan 2017 08:20:05 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 --- 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(-)