Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1263263

[PATCH 09/25] perf stat record: Do not allow record with multiple runs mode

From Jiri Olsa <jolsa@kernel.org>
Newsgroups linux.kernel
Subject [PATCH 09/25] perf stat record: Do not allow record with multiple runs mode
Date 2015-11-05 15:50 +0100
Message-ID <qru1s-7Yg-21@gated-at.bofh.it> (permalink)
References <qru1r-7Yg-5@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


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.

Tested-by: Kan Liang <kan.liang@intel.com>
Link: http://lkml.kernel.org/n/tip-wulio303py16c5hbbo8zrib6@git.kernel.org
Signed-off-by: Jiri Olsa <jolsa@kernel.org>
---
 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 16f6fe2f3435..26188c20f427 100644
--- a/tools/perf/builtin-stat.c
+++ b/tools/perf/builtin-stat.c
@@ -1420,6 +1420,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");
-- 
2.4.3

--
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/

Back to linux.kernel | Previous | Next | Find similar | Unroll thread


Thread

[PATCH 09/25] perf stat record: Do not allow record with multiple runs mode Jiri Olsa <jolsa@kernel.org> - 2015-11-05 15:50 +0100

csiph-web