summaryrefslogtreecommitdiff
path: root/Documentation/perf_counter/util/symbol.h
diff options
context:
space:
mode:
authorArnaldo Carvalho de Melo <acme@redhat.com>2009-05-28 14:55:13 -0300
committerIngo Molnar <mingo@elte.hu>2009-05-28 23:25:43 +0200
commit0085c954140d27937ada29d139c16341075d45e4 (patch)
treecb7a8e94077a26f7eb567eba832436df037f8f13 /Documentation/perf_counter/util/symbol.h
parenta2928c42a5d69328c3578b41bd4d72f6658cf7dc (diff)
downloadlwn-0085c954140d27937ada29d139c16341075d45e4.tar.gz
lwn-0085c954140d27937ada29d139c16341075d45e4.zip
perf_counter tools: struct symbol priv area
When creating a dso instance allow asking that all symbols in this dso have a private area just before the symbol. perf top will use this for its counters, etc. Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com> Cc: Paul Mackerras <paulus@samba.org> Cc: Mike Galbraith <efault@gmx.de> Cc: Steven Rostedt <rostedt@goodmis.org> Cc: Peter Zijlstra <a.p.zijlstra@chello.nl> LKML-Reference: <20090528175513.GD4747@ghostprotocols.net> Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'Documentation/perf_counter/util/symbol.h')
-rw-r--r--Documentation/perf_counter/util/symbol.h8
1 files changed, 7 insertions, 1 deletions
diff --git a/Documentation/perf_counter/util/symbol.h b/Documentation/perf_counter/util/symbol.h
index 6dffe76a28f0..9e120af9c71f 100644
--- a/Documentation/perf_counter/util/symbol.h
+++ b/Documentation/perf_counter/util/symbol.h
@@ -15,12 +15,18 @@ struct symbol {
struct dso {
struct list_head node;
struct rb_root syms;
+ unsigned int sym_priv_size;
char name[0];
};
-struct dso *dso__new(const char *name);
+struct dso *dso__new(const char *name, unsigned int sym_priv_size);
void dso__delete(struct dso *self);
+static inline void *dso__sym_priv(struct dso *self, struct symbol *sym)
+{
+ return ((void *)sym) - self->sym_priv_size;
+}
+
struct symbol *dso__find_symbol(struct dso *self, uint64_t ip);
int dso__load_kallsyms(struct dso *self);