summaryrefslogtreecommitdiff
path: root/tools/perf/tests/perf-record.c
diff options
context:
space:
mode:
authorIngo Molnar <mingo@kernel.org>2014-01-14 20:25:12 +0400
committerIngo Molnar <mingo@kernel.org>2014-01-14 20:25:12 +0400
commit197749981e539c1eb5863f417de6dd4e2c02b76c (patch)
treed7c81373a9ea1b833163e9c36d727b1b6ddab067 /tools/perf/tests/perf-record.c
parent1341f3e4c0276aae3de6d902c9202265d89fe438 (diff)
parent26f7f9877234e6b9ed87eff4ca450631bafe0182 (diff)
downloadlinux-197749981e539c1eb5863f417de6dd4e2c02b76c.tar.xz
Merge tag 'perf-core-for-mingo' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux into perf/core
Pull perf tooling updates from Arnaldo Carvalho de Melo: New features: * perf record: Add --initial-delay option (Andi Kleen) * Column colouring improvements in 'diff' (Ramkumar Ramachandra) Fixes: * Don't show counter information when workload fails (Arnaldo Carvalho de Melo) * Fixup leak on error path in parse events test. (Arnaldo Carvalho de Melo) * Fix --delay option in 'stat' man page (Andi Kleen) * Use the DWARF unwind info only if loaded (Jean Pihet): Developer stuff: * Improve forked workload error reporting by sending the errno in the signal data queueing integer field, using sigqueue and by doing the signal setup in the evlist methods, removing open coded equivalents in various tools. (Arnaldo Carvalho de Melo) * Do more auto exit cleanup shores in the 'evlist' destructor, so that the tools don't have to all do that sequence. (Arnaldo Carvalho de Melo) * Pack 'struct perf_session_env' and 'struct trace' (Arnaldo Carvalho de Melo) * Include tools/lib/api/ in MANIFEST, fixing detached tarballs (Arnaldo Carvalho de Melo) * Add test for building detached source tarballs (Arnaldo Carvalho de Melo) * Shut up libtracevent plugins make message (Jiri Olsa) * Fix installation tests path setup (Jiri Olsa) * Fix id_hdr_size initialization (Jiri Olsa) * Move some header files from tools/perf/ to tools/include/ to make them available to other tools/ dwelling codebases (Namhyung Kim) * Fix 'probe' build when DWARF support libraries not present (Arnaldo Carvalho de Melo) Refactorings: * Move logic to warn about kptr_restrict'ed kernels to separate function in 'report' (Arnaldo Carvalho de Melo) * Move hist browser selection code to separate function (Arnaldo Carvalho de Melo) * Move histogram entries collapsing to separate function (Arnaldo Carvalho de Melo) * Introduce evlist__for_each() & friends (Arnaldo Carvalho de Melo) * Automate setup of FEATURE_CHECK_(C|LD)FLAGS-all variables (Jiri Olsa) * Move arch setup into seprate Makefile (Jiri Olsa) Trivial stuff: * Remove misplaced __maybe_unused in 'stat' (Arnaldo Carvalho de Melo) * Remove old evsel_list usage in 'record' (Arnaldo Carvalho de Melo) * Comment typo fix (Cody P Schafer) * Remove unused test-volatile-register-var.c (Yann Droneaud) Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com> Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'tools/perf/tests/perf-record.c')
-rw-r--r--tools/perf/tests/perf-record.c21
1 files changed, 7 insertions, 14 deletions
diff --git a/tools/perf/tests/perf-record.c b/tools/perf/tests/perf-record.c
index eeba562920e9..39cc7c3c0d0c 100644
--- a/tools/perf/tests/perf-record.c
+++ b/tools/perf/tests/perf-record.c
@@ -83,11 +83,10 @@ int test__PERF_RECORD(void)
* so that we have time to open the evlist (calling sys_perf_event_open
* on all the fds) and then mmap them.
*/
- err = perf_evlist__prepare_workload(evlist, &opts.target, argv,
- false, false);
+ err = perf_evlist__prepare_workload(evlist, &opts.target, argv, false, NULL);
if (err < 0) {
pr_debug("Couldn't run the workload!\n");
- goto out_delete_maps;
+ goto out_delete_evlist;
}
/*
@@ -102,7 +101,7 @@ int test__PERF_RECORD(void)
err = sched__get_first_possible_cpu(evlist->workload.pid, &cpu_mask);
if (err < 0) {
pr_debug("sched__get_first_possible_cpu: %s\n", strerror(errno));
- goto out_delete_maps;
+ goto out_delete_evlist;
}
cpu = err;
@@ -112,7 +111,7 @@ int test__PERF_RECORD(void)
*/
if (sched_setaffinity(evlist->workload.pid, cpu_mask_size, &cpu_mask) < 0) {
pr_debug("sched_setaffinity: %s\n", strerror(errno));
- goto out_delete_maps;
+ goto out_delete_evlist;
}
/*
@@ -122,7 +121,7 @@ int test__PERF_RECORD(void)
err = perf_evlist__open(evlist);
if (err < 0) {
pr_debug("perf_evlist__open: %s\n", strerror(errno));
- goto out_delete_maps;
+ goto out_delete_evlist;
}
/*
@@ -133,7 +132,7 @@ int test__PERF_RECORD(void)
err = perf_evlist__mmap(evlist, opts.mmap_pages, false);
if (err < 0) {
pr_debug("perf_evlist__mmap: %s\n", strerror(errno));
- goto out_close_evlist;
+ goto out_delete_evlist;
}
/*
@@ -166,7 +165,7 @@ int test__PERF_RECORD(void)
if (verbose)
perf_event__fprintf(event, stderr);
pr_debug("Couldn't parse sample\n");
- goto out_err;
+ goto out_delete_evlist;
}
if (verbose) {
@@ -303,12 +302,6 @@ found_exit:
pr_debug("PERF_RECORD_MMAP for %s missing!\n", "[vdso]");
++errs;
}
-out_err:
- perf_evlist__munmap(evlist);
-out_close_evlist:
- perf_evlist__close(evlist);
-out_delete_maps:
- perf_evlist__delete_maps(evlist);
out_delete_evlist:
perf_evlist__delete(evlist);
out: