diff options
| author | Ingo Molnar <mingo@elte.hu> | 2009-07-18 06:19:57 -0400 |
|---|---|---|
| committer | Ingo Molnar <mingo@elte.hu> | 2009-07-18 06:20:01 -0400 |
| commit | 45bceffc3013bda7d2ebc7802e9b153b674e2d44 (patch) | |
| tree | 222d7dd8fd300925cbf12cdc0fba5bee2528997e /tools/perf/util/module.h | |
| parent | 6f2f3cf00ee32f75ba007a46bab88a54d68a5deb (diff) | |
| parent | 78af08d90b8f745044b1274430bc4bc6b2b27aca (diff) | |
Merge branch 'linus' into tracing/core
Merge reason: tracing/core was on an older, pre-rc1 base.
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'tools/perf/util/module.h')
| -rw-r--r-- | tools/perf/util/module.h | 53 |
1 files changed, 53 insertions, 0 deletions
diff --git a/tools/perf/util/module.h b/tools/perf/util/module.h new file mode 100644 index 000000000000..8a592ef641ca --- /dev/null +++ b/tools/perf/util/module.h | |||
| @@ -0,0 +1,53 @@ | |||
| 1 | #ifndef _PERF_MODULE_ | ||
| 2 | #define _PERF_MODULE_ 1 | ||
| 3 | |||
| 4 | #include <linux/types.h> | ||
| 5 | #include "../types.h" | ||
| 6 | #include <linux/list.h> | ||
| 7 | #include <linux/rbtree.h> | ||
| 8 | |||
| 9 | struct section { | ||
| 10 | struct rb_node rb_node; | ||
| 11 | u64 hash; | ||
| 12 | u64 vma; | ||
| 13 | char *name; | ||
| 14 | char *path; | ||
| 15 | }; | ||
| 16 | |||
| 17 | struct sec_dso { | ||
| 18 | struct list_head node; | ||
| 19 | struct rb_root secs; | ||
| 20 | struct section *(*find_section)(struct sec_dso *, const char *name); | ||
| 21 | char name[0]; | ||
| 22 | }; | ||
| 23 | |||
| 24 | struct module { | ||
| 25 | struct rb_node rb_node; | ||
| 26 | u64 hash; | ||
| 27 | char *name; | ||
| 28 | char *path; | ||
| 29 | struct sec_dso *sections; | ||
| 30 | int active; | ||
| 31 | }; | ||
| 32 | |||
| 33 | struct mod_dso { | ||
| 34 | struct list_head node; | ||
| 35 | struct rb_root mods; | ||
| 36 | struct module *(*find_module)(struct mod_dso *, const char *name); | ||
| 37 | char name[0]; | ||
| 38 | }; | ||
| 39 | |||
| 40 | struct sec_dso *sec_dso__new_dso(const char *name); | ||
| 41 | void sec_dso__delete_sections(struct sec_dso *self); | ||
| 42 | void sec_dso__delete_self(struct sec_dso *self); | ||
| 43 | size_t sec_dso__fprintf(struct sec_dso *self, FILE *fp); | ||
| 44 | struct section *sec_dso__find_section(struct sec_dso *self, const char *name); | ||
| 45 | |||
| 46 | struct mod_dso *mod_dso__new_dso(const char *name); | ||
| 47 | void mod_dso__delete_modules(struct mod_dso *self); | ||
| 48 | void mod_dso__delete_self(struct mod_dso *self); | ||
| 49 | size_t mod_dso__fprintf(struct mod_dso *self, FILE *fp); | ||
| 50 | struct module *mod_dso__find_module(struct mod_dso *self, const char *name); | ||
| 51 | int mod_dso__load_modules(struct mod_dso *dso); | ||
| 52 | |||
| 53 | #endif /* _PERF_MODULE_ */ | ||
