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]
Date:   Tue, 10 Oct 2017 10:20:19 -0700
From:   kan.liang@...el.com
To:     acme@...nel.org, peterz@...radead.org, mingo@...hat.com,
        linux-kernel@...r.kernel.org
Cc:     jolsa@...nel.org, wangnan0@...wei.com, hekuang@...wei.com,
        namhyung@...nel.org, alexander.shishkin@...ux.intel.com,
        adrian.hunter@...el.com, ak@...ux.intel.com,
        Kan Liang <kan.liang@...el.com>
Subject: [PATCH 06/10] perf trace: apply new mmap_read interfaces

From: Kan Liang <kan.liang@...el.com>

no functional change

Signed-off-by: Kan Liang <kan.liang@...el.com>
---
 tools/perf/builtin-trace.c | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/tools/perf/builtin-trace.c b/tools/perf/builtin-trace.c
index afef6fe..cd5aaf2 100644
--- a/tools/perf/builtin-trace.c
+++ b/tools/perf/builtin-trace.c
@@ -2424,8 +2424,14 @@ static int trace__run(struct trace *trace, int argc, const char **argv)
 
 	for (i = 0; i < evlist->nr_mmaps; i++) {
 		union perf_event *event;
+		struct perf_mmap_read read;
 
-		while ((event = perf_evlist__mmap_read(evlist, i)) != NULL) {
+		if (perf_evlist__mmap_read_init(evlist, i, &read, false)) {
+			fprintf(trace->output, "Can't get mmap information\n");
+			continue;
+		}
+
+		while ((event = perf_mmap__read_event(&read)) != NULL) {
 			struct perf_sample sample;
 
 			++trace->nr_events;
@@ -2448,6 +2454,7 @@ static int trace__run(struct trace *trace, int argc, const char **argv)
 				draining = true;
 			}
 		}
+		perf_mmap__read_done(&read);
 	}
 
 	if (trace->nr_events == before) {
-- 
2.5.5

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ