From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755422AbcESRAz (ORCPT ); Thu, 19 May 2016 13:00:55 -0400 Received: from foss.arm.com ([217.140.101.70]:36391 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755408AbcESRAv (ORCPT ); Thu, 19 May 2016 13:00:51 -0400 From: Chris Ryder To: linux-kernel@vger.kernel.org Cc: Chris Ryder , Peter Zijlstra , Ingo Molnar , Arnaldo Carvalho de Melo , Alexander Shishkin , linux-perf-users@vger.kernel.org, Will Deacon , Mark Rutland Subject: [PATCH 6/7] perf annotate: Make action message be architecture specific Date: Thu, 19 May 2016 17:59:50 +0100 Message-Id: X-Mailer: git-send-email 2.8.1 In-Reply-To: References: In-Reply-To: References: Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 Acked-by: Pawel Moll Cc: Peter Zijlstra Cc: Ingo Molnar Cc: Arnaldo Carvalho de Melo Cc: Alexander Shishkin Cc: linux-perf-users@vger.kernel.org Cc: Will Deacon Cc: Mark Rutland --- 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 #else #define ARCH_INSTRUCTIONS { } +#define ARCH_ACTIONS "Actions are not supported on this architecture" #endif #endif /* __ANNOTATE_INS_H */ -- 2.1.4