Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp37696imu; Fri, 14 Dec 2018 13:02:49 -0800 (PST) X-Google-Smtp-Source: AFSGD/XbVBxkfxVX8bkCCdpo2CyFyyyi0moTY06oQMtesmyAYGOMaKXKSpvSLk7QisbH7Rz3ohNK X-Received: by 2002:a63:1e17:: with SMTP id e23mr4060912pge.130.1544821369698; Fri, 14 Dec 2018 13:02:49 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1544821369; cv=none; d=google.com; s=arc-20160816; b=f0Vwyk3k0hJv3zdkSBz62/yl9bEDHKbqLmUxOBrueGUOoI/EkXHbnIy4EET812grPB fBoOpxyOrz+m5TJL5EDiNjzUiNRzxsQpb0M+Te7ebNC7m8haAhUHGUx5CrYMev5BTDHf UB1U06RUSl4aBO2Qt09VvlMGSATquBQHL6KN5v6K4pdU+vRdXTew1EktI+o/7b9ejkRR WH05lr1EqulHaQQoSmGdNVlw7UIms6bvBiHlhNbNlq1tQxlqXTcbQ/vuvQ/17uY5bRlM u8ZWgI77/B2pn78B4qETq9IcEoKew0SZtc5BGyYbgsk59TGlIa8W3iFg9bFi1iFEAPtJ 0lxw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-disposition :content-transfer-encoding:mime-version:robot-unsubscribe:robot-id :git-commit-id:subject:to:references:in-reply-to:reply-to:cc :message-id:from:date; bh=WJYLg1taw6TjTW8oix+PhIWCB3gsfvlN/UoZnjc6W50=; b=CP6zWJrIUyD73hNMa7mQAeHnVW/ZTFAcbtVYv9ZeDEGts1+BOvKCGq9hN1+DprX3hY Y35NO7ee4/fUrIcmnM6MQUnbnPRJUKxl2OeX1KbShbIh3e9bnPas8YSffzYK++6/eSw/ NqpruCyjTlb37UFCEICw4s170202brpMepZEKUEA+Qmv8mcyCYBZxSrLdzEca+irRPPT +dyhcjgnuesdmhBBBzZcK59lkr+qoQ/g3Hnek/NLMEMm+/Y+1opIyOWQJBRpAtemsc04 1JBiRbMiPgEenY5ddBb5fWBcMVoWkNb1jT5dElruKzkPnBteKQ0PeNDO1pMbK+pRZq1E 43AQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id b65si4850765pgc.259.2018.12.14.13.02.34; Fri, 14 Dec 2018 13:02:49 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730994AbeLNVBV (ORCPT + 99 others); Fri, 14 Dec 2018 16:01:21 -0500 Received: from terminus.zytor.com ([198.137.202.136]:47743 "EHLO terminus.zytor.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730906AbeLNVBV (ORCPT ); Fri, 14 Dec 2018 16:01:21 -0500 Received: from terminus.zytor.com (localhost [127.0.0.1]) by terminus.zytor.com (8.15.2/8.15.2) with ESMTPS id wBEKxwnb1459988 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Fri, 14 Dec 2018 12:59:58 -0800 Received: (from tipbot@localhost) by terminus.zytor.com (8.15.2/8.15.2/Submit) id wBEKxwTo1459985; Fri, 14 Dec 2018 12:59:58 -0800 Date: Fri, 14 Dec 2018 12:59:58 -0800 X-Authentication-Warning: terminus.zytor.com: tipbot set sender to tipbot@zytor.com using -f From: tip-bot for Eugeniy Paltsev Message-ID: Cc: jolsa@redhat.com, acme@redhat.com, peterz@infradead.org, vineet.gupta1@synopsys.com, mingo@kernel.org, namhyung@kernel.org, Eugeniy.Paltsev@synopsys.com, tglx@linutronix.de, hpa@zytor.com, alexander.shishkin@linux.intel.com, linux-kernel@vger.kernel.org, alexey.brodkin@synopsys.com Reply-To: alexey.brodkin@synopsys.com, linux-kernel@vger.kernel.org, alexander.shishkin@linux.intel.com, tglx@linutronix.de, hpa@zytor.com, namhyung@kernel.org, Eugeniy.Paltsev@synopsys.com, peterz@infradead.org, vineet.gupta1@synopsys.com, mingo@kernel.org, jolsa@redhat.com, acme@redhat.com In-Reply-To: <20181204175118.25232-1-Eugeniy.Paltsev@synopsys.com> References: <20181204175118.25232-1-Eugeniy.Paltsev@synopsys.com> To: linux-tip-commits@vger.kernel.org Subject: [tip:perf/core] perf annotate: Introduce basic support for ARC Git-Commit-ID: c6934c91ba76438e4d641209dff32cbfdcaff9a2 X-Mailer: tip-git-log-daemon Robot-ID: Robot-Unsubscribe: Contact to get blacklisted from these emails MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset=UTF-8 Content-Disposition: inline X-Spam-Status: No, score=-1.7 required=5.0 tests=ALL_TRUSTED,BAYES_00, DATE_IN_FUTURE_96_Q autolearn=no autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on terminus.zytor.com Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Commit-ID: c6934c91ba76438e4d641209dff32cbfdcaff9a2 Gitweb: https://git.kernel.org/tip/c6934c91ba76438e4d641209dff32cbfdcaff9a2 Author: Eugeniy Paltsev AuthorDate: Tue, 4 Dec 2018 20:51:18 +0300 Committer: Arnaldo Carvalho de Melo CommitDate: Thu, 6 Dec 2018 16:43:27 -0300 perf annotate: Introduce basic support for ARC Introduce basic 'perf annotate' support for ARC to be able to use anotation via stdio interface. Signed-off-by: Eugeniy Paltsev Cc: Alexander Shishkin Cc: Alexey Brodkin Cc: Jiri Olsa Cc: linux-snps-arc@lists.infradead.org Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Vineet Gupta Link: http://lkml.kernel.org/r/20181204175118.25232-1-Eugeniy.Paltsev@synopsys.com Signed-off-by: Arnaldo Carvalho de Melo --- tools/perf/arch/arc/annotate/instructions.c | 9 +++++++++ tools/perf/arch/common.c | 11 ++++++++++- tools/perf/util/annotate.c | 5 +++++ 3 files changed, 24 insertions(+), 1 deletion(-) diff --git a/tools/perf/arch/arc/annotate/instructions.c b/tools/perf/arch/arc/annotate/instructions.c new file mode 100644 index 000000000000..2f00e995c7e3 --- /dev/null +++ b/tools/perf/arch/arc/annotate/instructions.c @@ -0,0 +1,9 @@ +// SPDX-License-Identifier: GPL-2.0 +#include + +static int arc__annotate_init(struct arch *arch, char *cpuid __maybe_unused) +{ + arch->initialized = true; + arch->objdump.comment_char = ';'; + return 0; +} diff --git a/tools/perf/arch/common.c b/tools/perf/arch/common.c index 5f69fd0b745a..f3824ca7c20b 100644 --- a/tools/perf/arch/common.c +++ b/tools/perf/arch/common.c @@ -5,6 +5,13 @@ #include "../util/util.h" #include "../util/debug.h" +const char *const arc_triplets[] = { + "arc-linux-", + "arc-snps-linux-uclibc-", + "arc-snps-linux-gnu-", + NULL +}; + const char *const arm_triplets[] = { "arm-eabi-", "arm-linux-androideabi-", @@ -147,7 +154,9 @@ static int perf_env__lookup_binutils_path(struct perf_env *env, zfree(&buf); } - if (!strcmp(arch, "arm")) + if (!strcmp(arch, "arc")) + path_list = arc_triplets; + else if (!strcmp(arch, "arm")) path_list = arm_triplets; else if (!strcmp(arch, "arm64")) path_list = arm64_triplets; diff --git a/tools/perf/util/annotate.c b/tools/perf/util/annotate.c index 51d291b0b81f..ac9805e0bc76 100644 --- a/tools/perf/util/annotate.c +++ b/tools/perf/util/annotate.c @@ -134,6 +134,7 @@ static int arch__associate_ins_ops(struct arch* arch, const char *name, struct i return 0; } +#include "arch/arc/annotate/instructions.c" #include "arch/arm/annotate/instructions.c" #include "arch/arm64/annotate/instructions.c" #include "arch/x86/annotate/instructions.c" @@ -142,6 +143,10 @@ static int arch__associate_ins_ops(struct arch* arch, const char *name, struct i #include "arch/sparc/annotate/instructions.c" static struct arch architectures[] = { + { + .name = "arc", + .init = arc__annotate_init, + }, { .name = "arm", .init = arm__annotate_init,