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:   Sat, 18 Nov 2017 00:23:30 -0800
From:   tip-bot for Jiri Olsa <tipbot@...or.com>
To:     linux-tip-commits@...r.kernel.org
Cc:     dsahern@...il.com, acme@...hat.com, mingo@...nel.org,
        namhyung@...nel.org, peterz@...radead.org, hpa@...or.com,
        jolsa@...nel.org, linux-kernel@...r.kernel.org, tglx@...utronix.de,
        andi@...stfloor.org
Subject: [tip:perf/core] perf annotate browser: Use struct annotation_line
 in browser top

Commit-ID:  ec03a77d7d28a2c2de246f67322c5d916852dd9d
Gitweb:     https://git.kernel.org/tip/ec03a77d7d28a2c2de246f67322c5d916852dd9d
Author:     Jiri Olsa <jolsa@...nel.org>
AuthorDate: Wed, 11 Oct 2017 17:01:56 +0200
Committer:  Arnaldo Carvalho de Melo <acme@...hat.com>
CommitDate: Thu, 16 Nov 2017 14:49:49 -0300

perf annotate browser: Use struct annotation_line in browser top

Use struct annotation_line in browser::b::top.

Signed-off-by: Jiri Olsa <jolsa@...nel.org>
Cc: Andi Kleen <andi@...stfloor.org>
Cc: David Ahern <dsahern@...il.com>
Cc: Namhyung Kim <namhyung@...nel.org>
Cc: Peter Zijlstra <peterz@...radead.org>
Link: http://lkml.kernel.org/r/20171011150158.11895-34-jolsa@kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@...hat.com>
---
 tools/perf/ui/browsers/annotate.c | 26 +++++++++++++-------------
 1 file changed, 13 insertions(+), 13 deletions(-)

diff --git a/tools/perf/ui/browsers/annotate.c b/tools/perf/ui/browsers/annotate.c
index 8f75e56..f0f27cf 100644
--- a/tools/perf/ui/browsers/annotate.c
+++ b/tools/perf/ui/browsers/annotate.c
@@ -390,7 +390,7 @@ static void disasm_rb_tree__insert(struct rb_root *root, struct annotation_line
 }
 
 static void annotate_browser__set_top(struct annotate_browser *browser,
-				      struct disasm_line *pos, u32 idx)
+				      struct annotation_line *pos, u32 idx)
 {
 	unsigned back;
 
@@ -399,16 +399,16 @@ static void annotate_browser__set_top(struct annotate_browser *browser,
 	browser->b.top_idx = browser->b.index = idx;
 
 	while (browser->b.top_idx != 0 && back != 0) {
-		pos = list_entry(pos->al.node.prev, struct disasm_line, al.node);
+		pos = list_entry(pos->node.prev, struct annotation_line, node);
 
-		if (disasm_line__filter(&browser->b, &pos->al.node))
+		if (disasm_line__filter(&browser->b, &pos->node))
 			continue;
 
 		--browser->b.top_idx;
 		--back;
 	}
 
-	browser->b.top = &pos->al;
+	browser->b.top = pos;
 	browser->b.navkeypressed = true;
 }
 
@@ -416,11 +416,11 @@ static void annotate_browser__set_rb_top(struct annotate_browser *browser,
 					 struct rb_node *nd)
 {
 	struct browser_line *bpos;
-	struct disasm_line *pos;
+	struct annotation_line *pos;
 	u32 idx;
 
-	pos = rb_entry(nd, struct disasm_line, al.rb_node);
-	bpos = browser_line(&pos->al);
+	pos = rb_entry(nd, struct annotation_line, rb_node);
+	bpos = browser_line(pos);
 
 	idx = bpos->idx;
 	if (annotate_browser__opts.hide_src_code)
@@ -472,13 +472,13 @@ static void annotate_browser__calc_percent(struct annotate_browser *browser,
 
 static bool annotate_browser__toggle_source(struct annotate_browser *browser)
 {
-	struct disasm_line *dl;
+	struct annotation_line *al;
 	struct browser_line *bl;
 	off_t offset = browser->b.index - browser->b.top_idx;
 
 	browser->b.seek(&browser->b, offset, SEEK_CUR);
-	dl = list_entry(browser->b.top, struct disasm_line, al.node);
-	bl = browser_line(&dl->al);
+	al = list_entry(browser->b.top, struct annotation_line, node);
+	bl = browser_line(al);
 
 	if (annotate_browser__opts.hide_src_code) {
 		if (bl->idx_asm < offset)
@@ -600,7 +600,7 @@ static bool annotate_browser__jump(struct annotate_browser *browser)
 		return true;
 	}
 
-	annotate_browser__set_top(browser, dl, idx);
+	annotate_browser__set_top(browser, &dl->al, idx);
 
 	return true;
 }
@@ -639,7 +639,7 @@ static bool __annotate_browser__search(struct annotate_browser *browser)
 		return false;
 	}
 
-	annotate_browser__set_top(browser, disasm_line(al), idx);
+	annotate_browser__set_top(browser, al, idx);
 	browser->searching_backwards = false;
 	return true;
 }
@@ -678,7 +678,7 @@ static bool __annotate_browser__search_reverse(struct annotate_browser *browser)
 		return false;
 	}
 
-	annotate_browser__set_top(browser, disasm_line(al), idx);
+	annotate_browser__set_top(browser, al, idx);
 	browser->searching_backwards = true;
 	return true;
 }

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ