]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
perf kvm: Make function only used by 'perf kvm' static
authorArnaldo Carvalho de Melo <acme@redhat.com>
Wed, 19 Apr 2017 19:15:13 +0000 (16:15 -0300)
committerArnaldo Carvalho de Melo <acme@redhat.com>
Mon, 24 Apr 2017 15:33:26 +0000 (12:33 -0300)
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>
tools/perf/builtin-kvm.c
tools/perf/util/util.c
tools/perf/util/util.h

index d86ac0ac2c99f05e116a3bdbfb3d9a0625e79176..129af3e9c728b84fdb77383a36e041fdfbbce23e 100644 (file)
 #include <pthread.h>
 #include <math.h>
 
+static const char *get_filename_for_perf_kvm(void)
+{
+       const char *filename;
+
+       if (perf_host && !perf_guest)
+               filename = strdup("perf.data.host");
+       else if (!perf_host && perf_guest)
+               filename = strdup("perf.data.guest");
+       else
+               filename = strdup("perf.data.kvm");
+
+       return filename;
+}
+
 #ifdef HAVE_KVM_STAT_SUPPORT
 #include "util/kvm-stat.h"
 
index e86dba2f791a3574c97fc322f7b255cfd04e98a6..eb49330c77d477de75964873b1d6a8003ee1d532 100644 (file)
@@ -496,20 +496,6 @@ int parse_callchain_record(const char *arg, struct callchain_param *param)
        return ret;
 }
 
-const char *get_filename_for_perf_kvm(void)
-{
-       const char *filename;
-
-       if (perf_host && !perf_guest)
-               filename = strdup("perf.data.host");
-       else if (!perf_host && perf_guest)
-               filename = strdup("perf.data.guest");
-       else
-               filename = strdup("perf.data.kvm");
-
-       return filename;
-}
-
 int perf_event_paranoid(void)
 {
        int value;
index dc8eb942f92ba5ff8d8eda5d62bf9af94c140c92..c3f6d0de69c53bf6032ceec06aa4aafa6e181196 100644 (file)
@@ -100,7 +100,6 @@ int perf_event_paranoid(void);
 void mem_bswap_64(void *src, int byte_size);
 void mem_bswap_32(void *src, int byte_size);
 
-const char *get_filename_for_perf_kvm(void);
 bool find_process(const char *name);
 
 #ifdef HAVE_ZLIB_SUPPORT