diff options
author | Arnaldo Carvalho de Melo <acme@redhat.com> | 2010-07-20 13:42:52 -0400 |
---|---|---|
committer | Arnaldo Carvalho de Melo <acme@redhat.com> | 2010-07-23 07:55:59 -0400 |
commit | 8a6c5b261c1188379469807d84bfb1365d0f6823 (patch) | |
tree | b18ac8d951c33a480bd7c0a743d341d0e9bf3e90 /tools/perf/util/symbol.c | |
parent | 7a007ca90b7c465137de06795ef4d5faa10f459e (diff) |
perf sort: Make column width code per hists instance
They were globals, and since we support multiple hists and sessions
at the same time, it doesn't make sense to calculate those values
considereing all symbols in all sessions.
Cc: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Mike Galbraith <efault@gmx.de>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Stephane Eranian <eranian@google.com>
LKML-Reference: <new-submission>
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/perf/util/symbol.c')
-rw-r--r-- | tools/perf/util/symbol.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/tools/perf/util/symbol.c b/tools/perf/util/symbol.c index 971d0a05d6b4..bc6e7e8c480d 100644 --- a/tools/perf/util/symbol.c +++ b/tools/perf/util/symbol.c | |||
@@ -12,6 +12,7 @@ | |||
12 | #include <fcntl.h> | 12 | #include <fcntl.h> |
13 | #include <unistd.h> | 13 | #include <unistd.h> |
14 | #include "build-id.h" | 14 | #include "build-id.h" |
15 | #include "debug.h" | ||
15 | #include "symbol.h" | 16 | #include "symbol.h" |
16 | #include "strlist.h" | 17 | #include "strlist.h" |
17 | 18 | ||
@@ -40,6 +41,14 @@ struct symbol_conf symbol_conf = { | |||
40 | .try_vmlinux_path = true, | 41 | .try_vmlinux_path = true, |
41 | }; | 42 | }; |
42 | 43 | ||
44 | int dso__name_len(const struct dso *self) | ||
45 | { | ||
46 | if (verbose) | ||
47 | return self->long_name_len; | ||
48 | |||
49 | return self->short_name_len; | ||
50 | } | ||
51 | |||
43 | bool dso__loaded(const struct dso *self, enum map_type type) | 52 | bool dso__loaded(const struct dso *self, enum map_type type) |
44 | { | 53 | { |
45 | return self->loaded & (1 << type); | 54 | return self->loaded & (1 << type); |