diff options
author | Arnaldo Carvalho de Melo <acme@redhat.com> | 2009-06-30 18:01:20 -0400 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2009-06-30 18:07:09 -0400 |
commit | 25903407da21552419e0955705d6d8c8e601cb2e (patch) | |
tree | 5270f2817f367d9f4930983f7395612621b0b0c8 /tools/perf/util/strlist.h | |
parent | f5812a7a336fb952d819e4427b9a2dce02368e82 (diff) |
perf report: Add --dsos parameter
So that we can filter by dso. Symbols in other dsos won't be
accounted for.
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Cc: Mike Galbraith <efault@gmx.de>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Paul Mackerras <paulus@samba.org>
LKML-Reference: <1246399282-20934-2-git-send-email-acme@redhat.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'tools/perf/util/strlist.h')
-rw-r--r-- | tools/perf/util/strlist.h | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/tools/perf/util/strlist.h b/tools/perf/util/strlist.h new file mode 100644 index 000000000000..2fb117fb4b67 --- /dev/null +++ b/tools/perf/util/strlist.h | |||
@@ -0,0 +1,32 @@ | |||
1 | #ifndef STRLIST_H_ | ||
2 | #define STRLIST_H_ | ||
3 | |||
4 | #include "rbtree.h" | ||
5 | #include <stdbool.h> | ||
6 | |||
7 | struct str_node { | ||
8 | struct rb_node rb_node; | ||
9 | const char *s; | ||
10 | }; | ||
11 | |||
12 | struct strlist { | ||
13 | struct rb_root entries; | ||
14 | bool dupstr; | ||
15 | }; | ||
16 | |||
17 | struct strlist *strlist__new(bool dupstr, const char *slist); | ||
18 | void strlist__delete(struct strlist *self); | ||
19 | |||
20 | void strlist__remove(struct strlist *self, struct str_node *sn); | ||
21 | int strlist__load(struct strlist *self, const char *filename); | ||
22 | int strlist__add(struct strlist *self, const char *str); | ||
23 | |||
24 | bool strlist__has_entry(struct strlist *self, const char *entry); | ||
25 | |||
26 | static inline bool strlist__empty(const struct strlist *self) | ||
27 | { | ||
28 | return rb_first(&self->entries) == NULL; | ||
29 | } | ||
30 | |||
31 | int strlist__parse_list(struct strlist *self, const char *s); | ||
32 | #endif /* STRLIST_H_ */ | ||