aboutsummaryrefslogtreecommitdiffstats
path: root/tools/perf/util/symbol.h
diff options
context:
space:
mode:
authorArnaldo Carvalho de Melo <acme@redhat.com>2009-10-20 12:25:40 -0400
committerIngo Molnar <mingo@elte.hu>2009-10-20 15:12:58 -0400
commite42049926ebdcae24fdfdc8f0e3ff8f05f24a60b (patch)
treebe0a07b62070aef5edcd64d84e12e04950220590 /tools/perf/util/symbol.h
parented52ce2e3c33dc7626a40fa2da766d1a6460e543 (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.h17
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
57extern const char *sym_hist_filter;
58
59typedef int (*symbol_filter_t)(struct map *map, struct symbol *sym);
60
61struct dso *dso__new(const char *name, unsigned int sym_priv_size); 55struct dso *dso__new(const char *name, unsigned int sym_priv_size);
62void dso__delete(struct dso *self); 56void dso__delete(struct dso *self);
63 57
@@ -70,15 +64,16 @@ struct symbol *dso__find_symbol(struct dso *self, u64 ip);
70 64
71int dsos__load_kernel(const char *vmlinux, unsigned int sym_priv_size, 65int 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);
73int dso__load(struct dso *self, struct map *map, symbol_filter_t filter, 67struct dso *dsos__findnew(const char *name, unsigned int sym_priv_size,
74 int verbose); 68 bool *is_new);
75struct dso *dsos__findnew(const char *name); 69int dso__load(struct dso *self, struct map *map,
70 symbol_filter_t filter, int v);
76void dsos__fprintf(FILE *fp); 71void dsos__fprintf(FILE *fp);
77 72
78size_t dso__fprintf(struct dso *self, FILE *fp); 73size_t dso__fprintf(struct dso *self, FILE *fp);
79char dso__symtab_origin(const struct dso *self); 74char dso__symtab_origin(const struct dso *self);
80 75
81int load_kernel(void); 76int load_kernel(unsigned int sym_priv_size, symbol_filter_t filter);
82 77
83void symbol__init(void); 78void symbol__init(void);
84 79