From patchwork Tue Jan 27 06:34:01 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Victor Kamensky X-Patchwork-Id: 5714951 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 03C7FC058D for ; Tue, 27 Jan 2015 06:37:03 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 311B5201F2 for ; Tue, 27 Jan 2015 06:37:02 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 59492201EC for ; Tue, 27 Jan 2015 06:37:01 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1YFzjc-0007Vx-Pm; Tue, 27 Jan 2015 06:34:48 +0000 Received: from mail-pa0-f48.google.com ([209.85.220.48]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1YFzjV-000791-KC for linux-arm-kernel@lists.infradead.org; Tue, 27 Jan 2015 06:34:42 +0000 Received: by mail-pa0-f48.google.com with SMTP id ey11so16540728pad.7 for ; Mon, 26 Jan 2015 22:34:20 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=oQvePKVe0EbuAu4kVd2LaGwj/QU7H3RRK+tgKXPK/9k=; b=EbPHnIF3kT0x0J9k3XqmeCH3sCxanqjd+/x2E2mc2pMkF5AIWR+sYdEqYGXlYJvRox i4GWJe6VL3f6m5rVXYpkBDCmrM1C4hb7rpMfalcRTdesLCuEJZUxcuv2GRtsiihDCVMY 8dmFlFhKEbtWWCtl/kEBqjA85sZM4AjlZGbWwGyKLCjZ24Zzz7g1wgvzD7Eamtb3cVVw UCs9eTv1KkQhuY3CEBreOrSH0AgS2NSvH6Ju5Zn24vFPqQW2BSf2/ap52ldnpKvdjURb xitagjwynwz0i8AVhI/8/YNNFQSlGekwGk7ma6zCao8sRCFcTCnTJ1zl17mSDjmCx+cX 6ynQ== X-Gm-Message-State: ALoCoQk5BKvJXMgKmpjYzuaWm4O43Vr966mRfWYAjnV0vg+UWPsbCpiCMen1pi8yCu4SXiduuyL8 X-Received: by 10.68.219.33 with SMTP id pl1mr30739114pbc.93.1422340460356; Mon, 26 Jan 2015 22:34:20 -0800 (PST) Received: from kamensky-w530.hsd1.ca.comcast.net ([24.6.73.122]) by mx.google.com with ESMTPSA id vk4sm410289pbc.74.2015.01.26.22.34.15 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 26 Jan 2015 22:34:16 -0800 (PST) From: Victor Kamensky To: Arnaldo Carvalho de Melo , Russell King , Namhyung Kim , David Ahern , Will Deacon Subject: [PATCH V3 1/2] perf symbols: Ignore mapping symbols on aarch64 Date: Mon, 26 Jan 2015 22:34:01 -0800 Message-Id: <1422340442-4673-2-git-send-email-victor.kamensky@linaro.org> X-Mailer: git-send-email 1.8.1.4 In-Reply-To: <1422340442-4673-1-git-send-email-victor.kamensky@linaro.org> References: <1422340442-4673-1-git-send-email-victor.kamensky@linaro.org> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20150126_223441_707301_59857CC4 X-CRM114-Status: GOOD ( 11.46 ) X-Spam-Score: -0.7 (/) Cc: Avi Kivity , Peter Zijlstra , Victor Kamensky , Adrian Hunter , linux-kernel@vger.kernel.org, Ingo Molnar , Paul Mackerras , Anton Blanchard , Masami Hiramatsu , Jiri Olsa , Dave Martin , linux-arm-kernel@lists.infradead.org X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Aarch64 ELF files use mapping symbols with special names $x, $d to identify regions of Aarch64 code (see Aarch64 ELF ABI - "ARM IHI 0056B", section "4.5.4 Mapping symbols"). The patch filters out these symbols at load time, similar to "696b97a perf symbols: Ignore mapping symbols on ARM" changes done for ARM before V8. Also added handling of mapping symbols that has format "$d." and similar for both cases. Note we are not making difference between EM_ARM and EM_AARCH64 mapping symbols instead code handles superset of both. Signed-off-by: Victor Kamensky Acked-by: Will Deacon Cc: Peter Zijlstra Cc: Paul Mackerras Cc: Ingo Molnar Cc: Arnaldo Carvalho de Melo Cc: Adrian Hunter Cc: Jiri Olsa Cc: Namhyung Kim Cc: Avi Kivity Cc: Masami Hiramatsu Cc: Anton Blanchard Cc: David Ahern Cc: Will Deacon Cc: Russell King Cc: Dave Martin Acked-by: Namhyung Kim --- tools/perf/util/symbol-elf.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/tools/perf/util/symbol-elf.c b/tools/perf/util/symbol-elf.c index 06fcd1b..8fc6e2f 100644 --- a/tools/perf/util/symbol-elf.c +++ b/tools/perf/util/symbol-elf.c @@ -856,10 +856,9 @@ int dso__load_sym(struct dso *dso, struct map *map, /* Reject ARM ELF "mapping symbols": these aren't unique and * don't identify functions, so will confuse the profile * output: */ - if (ehdr.e_machine == EM_ARM) { - if (!strcmp(elf_name, "$a") || - !strcmp(elf_name, "$d") || - !strcmp(elf_name, "$t")) + if (ehdr.e_machine == EM_ARM || ehdr.e_machine == EM_AARCH64) { + if (elf_name[0] == '$' && strchr("adtx", elf_name[1]) + && (elf_name[2] == '\0' || elf_name[2] == '.')) continue; }