Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S935036AbbLRJNt (ORCPT ); Fri, 18 Dec 2015 04:13:49 -0500 Received: from terminus.zytor.com ([198.137.202.10]:52512 "EHLO terminus.zytor.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932445AbbLRJLd (ORCPT ); Fri, 18 Dec 2015 04:11:33 -0500 Date: Fri, 18 Dec 2015 01:11:09 -0800 From: tip-bot for Jiri Olsa Message-ID: Cc: hpa@zytor.com, linux-kernel@vger.kernel.org, tglx@linutronix.de, namhyung@kernel.org, acme@redhat.com, dsahern@gmail.com, mingo@kernel.org, a.p.zijlstra@chello.nl, kan.liang@intel.com, jolsa@kernel.org Reply-To: jolsa@kernel.org, a.p.zijlstra@chello.nl, kan.liang@intel.com, mingo@kernel.org, acme@redhat.com, dsahern@gmail.com, linux-kernel@vger.kernel.org, namhyung@kernel.org, tglx@linutronix.de, hpa@zytor.com In-Reply-To: <1446734469-11352-10-git-send-email-jolsa@kernel.org> References: <1446734469-11352-10-git-send-email-jolsa@kernel.org> To: linux-tip-commits@vger.kernel.org Subject: [tip:perf/core] perf stat record: Do not allow record with multiple runs mode Git-Commit-ID: e9d6db8e8df42a38f79f264ab58c104e1678b12c X-Mailer: tip-git-log-daemon Robot-ID: Robot-Unsubscribe: Contact to get blacklisted from these emails MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset=UTF-8 Content-Disposition: inline Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2250 Lines: 67 Commit-ID: e9d6db8e8df42a38f79f264ab58c104e1678b12c Gitweb: http://git.kernel.org/tip/e9d6db8e8df42a38f79f264ab58c104e1678b12c Author: Jiri Olsa AuthorDate: Thu, 5 Nov 2015 15:40:53 +0100 Committer: Arnaldo Carvalho de Melo CommitDate: Thu, 17 Dec 2015 16:00:32 -0300 perf stat record: Do not allow record with multiple runs mode We currently don't support storing multiple session in perf.data, so we can't allow -r option in stat record. $ perf stat -e cycles -r 2 record ls Cannot use -r option with perf stat record. Committer note: Before this patch we would a perf.data file such as: $ perf stat -e cycles -r 2 record ls Performance counter stats for 'ls' (2 runs): 3,935,236 cycles 0.002353261 seconds time elapsed ( +- 4.76% ) $ perf report -D | grep PERF_RECORD | grep ROUND 0xf0 [0]: failed to process type: 16 Error: failed to process sample $ Reported-by: Kan Liang Signed-off-by: Jiri Olsa Tested-by: Arnaldo Carvalho de Melo Cc: David Ahern Cc: Namhyung Kim Cc: Peter Zijlstra Link: http://lkml.kernel.org/r/1446734469-11352-10-git-send-email-jolsa@kernel.org Signed-off-by: Arnaldo Carvalho de Melo --- tools/perf/builtin-stat.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/tools/perf/builtin-stat.c b/tools/perf/builtin-stat.c index fcece42..10f86a6 100644 --- a/tools/perf/builtin-stat.c +++ b/tools/perf/builtin-stat.c @@ -1449,6 +1449,11 @@ static int __cmd_record(int argc, const char **argv) if (output_name) file->path = output_name; + if (run_count != 1 || forever) { + pr_err("Cannot use -r option with perf stat record.\n"); + return -1; + } + session = perf_session__new(file, false, NULL); if (session == NULL) { pr_err("Perf session creation failed.\n"); -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/