summaryrefslogtreecommitdiff
path: root/tools/perf/tests/open-syscall-tp-fields.c
diff options
context:
space:
mode:
authorIngo Molnar <mingo@kernel.org>2013-03-21 11:06:12 +0100
committerIngo Molnar <mingo@kernel.org>2013-03-21 11:06:12 +0100
commit0a11953851213fd1d3eebcb68b4a537d458c70c2 (patch)
tree3f6f7cae25b8c1a81d6f37b1ecfff5a45bb9df40 /tools/perf/tests/open-syscall-tp-fields.c
parent3bf2391729822e591dcfbbd1e9dd2f450968cdcb (diff)
parentbc96b361cbf90e61d2665b1305cd2c4ac1fd9cfc (diff)
Merge tag 'perf-core-for-mingo' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux into perf/core
Conflicts: tools/Makefile Pull perf/core improvements and fixes from Arnaldo Carvalho de Melo: . Honor parallel jobs, fix from Borislav Petkov . Introduce tools/lib/lk library, initially just removing duplication among tools/perf and tools/vm. from Borislav Petkov . Fix build on non-glibc systems due to libio.h absence, from Cody P Schafer. . Remove some perf_session and tracing dead code, from David Ahern. . Introduce perf stat --repeat forever, from Frederik Deweerdt. . Add perf test entries for checking --cpu in record and stat, from Jiri Olsa. . Add perf test entries for checking breakpoint overflow signal handler issues, from Jiri Olsa. . Add perf test entry for for checking number of EXIT events, from Namhyung Kim. . Simplify some perf_evlist methods and to allow 'stat' to share code with 'record' and 'trace'. . Remove dead code in related to libtraceevent integration, from Namhyung Kim. . Event group view for 'annotate' in --stdio, --tui and --gtk, from Namhyung Kim. Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com> [ resolved the trivial merge conflict with upstream ] Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'tools/perf/tests/open-syscall-tp-fields.c')
-rw-r--r--tools/perf/tests/open-syscall-tp-fields.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/tools/perf/tests/open-syscall-tp-fields.c b/tools/perf/tests/open-syscall-tp-fields.c
index 1c52fdc1164e..fc5b9fca8b47 100644
--- a/tools/perf/tests/open-syscall-tp-fields.c
+++ b/tools/perf/tests/open-syscall-tp-fields.c
@@ -18,7 +18,7 @@ int test__syscall_open_tp_fields(void)
};
const char *filename = "/etc/passwd";
int flags = O_RDONLY | O_DIRECTORY;
- struct perf_evlist *evlist = perf_evlist__new(NULL, NULL);
+ struct perf_evlist *evlist = perf_evlist__new();
struct perf_evsel *evsel;
int err = -1, i, nr_events = 0, nr_polls = 0;
@@ -48,13 +48,13 @@ int test__syscall_open_tp_fields(void)
err = perf_evlist__open(evlist);
if (err < 0) {
pr_debug("perf_evlist__open: %s\n", strerror(errno));
- goto out_delete_evlist;
+ goto out_delete_maps;
}
err = perf_evlist__mmap(evlist, UINT_MAX, false);
if (err < 0) {
pr_debug("perf_evlist__mmap: %s\n", strerror(errno));
- goto out_delete_evlist;
+ goto out_close_evlist;
}
perf_evlist__enable(evlist);
@@ -110,6 +110,10 @@ out_ok:
err = 0;
out_munmap:
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: