lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Message-ID: <tip-wfdidqlwbvi5y0s61kv6z2gn@git.kernel.org>
Date:   Mon, 24 Apr 2017 14:08:58 -0700
From:   tip-bot for Arnaldo Carvalho de Melo <tipbot@...or.com>
To:     linux-tip-commits@...r.kernel.org
Cc:     acme@...hat.com, hpa@...or.com, linux-kernel@...r.kernel.org,
        tglx@...utronix.de, mingo@...nel.org
Subject: [tip:perf/core] perf kvm: Make function only used by 'perf kvm'
 static

Commit-ID:  bb8c16db43e48f2012c3ae8c7d682f834c5986d9
Gitweb:     http://git.kernel.org/tip/bb8c16db43e48f2012c3ae8c7d682f834c5986d9
Author:     Arnaldo Carvalho de Melo <acme@...hat.com>
AuthorDate: Wed, 19 Apr 2017 16:15:13 -0300
Committer:  Arnaldo Carvalho de Melo <acme@...hat.com>
CommitDate: Mon, 24 Apr 2017 12:33:26 -0300

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@...hat.com>
---
 tools/perf/builtin-kvm.c | 14 ++++++++++++++
 tools/perf/util/util.c   | 14 --------------
 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 d86ac0a..129af3e 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 e86dba2..eb49330 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 dc8eb94..c3f6d0d 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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ