Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1201117
| From | Arnaldo Carvalho de Melo <acme@kernel.org> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | [PATCH 03/12] perf trace: Remember if the vfs_getname tracepoint/kprobe is in place |
| Date | 2015-08-05 22:20 +0200 |
| Message-ID | <pUdko-3qW-53@gated-at.bofh.it> (permalink) |
| References | <pUdkl-3qW-3@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
From: Arnaldo Carvalho de Melo <acme@redhat.com>
So that we can later decide if we will store where to expand the
pathname once we are handling vfs_getname or if we should instead
just go on and straight away print the pointer.
Cc: Adrian Hunter <adrian.hunter@intel.com>
Cc: Borislav Petkov <bp@suse.de>
Cc: David Ahern <dsahern@gmail.com>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Jiri Olsa <jolsa@redhat.com>
Cc: Milian Wolff <mail@milianw.de>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Stephane Eranian <eranian@google.com>
Link: http://lkml.kernel.org/n/tip-ytxk5s5jpc50wahffmlxgxuw@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---
tools/perf/builtin-trace.c | 10 ++++++----
1 file changed, 6 insertions(+), 4 deletions(-)
diff --git a/tools/perf/builtin-trace.c b/tools/perf/builtin-trace.c
index 3cfca93309ee..aa1e2888c81d 100644
--- a/tools/perf/builtin-trace.c
+++ b/tools/perf/builtin-trace.c
@@ -1312,6 +1312,7 @@ struct trace {
bool show_tool_stats;
bool trace_syscalls;
bool force;
+ bool vfs_getname;
int trace_pgfaults;
};
@@ -2188,19 +2189,20 @@ static int trace__record(struct trace *trace, int argc, const char **argv)
static size_t trace__fprintf_thread_summary(struct trace *trace, FILE *fp);
-static void perf_evlist__add_vfs_getname(struct perf_evlist *evlist)
+static bool perf_evlist__add_vfs_getname(struct perf_evlist *evlist)
{
struct perf_evsel *evsel = perf_evsel__newtp("probe", "vfs_getname");
if (evsel == NULL)
- return;
+ return false;
if (perf_evsel__field(evsel, "pathname") == NULL) {
perf_evsel__delete(evsel);
- return;
+ return false;
}
evsel->handler = trace__vfs_getname;
perf_evlist__add(evlist, evsel);
+ return true;
}
static int perf_evlist__add_pgfault(struct perf_evlist *evlist,
@@ -2330,7 +2332,7 @@ static int trace__run(struct trace *trace, int argc, const char **argv)
goto out_error_raw_syscalls;
if (trace->trace_syscalls)
- perf_evlist__add_vfs_getname(evlist);
+ trace->vfs_getname = perf_evlist__add_vfs_getname(evlist);
if ((trace->trace_pgfaults & TRACE_PFMAJ) &&
perf_evlist__add_pgfault(evlist, PERF_COUNT_SW_PAGE_FAULTS_MAJ)) {
--
2.1.0
--
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 — Previous in thread | Next in thread | Find similar | Unroll thread
[GIT PULL 00/12] perf/core improvements and fixes Arnaldo Carvalho de Melo <acme@kernel.org> - 2015-08-05 22:20 +0200 [PATCH 05/12] perf trace: Deref sys_enter pointer args with contents from probe:vfs_getname Arnaldo Carvalho de Melo <acme@kernel.org> - 2015-08-05 22:20 +0200 [PATCH 10/12] perf tools: Do not include escape sequences in color_vfprintf return Arnaldo Carvalho de Melo <acme@kernel.org> - 2015-08-05 22:20 +0200 [PATCH 01/12] perf script: No tracepoints? Don't call libtraceevent. Arnaldo Carvalho de Melo <acme@kernel.org> - 2015-08-05 22:20 +0200 [PATCH 06/12] perf trace: Use vfs_getname syscall arg beautifier in more syscalls Arnaldo Carvalho de Melo <acme@kernel.org> - 2015-08-05 22:20 +0200 [PATCH 12/12] perf tools: Fix build errors with mipsel-linux-uclibc compiler Arnaldo Carvalho de Melo <acme@kernel.org> - 2015-08-05 22:20 +0200 [PATCH 11/12] perf trace: Write to stderr by default Arnaldo Carvalho de Melo <acme@kernel.org> - 2015-08-05 22:20 +0200 [PATCH 02/12] perf trace: Do not show syscall tracepoint filter in the --no-syscalls case Arnaldo Carvalho de Melo <acme@kernel.org> - 2015-08-05 22:20 +0200 [PATCH 03/12] perf trace: Remember if the vfs_getname tracepoint/kprobe is in place Arnaldo Carvalho de Melo <acme@kernel.org> - 2015-08-05 22:20 +0200 [PATCH 09/12] perf tools: Remove trail argument to color vsprintf Arnaldo Carvalho de Melo <acme@kernel.org> - 2015-08-05 22:20 +0200 [PATCH 07/12] perf tools: Per-event time support Arnaldo Carvalho de Melo <acme@kernel.org> - 2015-08-05 22:20 +0200 [PATCH 08/12] perf tools: Refine parse/config callchain functions Arnaldo Carvalho de Melo <acme@kernel.org> - 2015-08-05 22:20 +0200
csiph-web