diff options
author | Arnaldo Carvalho de Melo <acme@redhat.com> | 2009-10-20 12:25:40 -0400 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2009-10-20 15:12:58 -0400 |
commit | e42049926ebdcae24fdfdc8f0e3ff8f05f24a60b (patch) | |
tree | be0a07b62070aef5edcd64d84e12e04950220590 /tools/perf/util/symbol.h | |
parent | ed52ce2e3c33dc7626a40fa2da766d1a6460e543 (diff) |
perf annotate: Use the sym_priv_size area for the histogram
We have this sym_priv_size mechanism for attaching private areas
to struct symbol entries but annotate wasn't using it, adding
private areas to struct symbol in addition to a ->priv pointer.
Scrap all that and use the sym_priv_size mechanism.
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Mike Galbraith <efault@gmx.de>
LKML-Reference: <1256055940-19511-1-git-send-email-acme@redhat.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'tools/perf/util/symbol.h')
-rw-r--r-- | tools/perf/util/symbol.h | 17 |
1 files changed, 6 insertions, 11 deletions
diff --git a/tools/perf/util/symbol.h b/tools/perf/util/symbol.h index 2e4522edeb07..c2a777de9b7e 100644 --- a/tools/perf/util/symbol.h +++ b/tools/perf/util/symbol.h | |||
@@ -2,6 +2,7 @@ | |||
2 | #define __PERF_SYMBOL 1 | 2 | #define __PERF_SYMBOL 1 |
3 | 3 | ||
4 | #include <linux/types.h> | 4 | #include <linux/types.h> |
5 | #include <stdbool.h> | ||
5 | #include "types.h" | 6 | #include "types.h" |
6 | #include <linux/list.h> | 7 | #include <linux/list.h> |
7 | #include <linux/rbtree.h> | 8 | #include <linux/rbtree.h> |
@@ -35,9 +36,6 @@ struct symbol { | |||
35 | struct rb_node rb_node; | 36 | struct rb_node rb_node; |
36 | u64 start; | 37 | u64 start; |
37 | u64 end; | 38 | u64 end; |
38 | u64 hist_sum; | ||
39 | u64 *hist; | ||
40 | void *priv; | ||
41 | char name[0]; | 39 | char name[0]; |
42 | }; | 40 | }; |
43 | 41 | ||
@@ -54,10 +52,6 @@ struct dso { | |||
54 | char name[0]; | 52 | char name[0]; |
55 | }; | 53 | }; |
56 | 54 | ||
57 | extern const char *sym_hist_filter; | ||
58 | |||
59 | typedef int (*symbol_filter_t)(struct map *map, struct symbol *sym); | ||
60 | |||
61 | struct dso *dso__new(const char *name, unsigned int sym_priv_size); | 55 | struct dso *dso__new(const char *name, unsigned int sym_priv_size); |
62 | void dso__delete(struct dso *self); | 56 | void dso__delete(struct dso *self); |
63 | 57 | ||
@@ -70,15 +64,16 @@ struct symbol *dso__find_symbol(struct dso *self, u64 ip); | |||
70 | 64 | ||
71 | int dsos__load_kernel(const char *vmlinux, unsigned int sym_priv_size, | 65 | int dsos__load_kernel(const char *vmlinux, unsigned int sym_priv_size, |
72 | symbol_filter_t filter, int verbose, int modules); | 66 | symbol_filter_t filter, int verbose, int modules); |
73 | int dso__load(struct dso *self, struct map *map, symbol_filter_t filter, | 67 | struct dso *dsos__findnew(const char *name, unsigned int sym_priv_size, |
74 | int verbose); | 68 | bool *is_new); |
75 | struct dso *dsos__findnew(const char *name); | 69 | int dso__load(struct dso *self, struct map *map, |
70 | symbol_filter_t filter, int v); | ||
76 | void dsos__fprintf(FILE *fp); | 71 | void dsos__fprintf(FILE *fp); |
77 | 72 | ||
78 | size_t dso__fprintf(struct dso *self, FILE *fp); | 73 | size_t dso__fprintf(struct dso *self, FILE *fp); |
79 | char dso__symtab_origin(const struct dso *self); | 74 | char dso__symtab_origin(const struct dso *self); |
80 | 75 | ||
81 | int load_kernel(void); | 76 | int load_kernel(unsigned int sym_priv_size, symbol_filter_t filter); |
82 | 77 | ||
83 | void symbol__init(void); | 78 | void symbol__init(void); |
84 | 79 | ||