diff options
author | Arnaldo Carvalho de Melo <acme@redhat.com> | 2017-04-19 15:15:13 -0400 |
---|---|---|
committer | Arnaldo Carvalho de Melo <acme@redhat.com> | 2017-04-24 11:33:26 -0400 |
commit | bb8c16db43e48f2012c3ae8c7d682f834c5986d9 (patch) | |
tree | 0a922455bf4fa3cad1153d08876e32ff9a033477 | |
parent | c5e4027e056c3027f682f0d69fe9fd75083b65f8 (diff) |
perf kvm: Make function only used by 'perf kvm' static
No need to have this polluting util.h, it was polluted enough already.
Link: http://lkml.kernel.org/n/tip-wfdidqlwbvi5y0s61kv6z2gn@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
-rw-r--r-- | tools/perf/builtin-kvm.c | 14 | ||||
-rw-r--r-- | tools/perf/util/util.c | 14 | ||||
-rw-r--r-- | tools/perf/util/util.h | 1 |
3 files changed, 14 insertions, 15 deletions
diff --git a/tools/perf/builtin-kvm.c b/tools/perf/builtin-kvm.c index d86ac0ac2c99..129af3e9c728 100644 --- a/tools/perf/builtin-kvm.c +++ b/tools/perf/builtin-kvm.c | |||
@@ -36,6 +36,20 @@ | |||
36 | #include <pthread.h> | 36 | #include <pthread.h> |
37 | #include <math.h> | 37 | #include <math.h> |
38 | 38 | ||
39 | static const char *get_filename_for_perf_kvm(void) | ||
40 | { | ||
41 | const char *filename; | ||
42 | |||
43 | if (perf_host && !perf_guest) | ||
44 | filename = strdup("perf.data.host"); | ||
45 | else if (!perf_host && perf_guest) | ||
46 | filename = strdup("perf.data.guest"); | ||
47 | else | ||
48 | filename = strdup("perf.data.kvm"); | ||
49 | |||
50 | return filename; | ||
51 | } | ||
52 | |||
39 | #ifdef HAVE_KVM_STAT_SUPPORT | 53 | #ifdef HAVE_KVM_STAT_SUPPORT |
40 | #include "util/kvm-stat.h" | 54 | #include "util/kvm-stat.h" |
41 | 55 | ||
diff --git a/tools/perf/util/util.c b/tools/perf/util/util.c index e86dba2f791a..eb49330c77d4 100644 --- a/tools/perf/util/util.c +++ b/tools/perf/util/util.c | |||
@@ -496,20 +496,6 @@ int parse_callchain_record(const char *arg, struct callchain_param *param) | |||
496 | return ret; | 496 | return ret; |
497 | } | 497 | } |
498 | 498 | ||
499 | const char *get_filename_for_perf_kvm(void) | ||
500 | { | ||
501 | const char *filename; | ||
502 | |||
503 | if (perf_host && !perf_guest) | ||
504 | filename = strdup("perf.data.host"); | ||
505 | else if (!perf_host && perf_guest) | ||
506 | filename = strdup("perf.data.guest"); | ||
507 | else | ||
508 | filename = strdup("perf.data.kvm"); | ||
509 | |||
510 | return filename; | ||
511 | } | ||
512 | |||
513 | int perf_event_paranoid(void) | 499 | int perf_event_paranoid(void) |
514 | { | 500 | { |
515 | int value; | 501 | int value; |
diff --git a/tools/perf/util/util.h b/tools/perf/util/util.h index dc8eb942f92b..c3f6d0de69c5 100644 --- a/tools/perf/util/util.h +++ b/tools/perf/util/util.h | |||
@@ -100,7 +100,6 @@ int perf_event_paranoid(void); | |||
100 | void mem_bswap_64(void *src, int byte_size); | 100 | void mem_bswap_64(void *src, int byte_size); |
101 | void mem_bswap_32(void *src, int byte_size); | 101 | void mem_bswap_32(void *src, int byte_size); |
102 | 102 | ||
103 | const char *get_filename_for_perf_kvm(void); | ||
104 | bool find_process(const char *name); | 103 | bool find_process(const char *name); |
105 | 104 | ||
106 | #ifdef HAVE_ZLIB_SUPPORT | 105 | #ifdef HAVE_ZLIB_SUPPORT |