Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp3926559imu; Tue, 18 Dec 2018 06:29:10 -0800 (PST) X-Google-Smtp-Source: AFSGD/Xew0QCUg5Q7IoQFvFySiwoi6NaNbmJVF5Q6asGWHUR7tLCarE9Xn/USMgv0+0ArG1MKgqt X-Received: by 2002:a63:d252:: with SMTP id t18mr16101702pgi.133.1545143350811; Tue, 18 Dec 2018 06:29:10 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1545143350; cv=none; d=google.com; s=arc-20160816; b=zdkVTWiArDhLD6n3pF3ZlVPtUvMFUHoELiWH5VRiA941AjF7FsSfHOxkuPhPKh4IUB ubRLHwo+2aLie3qJW5nZvKvvFlIILIS0faad9i3fIs5Fbgc3M0ZyF42pr9zeiT75bI2K uIExO7NvIt5vTfCWAdGN69SKN3hcbrzYIbiXBR1QC11D10/wjR3ykP2Xgu5nfv3+pqM5 JcsxCuoHHZesITY8Bda0XkZhuQYECX1P5pKjIiy0+INcoVeS8jpsN+2n254iEBCfyUh8 ZIaIHBkXOsnf4ERGvoDa+f8PXykGcB57TG8etbXmrplw1PwCQRVufAezuIjSO8iMIL9q 08CA== 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=wvzY3nvJoEYwzpWpNit4yH2V4ML+sSlrNPqpZqmGSqA=; b=xwZlAl6qmM2HyYBxP0VwgMIfeO93Er1g7wvB+Odlsw4BUWZo+f51LNA+ZGo5eSpHQ2 yjV3zFAAWJ2zSnmbGLWQdsGVJIK6RszHUf74dYpX9chaKyFn8Iwu7Iq5wNQXjXpN+nnY fDKb8pFwz2kgvuh3mDjPV7fvSDXCI63wERqTlJXpHAKFXPI68sNbII4k0Zm7EsFvm8aS AOGKltbPHcKKsi73yxY+VAXAuuOLgXKwOUm0MCboUnHCEvpVD0pcW4QqlKTX+Khinx4U hYHY4wkiOGS/8+f4oX4Kmen0H7vW0Va3oi4j0iJzjTveF7LE89naCnN6Cfkyi673r0Ee 6o5w== 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 r197si15293901pfr.192.2018.12.18.06.28.54; Tue, 18 Dec 2018 06:29:10 -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 S1727104AbeLRO1X (ORCPT + 99 others); Tue, 18 Dec 2018 09:27:23 -0500 Received: from terminus.zytor.com ([198.137.202.136]:43465 "EHLO terminus.zytor.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726541AbeLRO1W (ORCPT ); Tue, 18 Dec 2018 09:27:22 -0500 Received: from terminus.zytor.com (localhost [127.0.0.1]) by terminus.zytor.com (8.15.2/8.15.2) with ESMTPS id wBIEQxQW2857920 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Tue, 18 Dec 2018 06:26:59 -0800 Received: (from tipbot@localhost) by terminus.zytor.com (8.15.2/8.15.2/Submit) id wBIEQxP92857917; Tue, 18 Dec 2018 06:26:59 -0800 Date: Tue, 18 Dec 2018 06:26:59 -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: tglx@linutronix.de, hpa@zytor.com, acme@redhat.com, peterz@infradead.org, linux-kernel@vger.kernel.org, namhyung@kernel.org, alexander.shishkin@linux.intel.com, Eugeniy.Paltsev@synopsys.com, jolsa@redhat.com, mingo@kernel.org, alexey.brodkin@synopsys.com, vineet.gupta1@synopsys.com Reply-To: linux-kernel@vger.kernel.org, peterz@infradead.org, Eugeniy.Paltsev@synopsys.com, alexander.shishkin@linux.intel.com, namhyung@kernel.org, tglx@linutronix.de, hpa@zytor.com, acme@redhat.com, alexey.brodkin@synopsys.com, vineet.gupta1@synopsys.com, jolsa@redhat.com, mingo@kernel.org 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: 6d99a79cb40da3eddafef844b7a679fe5162f224 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=-2.9 required=5.0 tests=ALL_TRUSTED,BAYES_00, T_DATE_IN_FUTURE_96_Q autolearn=ham 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: 6d99a79cb40da3eddafef844b7a679fe5162f224 Gitweb: https://git.kernel.org/tip/6d99a79cb40da3eddafef844b7a679fe5162f224 Author: Eugeniy Paltsev AuthorDate: Tue, 4 Dec 2018 20:51:18 +0300 Committer: Arnaldo Carvalho de Melo CommitDate: Mon, 17 Dec 2018 14:59:42 -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,