perf: Move symbol resolution classes from report to libperf
PATCH 1/5 perf: Move symbol resolution classes from report to libperf
Will be used by perf top as well.
Signed-off-by Arnaldo Carvalho de Melo <[email protected]>
--- Documentation/perf_counter/Makefile | 2 + Documentation/perf_counter/builtin-report.c | 458 +-------------------------- Documentation/perf_counter/util/symbol.c | 421 ++++++++++++++++++++++++ Documentation/perf_counter/util/symbol.h | 33 ++ 4 files changed, 471 insertions(+), 443 deletions(-) create mode 100644 Documentation/perf_counter/util/symbol.c create mode 100644 Documentation/perf_counter/util/symbol.h
Documentation/perf_counter/Makefile +2 -0
@@ -298,6 +298,7 @@ LIB_H += util/help.h LIB_H += util/strbuf.h LIB_H += util/run-command.h LIB_H += util/sigchain.h +LIB_H += util/symbol.h LIB_OBJS += util/abspath.o LIB_OBJS += util/alias.o
@@ -317,6 +318,7 @@ LIB_OBJS += util/strbuf.o LIB_OBJS += util/usage.o LIB_OBJS += util/wrapper.o LIB_OBJS += util/sigchain.o +LIB_OBJS += util/symbol.o LIB_OBJS += util/pager.o BUILTIN_OBJS += builtin-help.o
Documentation/perf_counter/builtin-report.c +15 -443
500 lines not on this page · raw message
Documentation/perf_counter/util/symbol.c new file +421 -0
421 lines not on this page · raw message
Documentation/perf_counter/util/symbol.h new file +33 -0
@@ -0,0 +1,33 @@ +#ifndef _PERF_SYMBOL_ +#define _PERF_SYMBOL_ 1 + +#include <linux/types.h> +#include "list.h" +#include "rbtree.h" + +struct symbol { +struct rb_node rb_node; +__u64 start; +__u64 end; +char name[0 ]; +}; + +struct dso { +struct list_head node; +struct rb_root syms; +char name[0 ]; +}; + +struct dso *dso__new (const char *name); +void dso__delete (struct dso *self); + +struct symbol *dso__find_symbol (struct dso *self,uint64_t ip); + +int dso__load_kallsyms (struct dso *self); +int dso__load_vmlinux (struct dso *self,const char *vmlinux); +int dso__load (struct dso *self); + +size_t dso__fprintf (struct dso *self,FILE *fp); + +void symbol__init (void ); +#endif /* _PERF_SYMBOL_ */
Signature · 1 line
1.6.0.6
[tip:perfcounters/core] perf_counter tools: Move symbol resolution classes from report to libperf
Commit-ID: a2928c42a5d69328c3578b41bd4d72f6658cf7dc Gitweb: http://git.kernel.org/tip/a2928c42a5d69328c3578b41bd4d72f6658cf7dc Author: Arnaldo Carvalho de Melo <[email protected]> AuthorDate: Thu, 28 May 2009 14:55:04 -0300 Committer: Ingo Molnar <[email protected]> CommitDate: Thu, 28 May 2009 23:25:42 +0200
perf_counter tools: Move symbol resolution classes from report to libperf
Will be used by perf top as well.
Signed-off-by Arnaldo Carvalho de Melo <[email protected]>
Cc Paul Mackerras <[email protected]>
Cc Mike Galbraith <[email protected]>
Cc Steven Rostedt <[email protected]>
Cc Peter Zijlstra <[email protected]>
LKML-Reference: <[email protected]>
Signed-off-by Ingo Molnar <[email protected]>
--- Documentation/perf_counter/Makefile | 2 + Documentation/perf_counter/builtin-report.c | 458 +-------------------------- Documentation/perf_counter/util/symbol.c | 421 ++++++++++++++++++++++++ Documentation/perf_counter/util/symbol.h | 33 ++ 4 files changed, 471 insertions(+), 443 deletions(-)
Documentation/perf_counter/Makefile +2 -0
@@ -298,6 +298,7 @@ LIB_H += util/help.h LIB_H += util/strbuf.h LIB_H += util/run-command.h LIB_H += util/sigchain.h +LIB_H += util/symbol.h LIB_OBJS += util/abspath.o LIB_OBJS += util/alias.o
@@ -317,6 +318,7 @@ LIB_OBJS += util/strbuf.o LIB_OBJS += util/usage.o LIB_OBJS += util/wrapper.o LIB_OBJS += util/sigchain.o +LIB_OBJS += util/symbol.o LIB_OBJS += util/pager.o BUILTIN_OBJS += builtin-help.o
Documentation/perf_counter/builtin-report.c +15 -443
500 lines not on this page · raw message
Documentation/perf_counter/util/symbol.c new file +421 -0
421 lines not on this page · raw message
Documentation/perf_counter/util/symbol.h new file +33 -0
@@ -0,0 +1,33 @@ +#ifndef _PERF_SYMBOL_ +#define _PERF_SYMBOL_ 1 + +#include <linux/types.h> +#include "list.h" +#include "rbtree.h" + +struct symbol { +struct rb_node rb_node; +__u64 start; +__u64 end; +char name[0 ]; +}; + +struct dso { +struct list_head node; +struct rb_root syms; +char name[0 ]; +}; + +struct dso *dso__new (const char *name); +void dso__delete (struct dso *self); + +struct symbol *dso__find_symbol (struct dso *self,uint64_t ip); + +int dso__load_kallsyms (struct dso *self); +int dso__load_vmlinux (struct dso *self,const char *vmlinux); +int dso__load (struct dso *self); + +size_t dso__fprintf (struct dso *self,FILE *fp); + +void symbol__init (void ); +#endif /* _PERF_SYMBOL_ */