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/run-command.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/run-command.h')
| -rw-r--r-- | tools/perf/util/run-command.h | 30 |
1 files changed, 0 insertions, 30 deletions
diff --git a/tools/perf/util/run-command.h b/tools/perf/util/run-command.h index d79028727ce2..1ef264d5069c 100644 --- a/tools/perf/util/run-command.h +++ b/tools/perf/util/run-command.h | |||
| @@ -50,39 +50,9 @@ int start_command(struct child_process *); | |||
| 50 | int finish_command(struct child_process *); | 50 | int finish_command(struct child_process *); |
| 51 | int run_command(struct child_process *); | 51 | int run_command(struct child_process *); |
| 52 | 52 | ||
| 53 | extern int run_hook(const char *index_file, const char *name, ...); | ||
| 54 | |||
| 55 | #define RUN_COMMAND_NO_STDIN 1 | 53 | #define RUN_COMMAND_NO_STDIN 1 |
| 56 | #define RUN_PERF_CMD 2 /*If this is to be perf sub-command */ | 54 | #define RUN_PERF_CMD 2 /*If this is to be perf sub-command */ |
| 57 | #define RUN_COMMAND_STDOUT_TO_STDERR 4 | 55 | #define RUN_COMMAND_STDOUT_TO_STDERR 4 |
| 58 | int run_command_v_opt(const char **argv, int opt); | 56 | int run_command_v_opt(const char **argv, int opt); |
| 59 | 57 | ||
| 60 | /* | ||
| 61 | * env (the environment) is to be formatted like environ: "VAR=VALUE". | ||
| 62 | * To unset an environment variable use just "VAR". | ||
| 63 | */ | ||
| 64 | int run_command_v_opt_cd_env(const char **argv, int opt, const char *dir, const char *const *env); | ||
| 65 | |||
| 66 | /* | ||
| 67 | * The purpose of the following functions is to feed a pipe by running | ||
| 68 | * a function asynchronously and providing output that the caller reads. | ||
| 69 | * | ||
| 70 | * It is expected that no synchronization and mutual exclusion between | ||
| 71 | * the caller and the feed function is necessary so that the function | ||
| 72 | * can run in a thread without interfering with the caller. | ||
| 73 | */ | ||
| 74 | struct async { | ||
| 75 | /* | ||
| 76 | * proc writes to fd and closes it; | ||
| 77 | * returns 0 on success, non-zero on failure | ||
| 78 | */ | ||
| 79 | int (*proc)(int fd, void *data); | ||
| 80 | void *data; | ||
| 81 | int out; /* caller reads from here and closes it */ | ||
| 82 | pid_t pid; | ||
| 83 | }; | ||
| 84 | |||
| 85 | int start_async(struct async *async); | ||
| 86 | int finish_async(struct async *async); | ||
| 87 | |||
| 88 | #endif /* __PERF_RUN_COMMAND_H */ | 58 | #endif /* __PERF_RUN_COMMAND_H */ |
