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>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1441301337-18954-2-git-send-email-namhyung@kernel.org>
Date:	Fri,  4 Sep 2015 02:28:56 +0900
From:	Namhyung Kim <namhyung@...nel.org>
To:	Arnaldo Carvalho de Melo <acme@...nel.org>
Cc:	Ingo Molnar <mingo@...nel.org>,
	Peter Zijlstra <a.p.zijlstra@...llo.nl>,
	Jiri Olsa <jolsa@...hat.com>,
	LKML <linux-kernel@...r.kernel.org>,
	Wang Nan <wangnan0@...wei.com>,
	Masami Hiramatsu <masami.hiramatsu.pt@...achi.com>
Subject: [RFC/PATCH 2/3] perf probe: Rename __event_package to probe_event_package

The struct __event_package can be accessed now from other than
probe-event.c code.  So rename it to more specific name.

Cc: Masami Hiramatsu <masami.hiramatsu.pt@...achi.com>
Signed-off-by: Namhyung Kim <namhyung@...nel.org>
---
 tools/perf/util/probe-event.c | 18 ++++++------------
 tools/perf/util/probe-event.h | 10 ++++++++++
 2 files changed, 16 insertions(+), 12 deletions(-)

diff --git a/tools/perf/util/probe-event.c b/tools/perf/util/probe-event.c
index 8eaa03428d72..eef39338bb2a 100644
--- a/tools/perf/util/probe-event.c
+++ b/tools/perf/util/probe-event.c
@@ -2759,20 +2759,14 @@ static int convert_to_probe_trace_events(struct perf_probe_event *pev,
 	return find_probe_trace_events_from_map(pev, tevs);
 }
 
-struct __event_package {
-	struct perf_probe_event		*pev;
-	struct probe_trace_event	*tevs;
-	int				ntevs;
-};
-
-static int __add_perf_probe_events(struct perf_probe_event *pevs, int npevs,
-				   struct __event_package **ppkgs)
+int __add_perf_probe_events(struct perf_probe_event *pevs, int npevs,
+			    struct probe_event_package **ppkgs)
 {
 	int i, ret;
-	struct __event_package *pkgs;
+	struct probe_event_package *pkgs;
 
 	ret = 0;
-	pkgs = zalloc(sizeof(struct __event_package) * npevs);
+	pkgs = zalloc(sizeof(struct probe_event_package) * npevs);
 
 	if (pkgs == NULL)
 		return -ENOMEM;
@@ -2813,7 +2807,7 @@ static int __add_perf_probe_events(struct perf_probe_event *pevs, int npevs,
 	return 0;
 }
 
-static void cleanup_perf_probe_events(struct __event_package *pkgs, int npevs)
+void cleanup_perf_probe_events(struct probe_event_package *pkgs, int npevs)
 {
 	int i, j;
 
@@ -2833,7 +2827,7 @@ static void cleanup_perf_probe_events(struct __event_package *pkgs, int npevs)
 int add_perf_probe_events(struct perf_probe_event *pevs, int npevs)
 {
 	int ret;
-	struct __event_package *pkgs = NULL;
+	struct probe_event_package *pkgs = NULL;
 
 	ret = __add_perf_probe_events(pevs, npevs, &pkgs);
 	cleanup_perf_probe_events(pkgs, npevs);
diff --git a/tools/perf/util/probe-event.h b/tools/perf/util/probe-event.h
index 6e7ec68a4aa8..73f922fa7cac 100644
--- a/tools/perf/util/probe-event.h
+++ b/tools/perf/util/probe-event.h
@@ -89,6 +89,12 @@ struct perf_probe_event {
 	struct perf_probe_arg	*args;	/* Arguments */
 };
 
+struct probe_event_package {
+	struct perf_probe_event		*pev;
+	struct probe_trace_event	*tevs;
+	int				ntevs;
+};
+
 /* Line range */
 struct line_range {
 	char			*file;		/* File name */
@@ -138,6 +144,10 @@ extern void line_range__clear(struct line_range *lr);
 extern int line_range__init(struct line_range *lr);
 
 extern int add_perf_probe_events(struct perf_probe_event *pevs, int npevs);
+extern int __add_perf_probe_events(struct perf_probe_event *pevs, int npevs,
+				   struct probe_event_package **ppkgs);
+extern void cleanup_perf_probe_events(struct probe_event_package *pkgs,
+				      int npevs);
 extern int del_perf_probe_events(struct strfilter *filter);
 extern int show_perf_probe_events(struct strfilter *filter);
 extern int show_line_range(struct line_range *lr, const char *module,
-- 
2.5.0

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ