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:	Thu, 19 May 2016 17:59:50 +0100
From:	Chris Ryder <chris.ryder@....com>
To:	linux-kernel@...r.kernel.org
Cc:	Chris Ryder <chris.ryder@....com>,
	Peter Zijlstra <peterz@...radead.org>,
	Ingo Molnar <mingo@...hat.com>,
	Arnaldo Carvalho de Melo <acme@...nel.org>,
	Alexander Shishkin <alexander.shishkin@...ux.intel.com>,
	linux-perf-users@...r.kernel.org,
	Will Deacon <will.deacon@....com>,
	Mark Rutland <mark.rutland@....com>
Subject: [PATCH 6/7] perf annotate: Make action message be architecture specific

The help message displayed by perf report when pressing right arrow
or enter keys on an instruction that doesn't have an action is
currently hard coded and displays x86 instructions regardless of
the target architecture. Make the help message architecture specific.

Signed-off-by: Chris Ryder <chris.ryder@....com>
Acked-by: Pawel Moll <pawel.moll@....com>
Cc: Peter Zijlstra <peterz@...radead.org>
Cc: Ingo Molnar <mingo@...hat.com>
Cc: Arnaldo Carvalho de Melo <acme@...nel.org>
Cc: Alexander Shishkin <alexander.shishkin@...ux.intel.com>
Cc: linux-perf-users@...r.kernel.org
Cc: Will Deacon <will.deacon@....com>
Cc: Mark Rutland <mark.rutland@....com>
---
 tools/perf/arch/arm/include/annotate_ins.h | 2 ++
 tools/perf/arch/x86/include/annotate_ins.h | 2 ++
 tools/perf/ui/browsers/annotate.c          | 2 +-
 tools/perf/util/annotate_ins.h             | 1 +
 4 files changed, 6 insertions(+), 1 deletion(-)

diff --git a/tools/perf/arch/arm/include/annotate_ins.h b/tools/perf/arch/arm/include/annotate_ins.h
index e8ea98d..143c478 100644
--- a/tools/perf/arch/arm/include/annotate_ins.h
+++ b/tools/perf/arch/arm/include/annotate_ins.h
@@ -22,4 +22,6 @@
 	{ .name = "orr",   .ops  = &mov_ops, }, \
 	}
 
+#define ARCH_ACTIONS "Actions are only available for branch instructions."
+
 #endif /* ARCH_ANNOTATE_INS_H */
diff --git a/tools/perf/arch/x86/include/annotate_ins.h b/tools/perf/arch/x86/include/annotate_ins.h
index 179b50e..2e889b8 100644
--- a/tools/perf/arch/x86/include/annotate_ins.h
+++ b/tools/perf/arch/x86/include/annotate_ins.h
@@ -79,4 +79,6 @@
 	{ .name = "xbeginq", .ops  = &jump_ops, }, \
 	}
 
+#define ARCH_ACTIONS "Actions are only available for 'callq', 'retq' & jump instructions."
+
 #endif /* ARCH_ANNOTATE_INS_H */
diff --git a/tools/perf/ui/browsers/annotate.c b/tools/perf/ui/browsers/annotate.c
index 6816faf..56064f6 100644
--- a/tools/perf/ui/browsers/annotate.c
+++ b/tools/perf/ui/browsers/annotate.c
@@ -850,7 +850,7 @@ show_help:
 			} else if (!(annotate_browser__jump(browser) ||
 				     annotate_browser__callq(browser, evsel, hbt))) {
 show_sup_ins:
-				ui_helpline__puts("Actions are only available for 'callq', 'retq' & jump instructions.");
+				ui_helpline__puts(ARCH_ACTIONS);
 			}
 			continue;
 		case 't':
diff --git a/tools/perf/util/annotate_ins.h b/tools/perf/util/annotate_ins.h
index 15ac482..27457f8f 100644
--- a/tools/perf/util/annotate_ins.h
+++ b/tools/perf/util/annotate_ins.h
@@ -11,6 +11,7 @@ extern char *arch_parse_call_target(char *t);
 #include <annotate_ins.h>
 #else
 #define ARCH_INSTRUCTIONS { }
+#define ARCH_ACTIONS "Actions are not supported on this architecture"
 #endif
 
 #endif /* __ANNOTATE_INS_H */
-- 
2.1.4

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ