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: <tip-b26dc73018d2e3a68cad0cf0bad902a8637f9bdf@git.kernel.org>
Date:	Thu, 14 Apr 2016 06:35:46 -0700
From:	tip-bot for Wang Nan <tipbot@...or.com>
To:	linux-tip-commits@...r.kernel.org
Cc:	tglx@...utronix.de, linux-kernel@...r.kernel.org, acme@...hat.com,
	mhiramat@...nel.org, namhyung@...nel.org, jolsa@...nel.org,
	hpa@...or.com, lizefan@...wei.com, wangnan0@...wei.com,
	mingo@...nel.org, hekuang@...wei.com
Subject: [tip:perf/core] perf session: Make ordered_events reusable

Commit-ID:  b26dc73018d2e3a68cad0cf0bad902a8637f9bdf
Gitweb:     http://git.kernel.org/tip/b26dc73018d2e3a68cad0cf0bad902a8637f9bdf
Author:     Wang Nan <wangnan0@...wei.com>
AuthorDate: Wed, 13 Apr 2016 08:21:04 +0000
Committer:  Arnaldo Carvalho de Melo <acme@...hat.com>
CommitDate: Thu, 14 Apr 2016 08:57:54 -0300

perf session: Make ordered_events reusable

ordered_events__free() leaves linked lists and timestamps not cleared,
so unable to be reused after ordered_events__free(). Which is inconvenient
after 'perf record' supports generating multiple perf.data output and
process build-ids for each of them.

Use ordered_events__reinit() for this.

Signed-off-by: Wang Nan <wangnan0@...wei.com>
Cc: Jiri Olsa <jolsa@...nel.org>
Cc: Masami Hiramatsu <mhiramat@...nel.org>
Cc: Namhyung Kim <namhyung@...nel.org>
Cc: Zefan Li <lizefan@...wei.com>
Cc: pi3orama@....com
Link: http://lkml.kernel.org/r/1460535673-159866-2-git-send-email-wangnan0@huawei.com
Signed-off-by: He Kuang <hekuang@...wei.com>
[ Split from larger patch ]
Signed-off-by: Arnaldo Carvalho de Melo <acme@...hat.com>
---
 tools/perf/util/session.c | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/tools/perf/util/session.c b/tools/perf/util/session.c
index 91d4528..ca1827c 100644
--- a/tools/perf/util/session.c
+++ b/tools/perf/util/session.c
@@ -1836,7 +1836,11 @@ out:
 out_err:
 	ui_progress__finish();
 	perf_session__warn_about_errors(session);
-	ordered_events__free(&session->ordered_events);
+	/*
+	 * We may switching perf.data output, make ordered_events
+	 * reusable.
+	 */
+	ordered_events__reinit(&session->ordered_events);
 	auxtrace__free_events(session);
 	session->one_mmap = false;
 	return err;

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ