diff options
author | Arnaldo Carvalho de Melo <acme@redhat.com> | 2010-05-18 17:29:23 -0400 |
---|---|---|
committer | Arnaldo Carvalho de Melo <acme@redhat.com> | 2010-05-18 22:03:35 -0400 |
commit | a41794cdd7ee94a5199e14f642c26d649d383fa5 (patch) | |
tree | 17fdd252cf12f184f6a75702f140f799b4f20a7b /tools/perf/util/cache.h | |
parent | 5af52b51f76d8f8dce0e5b2a33c20b2231c8046d (diff) |
perf tools: Remove some unused functions
Without the bloated cplus_demangle from binutils, i.e building with:
$ make NO_DEMANGLE=1 O=~acme/git/build/perf -j3 -C tools/perf/ install
Before:
text data bss dec hex filename
471851 29280 4025056 4526187 45106b /home/acme/bin/perf
After:
[acme@doppio linux-2.6-tip]$ size ~/bin/perf
text data bss dec hex filename
446886 29232 4008576 4484694 446e56 /home/acme/bin/perf
So its a 5.3% size reduction in code, but the interesting part is in the git
diff --stat output:
19 files changed, 20 insertions(+), 1909 deletions(-)
If we ever need some of the things we got from git but weren't using, we just
have to go to the git repo and get fresh, uptodate source code bits.
Cc: Frédéric Weisbecker <fweisbec@gmail.com>
Cc: Mike Galbraith <efault@gmx.de>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Tom Zanussi <tzanussi@gmail.com>
LKML-Reference: <new-submission>
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/perf/util/cache.h')
-rw-r--r-- | tools/perf/util/cache.h | 55 |
1 files changed, 1 insertions, 54 deletions
diff --git a/tools/perf/util/cache.h b/tools/perf/util/cache.h index 4b9aab7f0405..5eca52595b62 100644 --- a/tools/perf/util/cache.h +++ b/tools/perf/util/cache.h | |||
@@ -13,56 +13,16 @@ | |||
13 | 13 | ||
14 | #define PERF_DIR_ENVIRONMENT "PERF_DIR" | 14 | #define PERF_DIR_ENVIRONMENT "PERF_DIR" |
15 | #define PERF_WORK_TREE_ENVIRONMENT "PERF_WORK_TREE" | 15 | #define PERF_WORK_TREE_ENVIRONMENT "PERF_WORK_TREE" |
16 | #define DEFAULT_PERF_DIR_ENVIRONMENT ".perf" | ||
17 | #define DB_ENVIRONMENT "PERF_OBJECT_DIRECTORY" | ||
18 | #define INDEX_ENVIRONMENT "PERF_INDEX_FILE" | ||
19 | #define GRAFT_ENVIRONMENT "PERF_GRAFT_FILE" | ||
20 | #define TEMPLATE_DIR_ENVIRONMENT "PERF_TEMPLATE_DIR" | ||
21 | #define CONFIG_ENVIRONMENT "PERF_CONFIG" | ||
22 | #define EXEC_PATH_ENVIRONMENT "PERF_EXEC_PATH" | 16 | #define EXEC_PATH_ENVIRONMENT "PERF_EXEC_PATH" |
23 | #define CEILING_DIRECTORIES_ENVIRONMENT "PERF_CEILING_DIRECTORIES" | 17 | #define DEFAULT_PERF_DIR_ENVIRONMENT ".perf" |
24 | #define PERFATTRIBUTES_FILE ".perfattributes" | ||
25 | #define INFOATTRIBUTES_FILE "info/attributes" | ||
26 | #define ATTRIBUTE_MACRO_PREFIX "[attr]" | ||
27 | #define PERF_DEBUGFS_ENVIRONMENT "PERF_DEBUGFS_DIR" | 18 | #define PERF_DEBUGFS_ENVIRONMENT "PERF_DEBUGFS_DIR" |
28 | 19 | ||
29 | typedef int (*config_fn_t)(const char *, const char *, void *); | 20 | typedef int (*config_fn_t)(const char *, const char *, void *); |
30 | extern int perf_default_config(const char *, const char *, void *); | 21 | extern int perf_default_config(const char *, const char *, void *); |
31 | extern int perf_config_from_file(config_fn_t fn, const char *, void *); | ||
32 | extern int perf_config(config_fn_t fn, void *); | 22 | extern int perf_config(config_fn_t fn, void *); |
33 | extern int perf_parse_ulong(const char *, unsigned long *); | ||
34 | extern int perf_config_int(const char *, const char *); | 23 | extern int perf_config_int(const char *, const char *); |
35 | extern unsigned long perf_config_ulong(const char *, const char *); | ||
36 | extern int perf_config_bool_or_int(const char *, const char *, int *); | ||
37 | extern int perf_config_bool(const char *, const char *); | 24 | extern int perf_config_bool(const char *, const char *); |
38 | extern int perf_config_string(const char **, const char *, const char *); | ||
39 | extern int perf_config_set(const char *, const char *); | ||
40 | extern int perf_config_set_multivar(const char *, const char *, const char *, int); | ||
41 | extern int perf_config_rename_section(const char *, const char *); | ||
42 | extern const char *perf_etc_perfconfig(void); | ||
43 | extern int check_repository_format_version(const char *var, const char *value, void *cb); | ||
44 | extern int perf_config_system(void); | ||
45 | extern int perf_config_global(void); | ||
46 | extern int config_error_nonbool(const char *); | 25 | extern int config_error_nonbool(const char *); |
47 | extern const char *config_exclusive_filename; | ||
48 | |||
49 | #define MAX_PERFNAME (1000) | ||
50 | extern char perf_default_email[MAX_PERFNAME]; | ||
51 | extern char perf_default_name[MAX_PERFNAME]; | ||
52 | extern int user_ident_explicitly_given; | ||
53 | |||
54 | extern const char *perf_log_output_encoding; | ||
55 | extern const char *perf_mailmap_file; | ||
56 | |||
57 | /* IO helper functions */ | ||
58 | extern void maybe_flush_or_die(FILE *, const char *); | ||
59 | extern int copy_fd(int ifd, int ofd); | ||
60 | extern int copy_file(const char *dst, const char *src, int mode); | ||
61 | extern ssize_t write_in_full(int fd, const void *buf, size_t count); | ||
62 | extern void write_or_die(int fd, const void *buf, size_t count); | ||
63 | extern int write_or_whine(int fd, const void *buf, size_t count, const char *msg); | ||
64 | extern int write_or_whine_pipe(int fd, const void *buf, size_t count, const char *msg); | ||
65 | extern void fsync_or_die(int fd, const char *); | ||
66 | 26 | ||
67 | /* pager.c */ | 27 | /* pager.c */ |
68 | extern void setup_pager(void); | 28 | extern void setup_pager(void); |
@@ -83,9 +43,6 @@ void setup_browser(void); | |||
83 | void exit_browser(bool wait_for_ok); | 43 | void exit_browser(bool wait_for_ok); |
84 | #endif | 44 | #endif |
85 | 45 | ||
86 | extern const char *editor_program; | ||
87 | extern const char *excludes_file; | ||
88 | |||
89 | char *alias_lookup(const char *alias); | 46 | char *alias_lookup(const char *alias); |
90 | int split_cmdline(char *cmdline, const char ***argv); | 47 | int split_cmdline(char *cmdline, const char ***argv); |
91 | 48 | ||
@@ -115,22 +72,12 @@ static inline int is_absolute_path(const char *path) | |||
115 | return path[0] == '/'; | 72 | return path[0] == '/'; |
116 | } | 73 | } |
117 | 74 | ||
118 | const char *make_absolute_path(const char *path); | ||
119 | const char *make_nonrelative_path(const char *path); | 75 | const char *make_nonrelative_path(const char *path); |
120 | const char *make_relative_path(const char *abs, const char *base); | ||
121 | int normalize_path_copy(char *dst, const char *src); | ||
122 | int longest_ancestor_length(const char *path, const char *prefix_list); | ||
123 | char *strip_path_suffix(const char *path, const char *suffix); | 76 | char *strip_path_suffix(const char *path, const char *suffix); |
124 | 77 | ||
125 | extern char *mkpath(const char *fmt, ...) __attribute__((format (printf, 1, 2))); | 78 | extern char *mkpath(const char *fmt, ...) __attribute__((format (printf, 1, 2))); |
126 | extern char *perf_path(const char *fmt, ...) __attribute__((format (printf, 1, 2))); | 79 | extern char *perf_path(const char *fmt, ...) __attribute__((format (printf, 1, 2))); |
127 | /* perf_mkstemp() - create tmp file honoring TMPDIR variable */ | ||
128 | extern int perf_mkstemp(char *path, size_t len, const char *template); | ||
129 | 80 | ||
130 | extern char *mksnpath(char *buf, size_t n, const char *fmt, ...) | ||
131 | __attribute__((format (printf, 3, 4))); | ||
132 | extern char *perf_snpath(char *buf, size_t n, const char *fmt, ...) | ||
133 | __attribute__((format (printf, 3, 4))); | ||
134 | extern char *perf_pathdup(const char *fmt, ...) | 81 | extern char *perf_pathdup(const char *fmt, ...) |
135 | __attribute__((format (printf, 1, 2))); | 82 | __attribute__((format (printf, 1, 2))); |
136 | 83 | ||