diff options
| author | Linus Torvalds <torvalds@linux-foundation.org> | 2010-05-18 11:19:03 -0400 |
|---|---|---|
| committer | Linus Torvalds <torvalds@linux-foundation.org> | 2010-05-18 11:19:03 -0400 |
| commit | 4d7b4ac22fbec1a03206c6cde353f2fd6942f828 (patch) | |
| tree | 2d96a9e9c28cf6fa628a278decc00ad55a8b043b /tools/perf/util/thread.h | |
| parent | 3aaf51ace5975050ab43c7d4d7e439e0ae7d13d7 (diff) | |
| parent | 94f3ca95787ada3d64339a4ecb2754236ab563f6 (diff) | |
Merge branch 'perf-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip
* 'perf-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip: (311 commits)
perf tools: Add mode to build without newt support
perf symbols: symbol inconsistency message should be done only at verbose=1
perf tui: Add explicit -lslang option
perf options: Type check all the remaining OPT_ variants
perf options: Type check OPT_BOOLEAN and fix the offenders
perf options: Check v type in OPT_U?INTEGER
perf options: Introduce OPT_UINTEGER
perf tui: Add workaround for slang < 2.1.4
perf record: Fix bug mismatch with -c option definition
perf options: Introduce OPT_U64
perf tui: Add help window to show key associations
perf tui: Make <- exit menus too
perf newt: Add single key shortcuts for zoom into DSO and threads
perf newt: Exit browser unconditionally when CTRL+C, q or Q is pressed
perf newt: Fix the 'A'/'a' shortcut for annotate
perf newt: Make <- exit the ui_browser
x86, perf: P4 PMU - fix counters management logic
perf newt: Make <- zoom out filters
perf report: Report number of events, not samples
perf hist: Clarify events_stats fields usage
...
Fix up trivial conflicts in kernel/fork.c and tools/perf/builtin-record.c
Diffstat (limited to 'tools/perf/util/thread.h')
| -rw-r--r-- | tools/perf/util/thread.h | 53 |
1 files changed, 5 insertions, 48 deletions
diff --git a/tools/perf/util/thread.h b/tools/perf/util/thread.h index dcf70303e58e..1dfd9ff8bdcd 100644 --- a/tools/perf/util/thread.h +++ b/tools/perf/util/thread.h | |||
| @@ -5,14 +5,6 @@ | |||
| 5 | #include <unistd.h> | 5 | #include <unistd.h> |
| 6 | #include "symbol.h" | 6 | #include "symbol.h" |
| 7 | 7 | ||
| 8 | struct map_groups { | ||
| 9 | struct rb_root maps[MAP__NR_TYPES]; | ||
| 10 | struct list_head removed_maps[MAP__NR_TYPES]; | ||
| 11 | }; | ||
| 12 | |||
| 13 | size_t __map_groups__fprintf_maps(struct map_groups *self, | ||
| 14 | enum map_type type, FILE *fp); | ||
| 15 | |||
| 16 | struct thread { | 8 | struct thread { |
| 17 | struct rb_node rb_node; | 9 | struct rb_node rb_node; |
| 18 | struct map_groups mg; | 10 | struct map_groups mg; |
| @@ -23,29 +15,16 @@ struct thread { | |||
| 23 | int comm_len; | 15 | int comm_len; |
| 24 | }; | 16 | }; |
| 25 | 17 | ||
| 26 | void map_groups__init(struct map_groups *self); | 18 | struct perf_session; |
| 19 | |||
| 20 | int find_all_tid(int pid, pid_t ** all_tid); | ||
| 27 | int thread__set_comm(struct thread *self, const char *comm); | 21 | int thread__set_comm(struct thread *self, const char *comm); |
| 28 | int thread__comm_len(struct thread *self); | 22 | int thread__comm_len(struct thread *self); |
| 29 | struct thread *perf_session__findnew(struct perf_session *self, pid_t pid); | 23 | struct thread *perf_session__findnew(struct perf_session *self, pid_t pid); |
| 30 | void thread__insert_map(struct thread *self, struct map *map); | 24 | void thread__insert_map(struct thread *self, struct map *map); |
| 31 | int thread__fork(struct thread *self, struct thread *parent); | 25 | int thread__fork(struct thread *self, struct thread *parent); |
| 32 | size_t map_groups__fprintf_maps(struct map_groups *self, FILE *fp); | ||
| 33 | size_t perf_session__fprintf(struct perf_session *self, FILE *fp); | 26 | size_t perf_session__fprintf(struct perf_session *self, FILE *fp); |
| 34 | 27 | ||
| 35 | void maps__insert(struct rb_root *maps, struct map *map); | ||
| 36 | struct map *maps__find(struct rb_root *maps, u64 addr); | ||
| 37 | |||
| 38 | static inline void map_groups__insert(struct map_groups *self, struct map *map) | ||
| 39 | { | ||
| 40 | maps__insert(&self->maps[map->type], map); | ||
| 41 | } | ||
| 42 | |||
| 43 | static inline struct map *map_groups__find(struct map_groups *self, | ||
| 44 | enum map_type type, u64 addr) | ||
| 45 | { | ||
| 46 | return maps__find(&self->maps[type], addr); | ||
| 47 | } | ||
| 48 | |||
| 49 | static inline struct map *thread__find_map(struct thread *self, | 28 | static inline struct map *thread__find_map(struct thread *self, |
| 50 | enum map_type type, u64 addr) | 29 | enum map_type type, u64 addr) |
| 51 | { | 30 | { |
| @@ -54,34 +33,12 @@ static inline struct map *thread__find_map(struct thread *self, | |||
| 54 | 33 | ||
| 55 | void thread__find_addr_map(struct thread *self, | 34 | void thread__find_addr_map(struct thread *self, |
| 56 | struct perf_session *session, u8 cpumode, | 35 | struct perf_session *session, u8 cpumode, |
| 57 | enum map_type type, u64 addr, | 36 | enum map_type type, pid_t pid, u64 addr, |
| 58 | struct addr_location *al); | 37 | struct addr_location *al); |
| 59 | 38 | ||
| 60 | void thread__find_addr_location(struct thread *self, | 39 | void thread__find_addr_location(struct thread *self, |
| 61 | struct perf_session *session, u8 cpumode, | 40 | struct perf_session *session, u8 cpumode, |
| 62 | enum map_type type, u64 addr, | 41 | enum map_type type, pid_t pid, u64 addr, |
| 63 | struct addr_location *al, | 42 | struct addr_location *al, |
| 64 | symbol_filter_t filter); | 43 | symbol_filter_t filter); |
| 65 | struct symbol *map_groups__find_symbol(struct map_groups *self, | ||
| 66 | enum map_type type, u64 addr, | ||
| 67 | symbol_filter_t filter); | ||
| 68 | |||
| 69 | static inline struct symbol *map_groups__find_function(struct map_groups *self, | ||
| 70 | u64 addr, | ||
| 71 | symbol_filter_t filter) | ||
| 72 | { | ||
| 73 | return map_groups__find_symbol(self, MAP__FUNCTION, addr, filter); | ||
| 74 | } | ||
| 75 | |||
| 76 | struct map *map_groups__find_by_name(struct map_groups *self, | ||
| 77 | enum map_type type, const char *name); | ||
| 78 | |||
| 79 | int __map_groups__create_kernel_maps(struct map_groups *self, | ||
| 80 | struct map *vmlinux_maps[MAP__NR_TYPES], | ||
| 81 | struct dso *kernel); | ||
| 82 | int map_groups__create_kernel_maps(struct map_groups *self, | ||
| 83 | struct map *vmlinux_maps[MAP__NR_TYPES]); | ||
| 84 | |||
| 85 | struct map *map_groups__new_module(struct map_groups *self, u64 start, | ||
| 86 | const char *filename); | ||
| 87 | #endif /* __PERF_THREAD_H */ | 44 | #endif /* __PERF_THREAD_H */ |
