aboutsummaryrefslogtreecommitdiffstats
path: root/tools/perf
diff options
context:
space:
mode:
authorArnaldo Carvalho de Melo <acme@redhat.com>2015-01-22 09:13:43 -0500
committerArnaldo Carvalho de Melo <acme@redhat.com>2015-01-22 15:02:20 -0500
commit2cc990ba3af4f9511f0d016c73b8163591f890e7 (patch)
treee807123fbbda4662c369e63cb35f15dc05ed31d0 /tools/perf
parent5ed08dae9d2f2307c103e2dce94d801e74aefae4 (diff)
tools lib fs debugfs: Introduce debugfs__strerror_open_tp
There will be other cases where not just a tracepoint event is being opened below the debugfs mountpoint, but it is rather common, so provide one helper for that. Cc: Adrian Hunter <adrian.hunter@intel.com> Cc: Borislav Petkov <bp@suse.de> Cc: David Ahern <dsahern@gmail.com> Cc: Don Zickus <dzickus@redhat.com> Cc: Frederic Weisbecker <fweisbec@gmail.com> Cc: Jiri Olsa <jolsa@redhat.com> Cc: Namhyung Kim <namhyung@kernel.org> Cc: Stephane Eranian <eranian@google.com> Link: http://lkml.kernel.org/n/tip-q6e6zct49ql6nbcw8kkg0lbj@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/perf')
-rw-r--r--tools/perf/builtin-trace.c13
1 files changed, 8 insertions, 5 deletions
diff --git a/tools/perf/builtin-trace.c b/tools/perf/builtin-trace.c
index eaaa540bf1f3..7e935f1083ec 100644
--- a/tools/perf/builtin-trace.c
+++ b/tools/perf/builtin-trace.c
@@ -2071,9 +2071,9 @@ static int trace__run(struct trace *trace, int argc, const char **argv)
2071 goto out_error_mem; 2071 goto out_error_mem;
2072 2072
2073 if (trace->sched && 2073 if (trace->sched &&
2074 perf_evlist__add_newtp(evlist, "sched", "sched_stat_runtime", 2074 perf_evlist__add_newtp(evlist, "sched", "sched_stat_runtime",
2075 trace__sched_stat_runtime)) 2075 trace__sched_stat_runtime))
2076 goto out_error_tp; 2076 goto out_error_sched_stat_runtime;
2077 2077
2078 err = perf_evlist__create_maps(evlist, &trace->opts.target); 2078 err = perf_evlist__create_maps(evlist, &trace->opts.target);
2079 if (err < 0) { 2079 if (err < 0) {
@@ -2203,9 +2203,12 @@ out:
2203{ 2203{
2204 char errbuf[BUFSIZ]; 2204 char errbuf[BUFSIZ];
2205 2205
2206out_error_tp: 2206out_error_sched_stat_runtime:
2207 debugfs__strerror_open_tp(errno, errbuf, sizeof(errbuf), "sched", "sched_stat_runtime");
2208 goto out_error;
2209
2207out_error_raw_syscalls: 2210out_error_raw_syscalls:
2208 debugfs__strerror_open(errno, errbuf, sizeof(errbuf), "tracing/events/raw_syscalls"); 2211 debugfs__strerror_open_tp(errno, errbuf, sizeof(errbuf), "raw_syscalls", "sys_(enter|exit)");
2209 goto out_error; 2212 goto out_error;
2210 2213
2211out_error_mmap: 2214out_error_mmap: