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-p6gioxkzpkpz71dtt4wcs36o@git.kernel.org>
Date:   Thu, 7 Jun 2018 01:16:29 -0700
From:   tip-bot for Arnaldo Carvalho de Melo <tipbot@...or.com>
To:     linux-tip-commits@...r.kernel.org
Cc:     mingo@...nel.org, wangnan0@...wei.com, jolsa@...nel.org,
        tglx@...utronix.de, namhyung@...nel.org, adrian.hunter@...el.com,
        dsahern@...il.com, linux-kernel@...r.kernel.org, acme@...hat.com,
        hpa@...or.com
Subject: [tip:perf/urgent] perf hists: Introduce hist_entry__has_callchain()
 method

Commit-ID:  0b5d6ece5e6a8b45c4ebbaaf831675b5b605850f
Gitweb:     https://git.kernel.org/tip/0b5d6ece5e6a8b45c4ebbaaf831675b5b605850f
Author:     Arnaldo Carvalho de Melo <acme@...hat.com>
AuthorDate: Tue, 29 May 2018 13:28:24 -0300
Committer:  Arnaldo Carvalho de Melo <acme@...hat.com>
CommitDate: Wed, 6 Jun 2018 12:51:46 -0300

perf hists: Introduce hist_entry__has_callchain() method

We'll use this helper more frequently when reworking
symbol_conf.use_callchain logic, where knowing if a hist_entry has
callchains is the important bit, so make going from hist_entry to hists
to evsel easier, compact.

Cc: Adrian Hunter <adrian.hunter@...el.com>
Cc: David Ahern <dsahern@...il.com>
Cc: Jiri Olsa <jolsa@...nel.org>
Cc: Namhyung Kim <namhyung@...nel.org>
Cc: Wang Nan <wangnan0@...wei.com>
Link: https://lkml.kernel.org/n/tip-p6gioxkzpkpz71dtt4wcs36o@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@...hat.com>
---
 tools/perf/util/sort.h | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/tools/perf/util/sort.h b/tools/perf/util/sort.h
index f007a26d6f6d..1a046157bfef 100644
--- a/tools/perf/util/sort.h
+++ b/tools/perf/util/sort.h
@@ -151,6 +151,12 @@ struct hist_entry {
 	struct callchain_root	callchain[0]; /* must be last member */
 };
 
+static __pure inline bool hist_entry__has_callchains(struct hist_entry *he)
+{
+	const struct perf_evsel *evsel = hists_to_evsel(he->hists);
+	return evsel__has_callchain(evsel);
+}
+
 static inline bool hist_entry__has_pairs(struct hist_entry *he)
 {
 	return !list_empty(&he->pairs.node);

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ