diff options
Diffstat (limited to 'tools')
-rw-r--r-- | tools/perf/util/map.h | 13 | ||||
-rw-r--r-- | tools/perf/util/srccode.h | 13 | ||||
-rw-r--r-- | tools/perf/util/thread.h | 2 |
3 files changed, 15 insertions, 13 deletions
diff --git a/tools/perf/util/map.h b/tools/perf/util/map.h index 09282aa45c80..5a889db4fca5 100644 --- a/tools/perf/util/map.h +++ b/tools/perf/util/map.h | |||
@@ -174,18 +174,7 @@ char *map__srcline(struct map *map, u64 addr, struct symbol *sym); | |||
174 | int map__fprintf_srcline(struct map *map, u64 addr, const char *prefix, | 174 | int map__fprintf_srcline(struct map *map, u64 addr, const char *prefix, |
175 | FILE *fp); | 175 | FILE *fp); |
176 | 176 | ||
177 | struct srccode_state { | 177 | struct srccode_state; |
178 | char *srcfile; | ||
179 | unsigned line; | ||
180 | }; | ||
181 | |||
182 | static inline void srccode_state_init(struct srccode_state *state) | ||
183 | { | ||
184 | state->srcfile = NULL; | ||
185 | state->line = 0; | ||
186 | } | ||
187 | |||
188 | void srccode_state_free(struct srccode_state *state); | ||
189 | 178 | ||
190 | int map__fprintf_srccode(struct map *map, u64 addr, | 179 | int map__fprintf_srccode(struct map *map, u64 addr, |
191 | FILE *fp, struct srccode_state *state); | 180 | FILE *fp, struct srccode_state *state); |
diff --git a/tools/perf/util/srccode.h b/tools/perf/util/srccode.h index e500a746d5f1..1b5ed769779c 100644 --- a/tools/perf/util/srccode.h +++ b/tools/perf/util/srccode.h | |||
@@ -1,6 +1,19 @@ | |||
1 | #ifndef SRCCODE_H | 1 | #ifndef SRCCODE_H |
2 | #define SRCCODE_H 1 | 2 | #define SRCCODE_H 1 |
3 | 3 | ||
4 | struct srccode_state { | ||
5 | char *srcfile; | ||
6 | unsigned line; | ||
7 | }; | ||
8 | |||
9 | static inline void srccode_state_init(struct srccode_state *state) | ||
10 | { | ||
11 | state->srcfile = NULL; | ||
12 | state->line = 0; | ||
13 | } | ||
14 | |||
15 | void srccode_state_free(struct srccode_state *state); | ||
16 | |||
4 | /* Result is not 0 terminated */ | 17 | /* Result is not 0 terminated */ |
5 | char *find_sourceline(char *fn, unsigned line, int *lenp); | 18 | char *find_sourceline(char *fn, unsigned line, int *lenp); |
6 | 19 | ||
diff --git a/tools/perf/util/thread.h b/tools/perf/util/thread.h index f3c939150f90..856cf1a9040a 100644 --- a/tools/perf/util/thread.h +++ b/tools/perf/util/thread.h | |||
@@ -7,8 +7,8 @@ | |||
7 | #include <linux/list.h> | 7 | #include <linux/list.h> |
8 | #include <unistd.h> | 8 | #include <unistd.h> |
9 | #include <sys/types.h> | 9 | #include <sys/types.h> |
10 | #include "srccode.h" | ||
10 | #include "symbol.h" | 11 | #include "symbol.h" |
11 | #include "map.h" | ||
12 | #include <strlist.h> | 12 | #include <strlist.h> |
13 | #include <intlist.h> | 13 | #include <intlist.h> |
14 | #include "rwsem.h" | 14 | #include "rwsem.h" |