From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S934323AbdACIVP (ORCPT ); Tue, 3 Jan 2017 03:21:15 -0500 Received: from mx1.redhat.com ([209.132.183.28]:36114 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S934142AbdACIUS (ORCPT ); Tue, 3 Jan 2017 03:20:18 -0500 From: Jiri Olsa To: Arnaldo Carvalho de Melo Cc: David Ahern , Namhyung Kim , Peter Zijlstra , Wang Nan , lkml , Ingo Molnar Subject: [PATCH 7/7] perf record: Add switch-output time option argument Date: Tue, 3 Jan 2017 09:20:00 +0100 Message-Id: <1483431600-19887-8-git-send-email-jolsa@kernel.org> In-Reply-To: <1483431600-19887-1-git-send-email-jolsa@kernel.org> References: <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:18 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org It's now possible to specify the threshold time for perf.data like: $ perf record --switch-output=30s ... Once it's reached, the current data are dumped in to the perf.data. file and session does on. $ perf record --switch-output=30s ... [ perf record: dump data: Woken up 44 times ] [ perf record: Dump perf.data.2017010213043746 ] ... The time is expected to be a number with appended unit character - s/m/h/d. Signed-off-by: Jiri Olsa Cc: David Ahern Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Wang Nan Link: http://lkml.kernel.org/n/tip-2u6y3h89c0guejpn1nwv32lc@git.kernel.org --- tools/perf/Documentation/perf-record.txt | 2 ++ tools/perf/builtin-record.c | 44 ++++++++++++++++++++++++++++++-- 2 files changed, 44 insertions(+), 2 deletions(-) diff --git a/tools/perf/Documentation/perf-record.txt b/tools/perf/Documentation/perf-record.txt index d838354df417..176f85e89eaa 100644 --- a/tools/perf/Documentation/perf-record.txt +++ b/tools/perf/Documentation/perf-record.txt @@ -427,6 +427,8 @@ based on 'mode' value: "signal" - when receiving a SIGUSR2 (default value) or - when reaching the size threshold, size is expected to be a number with appended unit character - B/K/M/G +