summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--tools/perf/builtin-kvm.c14
-rw-r--r--tools/perf/util/util.c14
-rw-r--r--tools/perf/util/util.h1
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 @@
#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"
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)
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;
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);
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