Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp10958542imu; Thu, 6 Dec 2018 09:17:15 -0800 (PST) X-Google-Smtp-Source: AFSGD/XMdfw66GwOp2P36WjClVfj30SqVjT0YUtV3hQzqmfWpAsB89daSP00u+tRV2vhirmi3Gsb X-Received: by 2002:a62:de06:: with SMTP id h6mr30231635pfg.158.1544116635708; Thu, 06 Dec 2018 09:17:15 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1544116635; cv=none; d=google.com; s=arc-20160816; b=IU4wXTa6L/EUgQbOeEfU4a4J+AcLZER537GVUN78Uv/dbpQk0D2fE20JzACDB7mAGr 1TfLnKLEAEKJPFtkYY8BhnJ9ak876/j6BH7csCWE0uxZc7J6oi9fcI7Y3ePrkyBwsh32 rzE/dMOY+v4YWm0qK5S522IYJP+PaMCVFa1tgWceh2MOykgNKbqzG2z+oHO74yAjq3al MZuDN9gnbm+Gd43AMVRd5PK8t6HZsaktnMLz3pKBRSH99oxKLDT95YRSzXvM+aL+kT6A BBnsFuVPGGzYLI1s9wWoetHqC5dVn/8dcrGAC835z9Q/g016ZnP93FTahA2rBMU9g0ZB +HGQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=BDUUzeil7HdBKi3eMDLWzR43KcvspGpPGyyuEEnJvnM=; b=GrcSBMhr/V8fgrcJzTjX8670K1V50U6sty4fk9KT4EK3y4+k8IxhZwXV6vv0Q9EkpE pIn4b8RQxs14ixuRDz5NtUcD8nyx2t/s401fMBhp/w5QlLgMC8LBEmX2woFwa0ABVY2H 1ZPyBEEPtoY6JM7zVOHSVgR91S1CqVUGwWgbT6XJLc82gcB1DUvO8auE2IdZm69B0P6y diAsi/hED394z4irNeke7+aa49RgH0OaAqXXIPs5jW0csGXSiCTTzkVcIYtXXnjQ0MpB Jy3kW5B003OwoO8L1qgZ+zNRcehZRzjF4DVvs+awmCXVUSXa1IulaQ4HhQWPgnUx9UlA vH8w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=cu+BSggF; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id c7si629463plz.118.2018.12.06.09.16.50; Thu, 06 Dec 2018 09:17:15 -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; dkim=pass header.i=@kernel.org header.s=default header.b=cu+BSggF; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726100AbeLFROo (ORCPT + 99 others); Thu, 6 Dec 2018 12:14:44 -0500 Received: from mail.kernel.org ([198.145.29.99]:40388 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725908AbeLFROo (ORCPT ); Thu, 6 Dec 2018 12:14:44 -0500 Received: from quaco.ghostprotocols.net (unknown [190.15.121.82]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 78FA620878; Thu, 6 Dec 2018 17:14:43 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1544116483; bh=+C1L+HFy0OnGZOXzUxjtW69K4zeY10YZLZVj5JQ1/Bs=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=cu+BSggFPcBfQ6FML6OtQNBz4LIFyeZcJnLUeFqkhJvkEyMXY30+ppa1AXoxjAflz 9I2e3tcQlKd0dhbkgCgaCtneaW+jG/HSdcr+wD9tmumRdlExurkFBLbo/VM22jsGVu BoHvmGP3mpuQjOHTTrrKAWSUOUXjqNFCCg//NQMM= Received: by quaco.ghostprotocols.net (Postfix, from userid 1000) id C2E044042C; Thu, 6 Dec 2018 14:14:40 -0300 (-03) Date: Thu, 6 Dec 2018 14:14:40 -0300 From: Arnaldo Carvalho de Melo To: Eugeniy Paltsev Cc: linux-snps-arc@lists.infradead.org, Vineet Gupta , linux-kernel@vger.kernel.org, Alexey Brodkin , Peter Zijlstra , Ingo Molnar , Alexander Shishkin , Jiri Olsa , Namhyung Kim Subject: Re: [PATCH] ARC: introduce basic 'perf annotate' support for ARC Message-ID: <20181206171440.GA32567@kernel.org> References: <20181204175118.25232-1-Eugeniy.Paltsev@synopsys.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20181204175118.25232-1-Eugeniy.Paltsev@synopsys.com> X-Url: http://acmel.wordpress.com User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Em Tue, Dec 04, 2018 at 08:51:18PM +0300, Eugeniy Paltsev escreveu: > Introduce basic 'perf annotate' support for ARC to be able > to use anotation via stdio interface. Would be nice to show the output of a 'perf annotate --stdio2' for a perf.data file recorded on ARC :-) - Arnaldo > Signed-off-by: Eugeniy Paltsev > --- > 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(-) > create mode 100644 tools/perf/arch/arc/annotate/instructions.c > > 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 82657c01a3b8..f7cb57c424d1 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 6936daf89ddd..66066fb4d644 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, > -- > 2.14.5 -- - Arnaldo