diff options
author | Arnaldo Carvalho de Melo <acme@redhat.com> | 2016-03-23 14:06:35 -0400 |
---|---|---|
committer | Arnaldo Carvalho de Melo <acme@redhat.com> | 2016-03-23 14:06:35 -0400 |
commit | 3938bad44ed2fea41328e4be2ae04a8e94540813 (patch) | |
tree | 33c18a47c789d20408a140914b4c58538723737e | |
parent | e476343860f8a4249106c4cae3d9a71fa1611fab (diff) |
perf tools: Remove needless 'extern' from function prototypes
Cc: Adrian Hunter <adrian.hunter@intel.com>
Cc: Jiri Olsa <jolsa@kernel.org>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Wang Nan <wangnan0@huawei.com>
Link: http://lkml.kernel.org/n/tip-w246stf7ponfamclsai6b9zo@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
-rw-r--r-- | tools/perf/bench/bench.h | 22 | ||||
-rw-r--r-- | tools/perf/bench/mem-memcpy-arch.h | 2 | ||||
-rw-r--r-- | tools/perf/bench/mem-memset-arch.h | 2 | ||||
-rw-r--r-- | tools/perf/builtin.h | 64 | ||||
-rw-r--r-- | tools/perf/util/cache.h | 22 | ||||
-rw-r--r-- | tools/perf/util/callchain.h | 4 | ||||
-rw-r--r-- | tools/perf/util/cgroup.h | 4 | ||||
-rw-r--r-- | tools/perf/util/cloexec.h | 2 | ||||
-rw-r--r-- | tools/perf/util/dwarf-aux.h | 72 | ||||
-rw-r--r-- | tools/perf/util/genelf.h | 8 | ||||
-rw-r--r-- | tools/perf/util/jit.h | 12 | ||||
-rw-r--r-- | tools/perf/util/llvm-utils.h | 7 | ||||
-rw-r--r-- | tools/perf/util/parse-events.h | 21 | ||||
-rw-r--r-- | tools/perf/util/probe-event.h | 57 | ||||
-rw-r--r-- | tools/perf/util/probe-finder.h | 24 | ||||
-rw-r--r-- | tools/perf/util/quote.h | 2 | ||||
-rw-r--r-- | tools/perf/util/strbuf.h | 16 | ||||
-rw-r--r-- | tools/perf/util/svghelper.h | 51 | ||||
-rw-r--r-- | tools/perf/util/symbol.h | 4 | ||||
-rw-r--r-- | tools/perf/util/util.h | 18 |
20 files changed, 197 insertions, 217 deletions
diff --git a/tools/perf/bench/bench.h b/tools/perf/bench/bench.h index 7e7e43207bbd..579a592990dd 100644 --- a/tools/perf/bench/bench.h +++ b/tools/perf/bench/bench.h | |||
@@ -25,19 +25,17 @@ | |||
25 | # endif | 25 | # endif |
26 | #endif | 26 | #endif |
27 | 27 | ||
28 | extern int bench_numa(int argc, const char **argv, const char *prefix); | 28 | int bench_numa(int argc, const char **argv, const char *prefix); |
29 | extern int bench_sched_messaging(int argc, const char **argv, const char *prefix); | 29 | int bench_sched_messaging(int argc, const char **argv, const char *prefix); |
30 | extern int bench_sched_pipe(int argc, const char **argv, const char *prefix); | 30 | int bench_sched_pipe(int argc, const char **argv, const char *prefix); |
31 | extern int bench_mem_memcpy(int argc, const char **argv, | 31 | int bench_mem_memcpy(int argc, const char **argv, const char *prefix); |
32 | const char *prefix); | 32 | int bench_mem_memset(int argc, const char **argv, const char *prefix); |
33 | extern int bench_mem_memset(int argc, const char **argv, const char *prefix); | 33 | int bench_futex_hash(int argc, const char **argv, const char *prefix); |
34 | extern int bench_futex_hash(int argc, const char **argv, const char *prefix); | 34 | int bench_futex_wake(int argc, const char **argv, const char *prefix); |
35 | extern int bench_futex_wake(int argc, const char **argv, const char *prefix); | 35 | int bench_futex_wake_parallel(int argc, const char **argv, const char *prefix); |
36 | extern int bench_futex_wake_parallel(int argc, const char **argv, | 36 | int bench_futex_requeue(int argc, const char **argv, const char *prefix); |
37 | const char *prefix); | ||
38 | extern int bench_futex_requeue(int argc, const char **argv, const char *prefix); | ||
39 | /* pi futexes */ | 37 | /* pi futexes */ |
40 | extern int bench_futex_lock_pi(int argc, const char **argv, const char *prefix); | 38 | int bench_futex_lock_pi(int argc, const char **argv, const char *prefix); |
41 | 39 | ||
42 | #define BENCH_FORMAT_DEFAULT_STR "default" | 40 | #define BENCH_FORMAT_DEFAULT_STR "default" |
43 | #define BENCH_FORMAT_DEFAULT 0 | 41 | #define BENCH_FORMAT_DEFAULT 0 |
diff --git a/tools/perf/bench/mem-memcpy-arch.h b/tools/perf/bench/mem-memcpy-arch.h index 57b4ed871459..5aad2a9408b0 100644 --- a/tools/perf/bench/mem-memcpy-arch.h +++ b/tools/perf/bench/mem-memcpy-arch.h | |||
@@ -2,7 +2,7 @@ | |||
2 | #ifdef HAVE_ARCH_X86_64_SUPPORT | 2 | #ifdef HAVE_ARCH_X86_64_SUPPORT |
3 | 3 | ||
4 | #define MEMCPY_FN(fn, name, desc) \ | 4 | #define MEMCPY_FN(fn, name, desc) \ |
5 | extern void *fn(void *, const void *, size_t); | 5 | void *fn(void *, const void *, size_t); |
6 | 6 | ||
7 | #include "mem-memcpy-x86-64-asm-def.h" | 7 | #include "mem-memcpy-x86-64-asm-def.h" |
8 | 8 | ||
diff --git a/tools/perf/bench/mem-memset-arch.h b/tools/perf/bench/mem-memset-arch.h index 633800cb0dcb..0d15786d9ae3 100644 --- a/tools/perf/bench/mem-memset-arch.h +++ b/tools/perf/bench/mem-memset-arch.h | |||
@@ -2,7 +2,7 @@ | |||
2 | #ifdef HAVE_ARCH_X86_64_SUPPORT | 2 | #ifdef HAVE_ARCH_X86_64_SUPPORT |
3 | 3 | ||
4 | #define MEMSET_FN(fn, name, desc) \ | 4 | #define MEMSET_FN(fn, name, desc) \ |
5 | extern void *fn(void *, int, size_t); | 5 | void *fn(void *, int, size_t); |
6 | 6 | ||
7 | #include "mem-memset-x86-64-asm-def.h" | 7 | #include "mem-memset-x86-64-asm-def.h" |
8 | 8 | ||
diff --git a/tools/perf/builtin.h b/tools/perf/builtin.h index 3f871b54e261..41c24010ab43 100644 --- a/tools/perf/builtin.h +++ b/tools/perf/builtin.h | |||
@@ -7,38 +7,38 @@ | |||
7 | extern const char perf_usage_string[]; | 7 | extern const char perf_usage_string[]; |
8 | extern const char perf_more_info_string[]; | 8 | extern const char perf_more_info_string[]; |
9 | 9 | ||
10 | extern void list_common_cmds_help(void); | 10 | void list_common_cmds_help(void); |
11 | extern const char *help_unknown_cmd(const char *cmd); | 11 | const char *help_unknown_cmd(const char *cmd); |
12 | extern void prune_packed_objects(int); | 12 | void prune_packed_objects(int); |
13 | extern int read_line_with_nul(char *buf, int size, FILE *file); | 13 | int read_line_with_nul(char *buf, int size, FILE *file); |
14 | extern int check_pager_config(const char *cmd); | 14 | int check_pager_config(const char *cmd); |
15 | 15 | ||
16 | extern int cmd_annotate(int argc, const char **argv, const char *prefix); | 16 | int cmd_annotate(int argc, const char **argv, const char *prefix); |
17 | extern int cmd_bench(int argc, const char **argv, const char *prefix); | 17 | int cmd_bench(int argc, const char **argv, const char *prefix); |
18 | extern int cmd_buildid_cache(int argc, const char **argv, const char *prefix); | 18 | int cmd_buildid_cache(int argc, const char **argv, const char *prefix); |
19 | extern int cmd_buildid_list(int argc, const char **argv, const char *prefix); | 19 | int cmd_buildid_list(int argc, const char **argv, const char *prefix); |
20 | extern int cmd_config(int argc, const char **argv, const char *prefix); | 20 | int cmd_config(int argc, const char **argv, const char *prefix); |
21 | extern int cmd_diff(int argc, const char **argv, const char *prefix); | 21 | int cmd_diff(int argc, const char **argv, const char *prefix); |
22 | extern int cmd_evlist(int argc, const char **argv, const char *prefix); | 22 | int cmd_evlist(int argc, const char **argv, const char *prefix); |
23 | extern int cmd_help(int argc, const char **argv, const char *prefix); | 23 | int cmd_help(int argc, const char **argv, const char *prefix); |
24 | extern int cmd_sched(int argc, const char **argv, const char *prefix); | 24 | int cmd_sched(int argc, const char **argv, const char *prefix); |
25 | extern int cmd_list(int argc, const char **argv, const char *prefix); | 25 | int cmd_list(int argc, const char **argv, const char *prefix); |
26 | extern int cmd_record(int argc, const char **argv, const char *prefix); | 26 | int cmd_record(int argc, const char **argv, const char *prefix); |
27 | extern int cmd_report(int argc, const char **argv, const char *prefix); | 27 | int cmd_report(int argc, const char **argv, const char *prefix); |
28 | extern int cmd_stat(int argc, const char **argv, const char *prefix); | 28 | int cmd_stat(int argc, const char **argv, const char *prefix); |
29 | extern int cmd_timechart(int argc, const char **argv, const char *prefix); | 29 | int cmd_timechart(int argc, const char **argv, const char *prefix); |
30 | extern int cmd_top(int argc, const char **argv, const char *prefix); | 30 | int cmd_top(int argc, const char **argv, const char *prefix); |
31 | extern int cmd_script(int argc, const char **argv, const char *prefix); | 31 | int cmd_script(int argc, const char **argv, const char *prefix); |
32 | extern int cmd_version(int argc, const char **argv, const char *prefix); | 32 | int cmd_version(int argc, const char **argv, const char *prefix); |
33 | extern int cmd_probe(int argc, const char **argv, const char *prefix); | 33 | int cmd_probe(int argc, const char **argv, const char *prefix); |
34 | extern int cmd_kmem(int argc, const char **argv, const char *prefix); | 34 | int cmd_kmem(int argc, const char **argv, const char *prefix); |
35 | extern int cmd_lock(int argc, const char **argv, const char *prefix); | 35 | int cmd_lock(int argc, const char **argv, const char *prefix); |
36 | extern int cmd_kvm(int argc, const char **argv, const char *prefix); | 36 | int cmd_kvm(int argc, const char **argv, const char *prefix); |
37 | extern int cmd_test(int argc, const char **argv, const char *prefix); | 37 | int cmd_test(int argc, const char **argv, const char *prefix); |
38 | extern int cmd_trace(int argc, const char **argv, const char *prefix); | 38 | int cmd_trace(int argc, const char **argv, const char *prefix); |
39 | extern int cmd_inject(int argc, const char **argv, const char *prefix); | 39 | int cmd_inject(int argc, const char **argv, const char *prefix); |
40 | extern int cmd_mem(int argc, const char **argv, const char *prefix); | 40 | int cmd_mem(int argc, const char **argv, const char *prefix); |
41 | extern int cmd_data(int argc, const char **argv, const char *prefix); | 41 | int cmd_data(int argc, const char **argv, const char *prefix); |
42 | 42 | ||
43 | extern int find_scripts(char **scripts_array, char **scripts_path_array); | 43 | int find_scripts(char **scripts_array, char **scripts_path_array); |
44 | #endif | 44 | #endif |
diff --git a/tools/perf/util/cache.h b/tools/perf/util/cache.h index 3ca453f0c51f..17be38540404 100644 --- a/tools/perf/util/cache.h +++ b/tools/perf/util/cache.h | |||
@@ -26,14 +26,14 @@ | |||
26 | extern const char *config_exclusive_filename; | 26 | extern const char *config_exclusive_filename; |
27 | 27 | ||
28 | typedef int (*config_fn_t)(const char *, const char *, void *); | 28 | typedef int (*config_fn_t)(const char *, const char *, void *); |
29 | extern int perf_default_config(const char *, const char *, void *); | 29 | int perf_default_config(const char *, const char *, void *); |
30 | extern int perf_config(config_fn_t fn, void *); | 30 | int perf_config(config_fn_t fn, void *); |
31 | extern int perf_config_int(const char *, const char *); | 31 | int perf_config_int(const char *, const char *); |
32 | extern u64 perf_config_u64(const char *, const char *); | 32 | u64 perf_config_u64(const char *, const char *); |
33 | extern int perf_config_bool(const char *, const char *); | 33 | int perf_config_bool(const char *, const char *); |
34 | extern int config_error_nonbool(const char *); | 34 | int config_error_nonbool(const char *); |
35 | extern const char *perf_config_dirname(const char *, const char *); | 35 | const char *perf_config_dirname(const char *, const char *); |
36 | extern const char *perf_etc_perfconfig(void); | 36 | const char *perf_etc_perfconfig(void); |
37 | 37 | ||
38 | char *alias_lookup(const char *alias); | 38 | char *alias_lookup(const char *alias); |
39 | int split_cmdline(char *cmdline, const char ***argv); | 39 | int split_cmdline(char *cmdline, const char ***argv); |
@@ -67,10 +67,10 @@ static inline int is_absolute_path(const char *path) | |||
67 | const char *make_nonrelative_path(const char *path); | 67 | const char *make_nonrelative_path(const char *path); |
68 | char *strip_path_suffix(const char *path, const char *suffix); | 68 | char *strip_path_suffix(const char *path, const char *suffix); |
69 | 69 | ||
70 | extern char *mkpath(const char *fmt, ...) __attribute__((format (printf, 1, 2))); | 70 | char *mkpath(const char *fmt, ...) __attribute__((format (printf, 1, 2))); |
71 | extern char *perf_path(const char *fmt, ...) __attribute__((format (printf, 1, 2))); | 71 | char *perf_path(const char *fmt, ...) __attribute__((format (printf, 1, 2))); |
72 | 72 | ||
73 | extern char *perf_pathdup(const char *fmt, ...) | 73 | char *perf_pathdup(const char *fmt, ...) |
74 | __attribute__((format (printf, 1, 2))); | 74 | __attribute__((format (printf, 1, 2))); |
75 | 75 | ||
76 | #endif /* __PERF_CACHE_H */ | 76 | #endif /* __PERF_CACHE_H */ |
diff --git a/tools/perf/util/callchain.h b/tools/perf/util/callchain.h index 18dd22269764..d2a9e694810c 100644 --- a/tools/perf/util/callchain.h +++ b/tools/perf/util/callchain.h | |||
@@ -220,7 +220,7 @@ int fill_callchain_info(struct addr_location *al, struct callchain_cursor_node * | |||
220 | bool hide_unresolved); | 220 | bool hide_unresolved); |
221 | 221 | ||
222 | extern const char record_callchain_help[]; | 222 | extern const char record_callchain_help[]; |
223 | extern int parse_callchain_record(const char *arg, struct callchain_param *param); | 223 | int parse_callchain_record(const char *arg, struct callchain_param *param); |
224 | int parse_callchain_record_opt(const char *arg, struct callchain_param *param); | 224 | int parse_callchain_record_opt(const char *arg, struct callchain_param *param); |
225 | int parse_callchain_report_opt(const char *arg); | 225 | int parse_callchain_report_opt(const char *arg); |
226 | int parse_callchain_top_opt(const char *arg); | 226 | int parse_callchain_top_opt(const char *arg); |
@@ -236,7 +236,7 @@ static inline void callchain_cursor_snapshot(struct callchain_cursor *dest, | |||
236 | } | 236 | } |
237 | 237 | ||
238 | #ifdef HAVE_SKIP_CALLCHAIN_IDX | 238 | #ifdef HAVE_SKIP_CALLCHAIN_IDX |
239 | extern int arch_skip_callchain_idx(struct thread *thread, struct ip_callchain *chain); | 239 | int arch_skip_callchain_idx(struct thread *thread, struct ip_callchain *chain); |
240 | #else | 240 | #else |
241 | static inline int arch_skip_callchain_idx(struct thread *thread __maybe_unused, | 241 | static inline int arch_skip_callchain_idx(struct thread *thread __maybe_unused, |
242 | struct ip_callchain *chain __maybe_unused) | 242 | struct ip_callchain *chain __maybe_unused) |
diff --git a/tools/perf/util/cgroup.h b/tools/perf/util/cgroup.h index b4b8cb42fe5e..31f8dcdbd7ef 100644 --- a/tools/perf/util/cgroup.h +++ b/tools/perf/util/cgroup.h | |||
@@ -13,7 +13,7 @@ struct cgroup_sel { | |||
13 | 13 | ||
14 | 14 | ||
15 | extern int nr_cgroups; /* number of explicit cgroups defined */ | 15 | extern int nr_cgroups; /* number of explicit cgroups defined */ |
16 | extern void close_cgroup(struct cgroup_sel *cgrp); | 16 | void close_cgroup(struct cgroup_sel *cgrp); |
17 | extern int parse_cgroups(const struct option *opt, const char *str, int unset); | 17 | int parse_cgroups(const struct option *opt, const char *str, int unset); |
18 | 18 | ||
19 | #endif /* __CGROUP_H__ */ | 19 | #endif /* __CGROUP_H__ */ |
diff --git a/tools/perf/util/cloexec.h b/tools/perf/util/cloexec.h index 3bee6773ddb0..d0d465953d36 100644 --- a/tools/perf/util/cloexec.h +++ b/tools/perf/util/cloexec.h | |||
@@ -5,7 +5,7 @@ unsigned long perf_event_open_cloexec_flag(void); | |||
5 | 5 | ||
6 | #ifdef __GLIBC_PREREQ | 6 | #ifdef __GLIBC_PREREQ |
7 | #if !__GLIBC_PREREQ(2, 6) && !defined(__UCLIBC__) | 7 | #if !__GLIBC_PREREQ(2, 6) && !defined(__UCLIBC__) |
8 | extern int sched_getcpu(void) __THROW; | 8 | int sched_getcpu(void) __THROW; |
9 | #endif | 9 | #endif |
10 | #endif | 10 | #endif |
11 | 11 | ||
diff --git a/tools/perf/util/dwarf-aux.h b/tools/perf/util/dwarf-aux.h index c42ec366f2a7..dc0ce1adb075 100644 --- a/tools/perf/util/dwarf-aux.h +++ b/tools/perf/util/dwarf-aux.h | |||
@@ -25,48 +25,48 @@ | |||
25 | #include <elfutils/version.h> | 25 | #include <elfutils/version.h> |
26 | 26 | ||
27 | /* Find the realpath of the target file */ | 27 | /* Find the realpath of the target file */ |
28 | extern const char *cu_find_realpath(Dwarf_Die *cu_die, const char *fname); | 28 | const char *cu_find_realpath(Dwarf_Die *cu_die, const char *fname); |
29 | 29 | ||
30 | /* Get DW_AT_comp_dir (should be NULL with older gcc) */ | 30 | /* Get DW_AT_comp_dir (should be NULL with older gcc) */ |
31 | extern const char *cu_get_comp_dir(Dwarf_Die *cu_die); | 31 | const char *cu_get_comp_dir(Dwarf_Die *cu_die); |
32 | 32 | ||
33 | /* Get a line number and file name for given address */ | 33 | /* Get a line number and file name for given address */ |
34 | extern int cu_find_lineinfo(Dwarf_Die *cudie, unsigned long addr, | 34 | int cu_find_lineinfo(Dwarf_Die *cudie, unsigned long addr, |
35 | const char **fname, int *lineno); | 35 | const char **fname, int *lineno); |
36 | 36 | ||
37 | /* Walk on funcitons at given address */ | 37 | /* Walk on funcitons at given address */ |
38 | extern int cu_walk_functions_at(Dwarf_Die *cu_die, Dwarf_Addr addr, | 38 | int cu_walk_functions_at(Dwarf_Die *cu_die, Dwarf_Addr addr, |
39 | int (*callback)(Dwarf_Die *, void *), void *data); | 39 | int (*callback)(Dwarf_Die *, void *), void *data); |
40 | 40 | ||
41 | /* Ensure that this DIE is a subprogram and definition (not declaration) */ | 41 | /* Ensure that this DIE is a subprogram and definition (not declaration) */ |
42 | extern bool die_is_func_def(Dwarf_Die *dw_die); | 42 | bool die_is_func_def(Dwarf_Die *dw_die); |
43 | 43 | ||
44 | /* Ensure that this DIE is an instance of a subprogram */ | 44 | /* Ensure that this DIE is an instance of a subprogram */ |
45 | extern bool die_is_func_instance(Dwarf_Die *dw_die); | 45 | bool die_is_func_instance(Dwarf_Die *dw_die); |
46 | 46 | ||
47 | /* Compare diename and tname */ | 47 | /* Compare diename and tname */ |
48 | extern bool die_compare_name(Dwarf_Die *dw_die, const char *tname); | 48 | bool die_compare_name(Dwarf_Die *dw_die, const char *tname); |
49 | 49 | ||
50 | /* Matching diename with glob pattern */ | 50 | /* Matching diename with glob pattern */ |
51 | extern bool die_match_name(Dwarf_Die *dw_die, const char *glob); | 51 | bool die_match_name(Dwarf_Die *dw_die, const char *glob); |
52 | 52 | ||
53 | /* Get callsite line number of inline-function instance */ | 53 | /* Get callsite line number of inline-function instance */ |
54 | extern int die_get_call_lineno(Dwarf_Die *in_die); | 54 | int die_get_call_lineno(Dwarf_Die *in_die); |
55 | 55 | ||
56 | /* Get callsite file name of inlined function instance */ | 56 | /* Get callsite file name of inlined function instance */ |
57 | extern const char *die_get_call_file(Dwarf_Die *in_die); | 57 | const char *die_get_call_file(Dwarf_Die *in_die); |
58 | 58 | ||
59 | /* Get type die */ | 59 | /* Get type die */ |
60 | extern Dwarf_Die *die_get_type(Dwarf_Die *vr_die, Dwarf_Die *die_mem); | 60 | Dwarf_Die *die_get_type(Dwarf_Die *vr_die, Dwarf_Die *die_mem); |
61 | 61 | ||
62 | /* Get a type die, but skip qualifiers and typedef */ | 62 | /* Get a type die, but skip qualifiers and typedef */ |
63 | extern Dwarf_Die *die_get_real_type(Dwarf_Die *vr_die, Dwarf_Die *die_mem); | 63 | Dwarf_Die *die_get_real_type(Dwarf_Die *vr_die, Dwarf_Die *die_mem); |
64 | 64 | ||
65 | /* Check whether the DIE is signed or not */ | 65 | /* Check whether the DIE is signed or not */ |
66 | extern bool die_is_signed_type(Dwarf_Die *tp_die); | 66 | bool die_is_signed_type(Dwarf_Die *tp_die); |
67 | 67 | ||
68 | /* Get data_member_location offset */ | 68 | /* Get data_member_location offset */ |
69 | extern int die_get_data_member_location(Dwarf_Die *mb_die, Dwarf_Word *offs); | 69 | int die_get_data_member_location(Dwarf_Die *mb_die, Dwarf_Word *offs); |
70 | 70 | ||
71 | /* Return values for die_find_child() callbacks */ | 71 | /* Return values for die_find_child() callbacks */ |
72 | enum { | 72 | enum { |
@@ -77,29 +77,29 @@ enum { | |||
77 | }; | 77 | }; |
78 | 78 | ||
79 | /* Search child DIEs */ | 79 | /* Search child DIEs */ |
80 | extern Dwarf_Die *die_find_child(Dwarf_Die *rt_die, | 80 | Dwarf_Die *die_find_child(Dwarf_Die *rt_die, |
81 | int (*callback)(Dwarf_Die *, void *), | 81 | int (*callback)(Dwarf_Die *, void *), |
82 | void *data, Dwarf_Die *die_mem); | 82 | void *data, Dwarf_Die *die_mem); |
83 | 83 | ||
84 | /* Search a non-inlined function including given address */ | 84 | /* Search a non-inlined function including given address */ |
85 | extern Dwarf_Die *die_find_realfunc(Dwarf_Die *cu_die, Dwarf_Addr addr, | 85 | Dwarf_Die *die_find_realfunc(Dwarf_Die *cu_die, Dwarf_Addr addr, |
86 | Dwarf_Die *die_mem); | 86 | Dwarf_Die *die_mem); |
87 | 87 | ||
88 | /* Search a non-inlined function with tail call at given address */ | 88 | /* Search a non-inlined function with tail call at given address */ |
89 | Dwarf_Die *die_find_tailfunc(Dwarf_Die *cu_die, Dwarf_Addr addr, | 89 | Dwarf_Die *die_find_tailfunc(Dwarf_Die *cu_die, Dwarf_Addr addr, |
90 | Dwarf_Die *die_mem); | 90 | Dwarf_Die *die_mem); |
91 | 91 | ||
92 | /* Search the top inlined function including given address */ | 92 | /* Search the top inlined function including given address */ |
93 | extern Dwarf_Die *die_find_top_inlinefunc(Dwarf_Die *sp_die, Dwarf_Addr addr, | 93 | Dwarf_Die *die_find_top_inlinefunc(Dwarf_Die *sp_die, Dwarf_Addr addr, |
94 | Dwarf_Die *die_mem); | 94 | Dwarf_Die *die_mem); |
95 | 95 | ||
96 | /* Search the deepest inlined function including given address */ | 96 | /* Search the deepest inlined function including given address */ |
97 | extern Dwarf_Die *die_find_inlinefunc(Dwarf_Die *sp_die, Dwarf_Addr addr, | 97 | Dwarf_Die *die_find_inlinefunc(Dwarf_Die *sp_die, Dwarf_Addr addr, |
98 | Dwarf_Die *die_mem); | 98 | Dwarf_Die *die_mem); |
99 | 99 | ||
100 | /* Walk on the instances of given DIE */ | 100 | /* Walk on the instances of given DIE */ |
101 | extern int die_walk_instances(Dwarf_Die *in_die, | 101 | int die_walk_instances(Dwarf_Die *in_die, |
102 | int (*callback)(Dwarf_Die *, void *), void *data); | 102 | int (*callback)(Dwarf_Die *, void *), void *data); |
103 | 103 | ||
104 | /* Walker on lines (Note: line number will not be sorted) */ | 104 | /* Walker on lines (Note: line number will not be sorted) */ |
105 | typedef int (* line_walk_callback_t) (const char *fname, int lineno, | 105 | typedef int (* line_walk_callback_t) (const char *fname, int lineno, |
@@ -109,22 +109,20 @@ typedef int (* line_walk_callback_t) (const char *fname, int lineno, | |||
109 | * Walk on lines inside given DIE. If the DIE is a subprogram, walk only on | 109 | * Walk on lines inside given DIE. If the DIE is a subprogram, walk only on |
110 | * the lines inside the subprogram, otherwise the DIE must be a CU DIE. | 110 | * the lines inside the subprogram, otherwise the DIE must be a CU DIE. |
111 | */ | 111 | */ |
112 | extern int die_walk_lines(Dwarf_Die *rt_die, line_walk_callback_t callback, | 112 | int die_walk_lines(Dwarf_Die *rt_die, line_walk_callback_t callback, void *data); |
113 | void *data); | ||
114 | 113 | ||
115 | /* Find a variable called 'name' at given address */ | 114 | /* Find a variable called 'name' at given address */ |
116 | extern Dwarf_Die *die_find_variable_at(Dwarf_Die *sp_die, const char *name, | 115 | Dwarf_Die *die_find_variable_at(Dwarf_Die *sp_die, const char *name, |
117 | Dwarf_Addr addr, Dwarf_Die *die_mem); | 116 | Dwarf_Addr addr, Dwarf_Die *die_mem); |
118 | 117 | ||
119 | /* Find a member called 'name' */ | 118 | /* Find a member called 'name' */ |
120 | extern Dwarf_Die *die_find_member(Dwarf_Die *st_die, const char *name, | 119 | Dwarf_Die *die_find_member(Dwarf_Die *st_die, const char *name, |
121 | Dwarf_Die *die_mem); | 120 | Dwarf_Die *die_mem); |
122 | 121 | ||
123 | /* Get the name of given variable DIE */ | 122 | /* Get the name of given variable DIE */ |
124 | extern int die_get_typename(Dwarf_Die *vr_die, struct strbuf *buf); | 123 | int die_get_typename(Dwarf_Die *vr_die, struct strbuf *buf); |
125 | 124 | ||
126 | /* Get the name and type of given variable DIE, stored as "type\tname" */ | 125 | /* Get the name and type of given variable DIE, stored as "type\tname" */ |
127 | extern int die_get_varname(Dwarf_Die *vr_die, struct strbuf *buf); | 126 | int die_get_varname(Dwarf_Die *vr_die, struct strbuf *buf); |
128 | extern int die_get_var_range(Dwarf_Die *sp_die, Dwarf_Die *vr_die, | 127 | int die_get_var_range(Dwarf_Die *sp_die, Dwarf_Die *vr_die, struct strbuf *buf); |
129 | struct strbuf *buf); | ||
130 | #endif | 128 | #endif |
diff --git a/tools/perf/util/genelf.h b/tools/perf/util/genelf.h index 45bf9c6d3257..cd67e64a0494 100644 --- a/tools/perf/util/genelf.h +++ b/tools/perf/util/genelf.h | |||
@@ -2,12 +2,10 @@ | |||
2 | #define __GENELF_H__ | 2 | #define __GENELF_H__ |
3 | 3 | ||
4 | /* genelf.c */ | 4 | /* genelf.c */ |
5 | extern int jit_write_elf(int fd, uint64_t code_addr, const char *sym, | 5 | int jit_write_elf(int fd, uint64_t code_addr, const char *sym, |
6 | const void *code, int csize, | 6 | const void *code, int csize, void *debug, int nr_debug_entries); |
7 | void *debug, int nr_debug_entries); | ||
8 | /* genelf_debug.c */ | 7 | /* genelf_debug.c */ |
9 | extern int jit_add_debug_info(Elf *e, uint64_t code_addr, | 8 | int jit_add_debug_info(Elf *e, uint64_t code_addr, void *debug, int nr_debug_entries); |
10 | void *debug, int nr_debug_entries); | ||
11 | 9 | ||
12 | #if defined(__arm__) | 10 | #if defined(__arm__) |
13 | #define GEN_ELF_ARCH EM_ARM | 11 | #define GEN_ELF_ARCH EM_ARM |
diff --git a/tools/perf/util/jit.h b/tools/perf/util/jit.h index a1e99da0715a..3f42ee4d2a0b 100644 --- a/tools/perf/util/jit.h +++ b/tools/perf/util/jit.h | |||
@@ -3,13 +3,9 @@ | |||
3 | 3 | ||
4 | #include <data.h> | 4 | #include <data.h> |
5 | 5 | ||
6 | extern int jit_process(struct perf_session *session, | 6 | int jit_process(struct perf_session *session, struct perf_data_file *output, |
7 | struct perf_data_file *output, | 7 | struct machine *machine, char *filename, pid_t pid, u64 *nbytes); |
8 | struct machine *machine, | 8 | |
9 | char *filename, | 9 | int jit_inject_record(const char *filename); |
10 | pid_t pid, | ||
11 | u64 *nbytes); | ||
12 | |||
13 | extern int jit_inject_record(const char *filename); | ||
14 | 10 | ||
15 | #endif /* __JIT_H__ */ | 11 | #endif /* __JIT_H__ */ |
diff --git a/tools/perf/util/llvm-utils.h b/tools/perf/util/llvm-utils.h index 5b3cf1c229e2..23b9a743fe72 100644 --- a/tools/perf/util/llvm-utils.h +++ b/tools/perf/util/llvm-utils.h | |||
@@ -39,11 +39,10 @@ struct llvm_param { | |||
39 | }; | 39 | }; |
40 | 40 | ||
41 | extern struct llvm_param llvm_param; | 41 | extern struct llvm_param llvm_param; |
42 | extern int perf_llvm_config(const char *var, const char *value); | 42 | int perf_llvm_config(const char *var, const char *value); |
43 | 43 | ||
44 | extern int llvm__compile_bpf(const char *path, void **p_obj_buf, | 44 | int llvm__compile_bpf(const char *path, void **p_obj_buf, size_t *p_obj_buf_sz); |
45 | size_t *p_obj_buf_sz); | ||
46 | 45 | ||
47 | /* This function is for test__llvm() use only */ | 46 | /* This function is for test__llvm() use only */ |
48 | extern int llvm__search_clang(void); | 47 | int llvm__search_clang(void); |
49 | #endif | 48 | #endif |
diff --git a/tools/perf/util/parse-events.h b/tools/perf/util/parse-events.h index 67e493088e81..d740c3ca9a1d 100644 --- a/tools/perf/util/parse-events.h +++ b/tools/perf/util/parse-events.h | |||
@@ -22,19 +22,18 @@ struct tracepoint_path { | |||
22 | struct tracepoint_path *next; | 22 | struct tracepoint_path *next; |
23 | }; | 23 | }; |
24 | 24 | ||
25 | extern struct tracepoint_path *tracepoint_id_to_path(u64 config); | 25 | struct tracepoint_path *tracepoint_id_to_path(u64 config); |
26 | extern struct tracepoint_path *tracepoint_name_to_path(const char *name); | 26 | struct tracepoint_path *tracepoint_name_to_path(const char *name); |
27 | extern bool have_tracepoints(struct list_head *evlist); | 27 | bool have_tracepoints(struct list_head *evlist); |
28 | 28 | ||
29 | const char *event_type(int type); | 29 | const char *event_type(int type); |
30 | 30 | ||
31 | extern int parse_events_option(const struct option *opt, const char *str, | 31 | int parse_events_option(const struct option *opt, const char *str, int unset); |
32 | int unset); | 32 | int parse_events(struct perf_evlist *evlist, const char *str, |
33 | extern int parse_events(struct perf_evlist *evlist, const char *str, | 33 | struct parse_events_error *error); |
34 | struct parse_events_error *error); | 34 | int parse_events_terms(struct list_head *terms, const char *str); |
35 | extern int parse_events_terms(struct list_head *terms, const char *str); | 35 | int parse_filter(const struct option *opt, const char *str, int unset); |
36 | extern int parse_filter(const struct option *opt, const char *str, int unset); | 36 | int exclude_perf(const struct option *opt, const char *arg, int unset); |
37 | extern int exclude_perf(const struct option *opt, const char *arg, int unset); | ||
38 | 37 | ||
39 | #define EVENTS_HELP_MAX (128*1024) | 38 | #define EVENTS_HELP_MAX (128*1024) |
40 | 39 | ||
@@ -183,7 +182,7 @@ void print_symbol_events(const char *event_glob, unsigned type, | |||
183 | void print_tracepoint_events(const char *subsys_glob, const char *event_glob, | 182 | void print_tracepoint_events(const char *subsys_glob, const char *event_glob, |
184 | bool name_only); | 183 | bool name_only); |
185 | int print_hwcache_events(const char *event_glob, bool name_only); | 184 | int print_hwcache_events(const char *event_glob, bool name_only); |
186 | extern int is_valid_tracepoint(const char *event_string); | 185 | int is_valid_tracepoint(const char *event_string); |
187 | 186 | ||
188 | int valid_event_mount(const char *eventfs); | 187 | int valid_event_mount(const char *eventfs); |
189 | char *parse_events_formats_error_string(char *additional_terms); | 188 | char *parse_events_formats_error_string(char *additional_terms); |
diff --git a/tools/perf/util/probe-event.h b/tools/perf/util/probe-event.h index ba926c30f8cd..e54e7b011577 100644 --- a/tools/perf/util/probe-event.h +++ b/tools/perf/util/probe-event.h | |||
@@ -114,49 +114,44 @@ int init_probe_symbol_maps(bool user_only); | |||
114 | void exit_probe_symbol_maps(void); | 114 | void exit_probe_symbol_maps(void); |
115 | 115 | ||
116 | /* Command string to events */ | 116 | /* Command string to events */ |
117 | extern int parse_perf_probe_command(const char *cmd, | 117 | int parse_perf_probe_command(const char *cmd, struct perf_probe_event *pev); |
118 | struct perf_probe_event *pev); | 118 | int parse_probe_trace_command(const char *cmd, struct probe_trace_event *tev); |
119 | extern int parse_probe_trace_command(const char *cmd, | ||
120 | struct probe_trace_event *tev); | ||
121 | 119 | ||
122 | /* Events to command string */ | 120 | /* Events to command string */ |
123 | extern char *synthesize_perf_probe_command(struct perf_probe_event *pev); | 121 | char *synthesize_perf_probe_command(struct perf_probe_event *pev); |
124 | extern char *synthesize_probe_trace_command(struct probe_trace_event *tev); | 122 | char *synthesize_probe_trace_command(struct probe_trace_event *tev); |
125 | extern int synthesize_perf_probe_arg(struct perf_probe_arg *pa, char *buf, | 123 | int synthesize_perf_probe_arg(struct perf_probe_arg *pa, char *buf, size_t len); |
126 | size_t len); | ||
127 | 124 | ||
128 | /* Check the perf_probe_event needs debuginfo */ | 125 | /* Check the perf_probe_event needs debuginfo */ |
129 | extern bool perf_probe_event_need_dwarf(struct perf_probe_event *pev); | 126 | bool perf_probe_event_need_dwarf(struct perf_probe_event *pev); |
130 | 127 | ||
131 | /* Release event contents */ | 128 | /* Release event contents */ |
132 | extern void clear_perf_probe_event(struct perf_probe_event *pev); | 129 | void clear_perf_probe_event(struct perf_probe_event *pev); |
133 | extern void clear_probe_trace_event(struct probe_trace_event *tev); | 130 | void clear_probe_trace_event(struct probe_trace_event *tev); |
134 | 131 | ||
135 | /* Command string to line-range */ | 132 | /* Command string to line-range */ |
136 | extern int parse_line_range_desc(const char *cmd, struct line_range *lr); | 133 | int parse_line_range_desc(const char *cmd, struct line_range *lr); |
137 | 134 | ||
138 | /* Release line range members */ | 135 | /* Release line range members */ |
139 | extern void line_range__clear(struct line_range *lr); | 136 | void line_range__clear(struct line_range *lr); |
140 | 137 | ||
141 | /* Initialize line range */ | 138 | /* Initialize line range */ |
142 | extern int line_range__init(struct line_range *lr); | 139 | int line_range__init(struct line_range *lr); |
143 | 140 | ||
144 | extern int add_perf_probe_events(struct perf_probe_event *pevs, int npevs); | 141 | int add_perf_probe_events(struct perf_probe_event *pevs, int npevs); |
145 | extern int convert_perf_probe_events(struct perf_probe_event *pevs, int npevs); | 142 | int convert_perf_probe_events(struct perf_probe_event *pevs, int npevs); |
146 | extern int apply_perf_probe_events(struct perf_probe_event *pevs, int npevs); | 143 | int apply_perf_probe_events(struct perf_probe_event *pevs, int npevs); |
147 | extern void cleanup_perf_probe_events(struct perf_probe_event *pevs, int npevs); | 144 | void cleanup_perf_probe_events(struct perf_probe_event *pevs, int npevs); |
148 | extern int del_perf_probe_events(struct strfilter *filter); | 145 | int del_perf_probe_events(struct strfilter *filter); |
149 | 146 | ||
150 | extern int show_perf_probe_event(const char *group, const char *event, | 147 | int show_perf_probe_event(const char *group, const char *event, |
151 | struct perf_probe_event *pev, | 148 | struct perf_probe_event *pev, |
152 | const char *module, bool use_stdout); | 149 | const char *module, bool use_stdout); |
153 | extern int show_perf_probe_events(struct strfilter *filter); | 150 | int show_perf_probe_events(struct strfilter *filter); |
154 | extern int show_line_range(struct line_range *lr, const char *module, | 151 | int show_line_range(struct line_range *lr, const char *module, bool user); |
155 | bool user); | 152 | int show_available_vars(struct perf_probe_event *pevs, int npevs, |
156 | extern int show_available_vars(struct perf_probe_event *pevs, int npevs, | 153 | struct strfilter *filter); |
157 | struct strfilter *filter); | 154 | int show_available_funcs(const char *module, struct strfilter *filter, bool user); |
158 | extern int show_available_funcs(const char *module, struct strfilter *filter, | ||
159 | bool user); | ||
160 | bool arch__prefers_symtab(void); | 155 | bool arch__prefers_symtab(void); |
161 | void arch__fix_tev_from_maps(struct perf_probe_event *pev, | 156 | void arch__fix_tev_from_maps(struct perf_probe_event *pev, |
162 | struct probe_trace_event *tev, struct map *map); | 157 | struct probe_trace_event *tev, struct map *map); |
diff --git a/tools/perf/util/probe-finder.h b/tools/perf/util/probe-finder.h index 0aec7704e395..51137fccb9c8 100644 --- a/tools/perf/util/probe-finder.h +++ b/tools/perf/util/probe-finder.h | |||
@@ -34,27 +34,25 @@ struct debuginfo { | |||
34 | }; | 34 | }; |
35 | 35 | ||
36 | /* This also tries to open distro debuginfo */ | 36 | /* This also tries to open distro debuginfo */ |
37 | extern struct debuginfo *debuginfo__new(const char *path); | 37 | struct debuginfo *debuginfo__new(const char *path); |
38 | extern void debuginfo__delete(struct debuginfo *dbg); | 38 | void debuginfo__delete(struct debuginfo *dbg); |
39 | 39 | ||
40 | /* Find probe_trace_events specified by perf_probe_event from debuginfo */ | 40 | /* Find probe_trace_events specified by perf_probe_event from debuginfo */ |
41 | extern int debuginfo__find_trace_events(struct debuginfo *dbg, | 41 | int debuginfo__find_trace_events(struct debuginfo *dbg, |
42 | struct perf_probe_event *pev, | 42 | struct perf_probe_event *pev, |
43 | struct probe_trace_event **tevs); | 43 | struct probe_trace_event **tevs); |
44 | 44 | ||
45 | /* Find a perf_probe_point from debuginfo */ | 45 | /* Find a perf_probe_point from debuginfo */ |
46 | extern int debuginfo__find_probe_point(struct debuginfo *dbg, | 46 | int debuginfo__find_probe_point(struct debuginfo *dbg, unsigned long addr, |
47 | unsigned long addr, | 47 | struct perf_probe_point *ppt); |
48 | struct perf_probe_point *ppt); | ||
49 | 48 | ||
50 | /* Find a line range */ | 49 | /* Find a line range */ |
51 | extern int debuginfo__find_line_range(struct debuginfo *dbg, | 50 | int debuginfo__find_line_range(struct debuginfo *dbg, struct line_range *lr); |
52 | struct line_range *lr); | ||
53 | 51 | ||
54 | /* Find available variables */ | 52 | /* Find available variables */ |
55 | extern int debuginfo__find_available_vars_at(struct debuginfo *dbg, | 53 | int debuginfo__find_available_vars_at(struct debuginfo *dbg, |
56 | struct perf_probe_event *pev, | 54 | struct perf_probe_event *pev, |
57 | struct variable_list **vls); | 55 | struct variable_list **vls); |
58 | 56 | ||
59 | /* Find a src file from a DWARF tag path */ | 57 | /* Find a src file from a DWARF tag path */ |
60 | int get_real_path(const char *raw_path, const char *comp_dir, | 58 | int get_real_path(const char *raw_path, const char *comp_dir, |
diff --git a/tools/perf/util/quote.h b/tools/perf/util/quote.h index 172889ea234f..3340c9c4a6ca 100644 --- a/tools/perf/util/quote.h +++ b/tools/perf/util/quote.h | |||
@@ -24,6 +24,6 @@ | |||
24 | * sq_quote() in a real application. | 24 | * sq_quote() in a real application. |
25 | */ | 25 | */ |
26 | 26 | ||
27 | extern void sq_quote_argv(struct strbuf *, const char **argv, size_t maxlen); | 27 | void sq_quote_argv(struct strbuf *, const char **argv, size_t maxlen); |
28 | 28 | ||
29 | #endif /* __PERF_QUOTE_H */ | 29 | #endif /* __PERF_QUOTE_H */ |
diff --git a/tools/perf/util/strbuf.h b/tools/perf/util/strbuf.h index 7a32c838884d..b73cbaaf93bc 100644 --- a/tools/perf/util/strbuf.h +++ b/tools/perf/util/strbuf.h | |||
@@ -51,16 +51,16 @@ struct strbuf { | |||
51 | #define STRBUF_INIT { 0, 0, strbuf_slopbuf } | 51 | #define STRBUF_INIT { 0, 0, strbuf_slopbuf } |
52 | 52 | ||
53 | /*----- strbuf life cycle -----*/ | 53 | /*----- strbuf life cycle -----*/ |
54 | extern void strbuf_init(struct strbuf *buf, ssize_t hint); | 54 | void strbuf_init(struct strbuf *buf, ssize_t hint); |
55 | extern void strbuf_release(struct strbuf *); | 55 | void strbuf_release(struct strbuf *buf); |
56 | extern char *strbuf_detach(struct strbuf *, size_t *); | 56 | char *strbuf_detach(struct strbuf *buf, size_t *); |
57 | 57 | ||
58 | /*----- strbuf size related -----*/ | 58 | /*----- strbuf size related -----*/ |
59 | static inline ssize_t strbuf_avail(const struct strbuf *sb) { | 59 | static inline ssize_t strbuf_avail(const struct strbuf *sb) { |
60 | return sb->alloc ? sb->alloc - sb->len - 1 : 0; | 60 | return sb->alloc ? sb->alloc - sb->len - 1 : 0; |
61 | } | 61 | } |
62 | 62 | ||
63 | extern void strbuf_grow(struct strbuf *, size_t); | 63 | void strbuf_grow(struct strbuf *buf, size_t); |
64 | 64 | ||
65 | static inline void strbuf_setlen(struct strbuf *sb, size_t len) { | 65 | static inline void strbuf_setlen(struct strbuf *sb, size_t len) { |
66 | if (!sb->alloc) | 66 | if (!sb->alloc) |
@@ -77,16 +77,16 @@ static inline void strbuf_addch(struct strbuf *sb, int c) { | |||
77 | sb->buf[sb->len] = '\0'; | 77 | sb->buf[sb->len] = '\0'; |
78 | } | 78 | } |
79 | 79 | ||
80 | extern void strbuf_add(struct strbuf *, const void *, size_t); | 80 | void strbuf_add(struct strbuf *buf, const void *, size_t); |
81 | static inline void strbuf_addstr(struct strbuf *sb, const char *s) { | 81 | static inline void strbuf_addstr(struct strbuf *sb, const char *s) { |
82 | strbuf_add(sb, s, strlen(s)); | 82 | strbuf_add(sb, s, strlen(s)); |
83 | } | 83 | } |
84 | 84 | ||
85 | __attribute__((format(printf,2,3))) | 85 | __attribute__((format(printf,2,3))) |
86 | extern void strbuf_addf(struct strbuf *sb, const char *fmt, ...); | 86 | void strbuf_addf(struct strbuf *sb, const char *fmt, ...); |
87 | extern void strbuf_addv(struct strbuf *sb, const char *fmt, va_list ap); | 87 | void strbuf_addv(struct strbuf *sb, const char *fmt, va_list ap); |
88 | 88 | ||
89 | /* XXX: if read fails, any partial read is undone */ | 89 | /* XXX: if read fails, any partial read is undone */ |
90 | extern ssize_t strbuf_read(struct strbuf *, int fd, ssize_t hint); | 90 | ssize_t strbuf_read(struct strbuf *, int fd, ssize_t hint); |
91 | 91 | ||
92 | #endif /* __PERF_STRBUF_H */ | 92 | #endif /* __PERF_STRBUF_H */ |
diff --git a/tools/perf/util/svghelper.h b/tools/perf/util/svghelper.h index 9292a5291445..946fdf2db97c 100644 --- a/tools/perf/util/svghelper.h +++ b/tools/perf/util/svghelper.h | |||
@@ -3,32 +3,31 @@ | |||
3 | 3 | ||
4 | #include <linux/types.h> | 4 | #include <linux/types.h> |
5 | 5 | ||
6 | extern void open_svg(const char *filename, int cpus, int rows, u64 start, u64 end); | 6 | void open_svg(const char *filename, int cpus, int rows, u64 start, u64 end); |
7 | extern void svg_ubox(int Yslot, u64 start, u64 end, double height, const char *type, int fd, int err, int merges); | 7 | void svg_ubox(int Yslot, u64 start, u64 end, double height, const char *type, int fd, int err, int merges); |
8 | extern void svg_lbox(int Yslot, u64 start, u64 end, double height, const char *type, int fd, int err, int merges); | 8 | void svg_lbox(int Yslot, u64 start, u64 end, double height, const char *type, int fd, int err, int merges); |
9 | extern void svg_fbox(int Yslot, u64 start, u64 end, double height, const char *type, int fd, int err, int merges); | 9 | void svg_fbox(int Yslot, u64 start, u64 end, double height, const char *type, int fd, int err, int merges); |
10 | extern void svg_box(int Yslot, u64 start, u64 end, const char *type); | 10 | void svg_box(int Yslot, u64 start, u64 end, const char *type); |
11 | extern void svg_blocked(int Yslot, int cpu, u64 start, u64 end, const char *backtrace); | 11 | void svg_blocked(int Yslot, int cpu, u64 start, u64 end, const char *backtrace); |
12 | extern void svg_running(int Yslot, int cpu, u64 start, u64 end, const char *backtrace); | 12 | void svg_running(int Yslot, int cpu, u64 start, u64 end, const char *backtrace); |
13 | extern void svg_waiting(int Yslot, int cpu, u64 start, u64 end, const char *backtrace); | 13 | void svg_waiting(int Yslot, int cpu, u64 start, u64 end, const char *backtrace); |
14 | extern void svg_cpu_box(int cpu, u64 max_frequency, u64 turbo_frequency); | 14 | void svg_cpu_box(int cpu, u64 max_frequency, u64 turbo_frequency); |
15 | 15 | ||
16 | 16 | ||
17 | extern void svg_process(int cpu, u64 start, u64 end, int pid, const char *name, const char *backtrace); | 17 | void svg_process(int cpu, u64 start, u64 end, int pid, const char *name, const char *backtrace); |
18 | extern void svg_cstate(int cpu, u64 start, u64 end, int type); | 18 | void svg_cstate(int cpu, u64 start, u64 end, int type); |
19 | extern void svg_pstate(int cpu, u64 start, u64 end, u64 freq); | 19 | void svg_pstate(int cpu, u64 start, u64 end, u64 freq); |
20 | 20 | ||
21 | 21 | ||
22 | extern void svg_time_grid(double min_thickness); | 22 | void svg_time_grid(double min_thickness); |
23 | extern void svg_io_legenda(void); | 23 | void svg_io_legenda(void); |
24 | extern void svg_legenda(void); | 24 | void svg_legenda(void); |
25 | extern void svg_wakeline(u64 start, int row1, int row2, const char *backtrace); | 25 | void svg_wakeline(u64 start, int row1, int row2, const char *backtrace); |
26 | extern void svg_partial_wakeline(u64 start, int row1, char *desc1, int row2, char *desc2, const char *backtrace); | 26 | void svg_partial_wakeline(u64 start, int row1, char *desc1, int row2, char *desc2, const char *backtrace); |
27 | extern void svg_interrupt(u64 start, int row, const char *backtrace); | 27 | void svg_interrupt(u64 start, int row, const char *backtrace); |
28 | extern void svg_text(int Yslot, u64 start, const char *text); | 28 | void svg_text(int Yslot, u64 start, const char *text); |
29 | extern void svg_close(void); | 29 | void svg_close(void); |
30 | extern int svg_build_topology_map(char *sib_core, int sib_core_nr, | 30 | int svg_build_topology_map(char *sib_core, int sib_core_nr, char *sib_thr, int sib_thr_nr); |
31 | char *sib_thr, int sib_thr_nr); | ||
32 | 31 | ||
33 | extern int svg_page_width; | 32 | extern int svg_page_width; |
34 | extern u64 svg_highlight; | 33 | extern u64 svg_highlight; |
diff --git a/tools/perf/util/symbol.h b/tools/perf/util/symbol.h index a937053a0ae0..c8b7544d9267 100644 --- a/tools/perf/util/symbol.h +++ b/tools/perf/util/symbol.h | |||
@@ -34,8 +34,8 @@ | |||
34 | #endif | 34 | #endif |
35 | 35 | ||
36 | #ifdef HAVE_LIBELF_SUPPORT | 36 | #ifdef HAVE_LIBELF_SUPPORT |
37 | extern Elf_Scn *elf_section_by_name(Elf *elf, GElf_Ehdr *ep, | 37 | Elf_Scn *elf_section_by_name(Elf *elf, GElf_Ehdr *ep, |
38 | GElf_Shdr *shp, const char *name, size_t *idx); | 38 | GElf_Shdr *shp, const char *name, size_t *idx); |
39 | #endif | 39 | #endif |
40 | 40 | ||
41 | #ifndef DMGL_PARAMS | 41 | #ifndef DMGL_PARAMS |
diff --git a/tools/perf/util/util.h b/tools/perf/util/util.h index 2080142d7244..46d4dd013a8b 100644 --- a/tools/perf/util/util.h +++ b/tools/perf/util/util.h | |||
@@ -133,17 +133,17 @@ extern char buildid_dir[]; | |||
133 | #define PERF_GTK_DSO "libperf-gtk.so" | 133 | #define PERF_GTK_DSO "libperf-gtk.so" |
134 | 134 | ||
135 | /* General helper functions */ | 135 | /* General helper functions */ |
136 | extern void usage(const char *err) NORETURN; | 136 | void usage(const char *err) NORETURN; |
137 | extern void die(const char *err, ...) NORETURN __attribute__((format (printf, 1, 2))); | 137 | void die(const char *err, ...) NORETURN __attribute__((format (printf, 1, 2))); |
138 | extern int error(const char *err, ...) __attribute__((format (printf, 1, 2))); | 138 | int error(const char *err, ...) __attribute__((format (printf, 1, 2))); |
139 | extern void warning(const char *err, ...) __attribute__((format (printf, 1, 2))); | 139 | void warning(const char *err, ...) __attribute__((format (printf, 1, 2))); |
140 | 140 | ||
141 | #include "../../../include/linux/stringify.h" | 141 | #include "../../../include/linux/stringify.h" |
142 | 142 | ||
143 | extern void set_warning_routine(void (*routine)(const char *err, va_list params)); | 143 | void set_warning_routine(void (*routine)(const char *err, va_list params)); |
144 | 144 | ||
145 | extern int prefixcmp(const char *str, const char *prefix); | 145 | int prefixcmp(const char *str, const char *prefix); |
146 | extern void set_buildid_dir(const char *dir); | 146 | void set_buildid_dir(const char *dir); |
147 | 147 | ||
148 | #ifdef __GLIBC_PREREQ | 148 | #ifdef __GLIBC_PREREQ |
149 | #if __GLIBC_PREREQ(2, 1) | 149 | #if __GLIBC_PREREQ(2, 1) |
@@ -164,8 +164,8 @@ static inline char *gitstrchrnul(const char *s, int c) | |||
164 | /* | 164 | /* |
165 | * Wrappers: | 165 | * Wrappers: |
166 | */ | 166 | */ |
167 | extern char *xstrdup(const char *str); | 167 | char *xstrdup(const char *str); |
168 | extern void *xrealloc(void *ptr, size_t size) __attribute__((weak)); | 168 | void *xrealloc(void *ptr, size_t size) __attribute__((weak)); |
169 | 169 | ||
170 | 170 | ||
171 | static inline void *zalloc(size_t size) | 171 | static inline void *zalloc(size_t size) |