aboutsummaryrefslogtreecommitdiff
path: root/tools/perf/builtin-record.c
diff options
context:
space:
mode:
authorIngo Molnar <mingo@kernel.org>2016-06-22 09:34:19 +0200
committerIngo Molnar <mingo@kernel.org>2016-06-22 09:34:19 +0200
commit4330b439bbe16b48dd2fe9a379bd58a07b97aab8 (patch)
tree375958f5410db5095d172b21f02e5bb737fb97c6 /tools/perf/builtin-record.c
parent02469a95096a549508c5adf61d84a1d72851c85b (diff)
parent6745d8ea825966b0956c691cf7fccc13debedc39 (diff)
Merge tag 'perf-core-for-mingo-20160621' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux into perf/core
Pull perf/core improvements and fixes from Arnaldo Carvalho de Melo: New features: - Add --dry-run option to 'perf record' to check if command line options can be parsed, but not doing any recording (Wang Nan) - Allow dumping the object files generated by llvm when processing eBPF scriptlet events (Wang Nan) - Add stackcollapse.py script to help generating flame graphs (Paolo Bonzini) Documentation changes: - Fix 'perf script' documentation of '-f' when it should be '-F' (Adrian Hunter) Infrastructure changes: - Fix write_backwards fallback when using a new tool on older kernels without support for this feature (Arnaldo Carvalho de Melo) - Remove some leftovers from the initial codebase copying from git (Arnaldo Carvalho de Melo) - List libelf-devel as an alternative, as this is how the libelf development package is called on OpenSuSE (Jean Delvare) - Rename __hists__add_entry to hists__add_entry (Jiri Olsa) Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com> Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'tools/perf/builtin-record.c')
-rw-r--r--tools/perf/builtin-record.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/tools/perf/builtin-record.c b/tools/perf/builtin-record.c
index d4cf1b0c88f9..b1304ebc8779 100644
--- a/tools/perf/builtin-record.c
+++ b/tools/perf/builtin-record.c
@@ -1274,6 +1274,8 @@ static struct record record = {
const char record_callchain_help[] = CALLCHAIN_RECORD_HELP
"\n\t\t\t\tDefault: fp";
+static bool dry_run;
+
/*
* XXX Will stay a global variable till we fix builtin-script.c to stop messing
* with it and switch to use the library functions in perf_evlist that came
@@ -1393,6 +1395,8 @@ struct option __record_options[] = {
"append timestamp to output filename"),
OPT_BOOLEAN(0, "switch-output", &record.switch_output,
"Switch output when receive SIGUSR2"),
+ OPT_BOOLEAN(0, "dry-run", &dry_run,
+ "Parse options then exit"),
OPT_END()
};
@@ -1462,6 +1466,9 @@ int cmd_record(int argc, const char **argv, const char *prefix __maybe_unused)
if (err)
return err;
+ if (dry_run)
+ return 0;
+
err = bpf__setup_stdout(rec->evlist);
if (err) {
bpf__strerror_setup_stdout(rec->evlist, err, errbuf, sizeof(errbuf));