Commit f7d87444 authored by Arnaldo Carvalho de Melo's avatar Arnaldo Carvalho de Melo Committed by Ingo Molnar

perf session: Move full_paths config to symbol_conf

Now perf_event_ops has just that, event handlers.
Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
Cc: Frédéric Weisbecker <fweisbec@gmail.com>
Cc: Mike Galbraith <efault@gmx.de>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Paul Mackerras <paulus@samba.org>
LKML-Reference: <1261957026-15580-8-git-send-email-acme@infradead.org>
Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
parent 31d337c4
...@@ -204,7 +204,7 @@ static const struct option options[] = { ...@@ -204,7 +204,7 @@ static const struct option options[] = {
OPT_BOOLEAN('f', "force", &force, "don't complain, do it"), OPT_BOOLEAN('f', "force", &force, "don't complain, do it"),
OPT_BOOLEAN('m', "modules", &symbol_conf.use_modules, OPT_BOOLEAN('m', "modules", &symbol_conf.use_modules,
"load module symbols - WARNING: use only with -k and LIVE kernel"), "load module symbols - WARNING: use only with -k and LIVE kernel"),
OPT_BOOLEAN('P', "full-paths", &event_ops.full_paths, OPT_BOOLEAN('P', "full-paths", &symbol_conf.full_paths,
"Don't shorten the pathnames taking into account the cwd"), "Don't shorten the pathnames taking into account the cwd"),
OPT_STRING('d', "dsos", &symbol_conf.dso_list_str, "dso[,dso...]", OPT_STRING('d', "dsos", &symbol_conf.dso_list_str, "dso[,dso...]",
"only consider symbols in these dsos"), "only consider symbols in these dsos"),
......
...@@ -321,7 +321,7 @@ static const struct option options[] = { ...@@ -321,7 +321,7 @@ static const struct option options[] = {
"pretty printing style key: normal raw"), "pretty printing style key: normal raw"),
OPT_STRING('s', "sort", &sort_order, "key[,key2...]", OPT_STRING('s', "sort", &sort_order, "key[,key2...]",
"sort by key(s): pid, comm, dso, symbol, parent"), "sort by key(s): pid, comm, dso, symbol, parent"),
OPT_BOOLEAN('P', "full-paths", &event_ops.full_paths, OPT_BOOLEAN('P', "full-paths", &symbol_conf.full_paths,
"Don't shorten the pathnames taking into account the cwd"), "Don't shorten the pathnames taking into account the cwd"),
OPT_STRING('p', "parent", &parent_pattern, "regex", OPT_STRING('p', "parent", &parent_pattern, "regex",
"regex filter to identify parent, see: '--sort parent'"), "regex filter to identify parent, see: '--sort parent'"),
......
...@@ -306,7 +306,7 @@ int perf_session__process_events(struct perf_session *self, ...@@ -306,7 +306,7 @@ int perf_session__process_events(struct perf_session *self,
head = self->header.data_offset; head = self->header.data_offset;
if (!ops->full_paths) { if (!symbol_conf.full_paths) {
char bf[PATH_MAX]; char bf[PATH_MAX];
if (getcwd(bf, sizeof(bf)) == NULL) { if (getcwd(bf, sizeof(bf)) == NULL) {
......
...@@ -41,7 +41,6 @@ struct perf_event_ops { ...@@ -41,7 +41,6 @@ struct perf_event_ops {
event_op process_read_event; event_op process_read_event;
event_op process_throttle_event; event_op process_throttle_event;
event_op process_unthrottle_event; event_op process_unthrottle_event;
bool full_paths;
}; };
struct perf_session *perf_session__new(const char *filename, int mode, bool force); struct perf_session *perf_session__new(const char *filename, int mode, bool force);
......
...@@ -58,7 +58,8 @@ struct symbol_conf { ...@@ -58,7 +58,8 @@ struct symbol_conf {
sort_by_name, sort_by_name,
show_nr_samples, show_nr_samples,
use_callchain, use_callchain,
exclude_other; exclude_other,
full_paths;
const char *vmlinux_name, const char *vmlinux_name,
*field_sep; *field_sep;
char *dso_list_str, char *dso_list_str,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment