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-1f2d72cf3258eacd667cd1920e64c9b64b9984d5@git.kernel.org>
Date:	Wed, 24 Feb 2016 23:43:06 -0800
From:	tip-bot for Namhyung Kim <tipbot@...or.com>
To:	linux-tip-commits@...r.kernel.org
Cc:	andi@...stfloor.org, hpa@...or.com, eranian@...gle.com,
	dsahern@...il.com, wangnan0@...wei.com, namhyung@...nel.org,
	mingo@...nel.org, jolsa@...nel.org, linux-kernel@...r.kernel.org,
	acme@...hat.com, peterz@...radead.org, tglx@...utronix.de
Subject: [tip:perf/core] perf hists: Count number of sort keys

Commit-ID:  1f2d72cf3258eacd667cd1920e64c9b64b9984d5
Gitweb:     http://git.kernel.org/tip/1f2d72cf3258eacd667cd1920e64c9b64b9984d5
Author:     Namhyung Kim <namhyung@...nel.org>
AuthorDate: Thu, 25 Feb 2016 00:13:40 +0900
Committer:  Arnaldo Carvalho de Melo <acme@...hat.com>
CommitDate: Wed, 24 Feb 2016 20:21:11 -0300

perf hists: Count number of sort keys

It'll be used for hierarchy output mode to indent entries properly.

Signed-off-by: Namhyung Kim <namhyung@...nel.org>
Cc: Andi Kleen <andi@...stfloor.org>
Cc: David Ahern <dsahern@...il.com>
Cc: Jiri Olsa <jolsa@...nel.org>
Cc: Peter Zijlstra <peterz@...radead.org>
Cc: Stephane Eranian <eranian@...gle.com>
Cc: Wang Nan <wangnan0@...wei.com>
Link: http://lkml.kernel.org/r/1456326830-30456-9-git-send-email-namhyung@kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@...hat.com>
---
 tools/perf/ui/hist.c   | 3 +++
 tools/perf/util/hist.h | 1 +
 2 files changed, 4 insertions(+)

diff --git a/tools/perf/ui/hist.c b/tools/perf/ui/hist.c
index 12223d7..edbf854 100644
--- a/tools/perf/ui/hist.c
+++ b/tools/perf/ui/hist.c
@@ -514,6 +514,9 @@ void perf_hpp_list__column_register(struct perf_hpp_list *list,
 void perf_hpp_list__register_sort_field(struct perf_hpp_list *list,
 					struct perf_hpp_fmt *format)
 {
+	if (perf_hpp__is_sort_entry(format) || perf_hpp__is_dynamic_entry(format))
+		list->nr_sort_keys++;
+
 	list_add_tail(&format->sort_list, &list->sorts);
 }
 
diff --git a/tools/perf/util/hist.h b/tools/perf/util/hist.h
index 480d2eb..d08e4f3 100644
--- a/tools/perf/util/hist.h
+++ b/tools/perf/util/hist.h
@@ -237,6 +237,7 @@ struct perf_hpp_fmt {
 struct perf_hpp_list {
 	struct list_head fields;
 	struct list_head sorts;
+	int nr_sort_keys;
 };
 
 extern struct perf_hpp_list perf_hpp_list;

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ