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: vkamensky X-Patchwork-Id: 43811 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-we0-f200.google.com (mail-we0-f200.google.com [74.125.82.200]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 75D2420D5D for ; Tue, 27 Jan 2015 06:34:39 +0000 (UTC) Received: by mail-we0-f200.google.com with SMTP id m14sf6496411wev.3 for ; Mon, 26 Jan 2015 22:34:38 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:delivered-to:from:to:cc:subject :date:message-id:in-reply-to:references:sender:precedence:list-id :x-original-sender:x-original-authentication-results:mailing-list :list-post:list-help:list-archive:list-unsubscribe; bh=VBl7ppvEPzkX522K9PPo0GlfXSWc7+lr8ocF3yhE30E=; b=WVn4hJGDg+qnqE7b7TO7545Z4SiM+2YvuqT8kADtpCSibCh/BOL5TMHn32m7TQIrUM sZgOmFwdNOtqZm2oHsyCTuVe/RLkHvidbgbyv6D+9MbUKjhZ+DnnW7Y1tdYd8/8xdmA9 mwJ4p/GFQ6YrK184BN2XWfKfcIZHIXzFyh3CLEBDHtafNzlaBclRX4T7HT0Wm7/XO9yn 32J3fYdYgvVB9Bq8gE5WSUolu2UIzcX5+ds8+yEOHvT1KyjOxQEjGoZJbF2su6izkJ8c O4nEZLm31JYSn/j7+6foZ2nGovrzWcCnume3qulgl+gWaSIN6k4skv8FrkKK/f6jdZBu IYbg== X-Gm-Message-State: ALoCoQmD3EXXNGZrl2jWcGlYF0zsk4C73LzpTgE3DHaMqt0Wp7iw/G2f4IpQn5EhkyuduimY/+6H X-Received: by 10.180.108.197 with SMTP id hm5mr2321368wib.4.1422340478779; Mon, 26 Jan 2015 22:34:38 -0800 (PST) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.8.115 with SMTP id q19ls562603laa.55.gmail; Mon, 26 Jan 2015 22:34:38 -0800 (PST) X-Received: by 10.152.197.5 with SMTP id iq5mr2213515lac.6.1422340478583; Mon, 26 Jan 2015 22:34:38 -0800 (PST) Received: from mail-la0-f42.google.com (mail-la0-f42.google.com. [209.85.215.42]) by mx.google.com with ESMTPS id rz1si300387lbb.42.2015.01.26.22.34.38 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 26 Jan 2015 22:34:38 -0800 (PST) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.42 as permitted sender) client-ip=209.85.215.42; Received: by mail-la0-f42.google.com with SMTP id ms9so11594022lab.1 for ; Mon, 26 Jan 2015 22:34:38 -0800 (PST) X-Received: by 10.152.3.70 with SMTP id a6mr2158644laa.71.1422340478449; Mon, 26 Jan 2015 22:34:38 -0800 (PST) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.112.35.133 with SMTP id h5csp1001014lbj; Mon, 26 Jan 2015 22:34:37 -0800 (PST) X-Received: by 10.68.179.226 with SMTP id dj2mr40593868pbc.100.1422340476131; Mon, 26 Jan 2015 22:34:36 -0800 (PST) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id pi10si410087pbb.61.2015.01.26.22.34.34; Mon, 26 Jan 2015 22:34:36 -0800 (PST) Received-SPF: none (google.com: linux-kernel-owner@vger.kernel.org does not designate permitted sender hosts) client-ip=209.132.180.67; Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753372AbbA0GeZ (ORCPT + 28 others); Tue, 27 Jan 2015 01:34:25 -0500 Received: from mail-pa0-f48.google.com ([209.85.220.48]:59418 "EHLO mail-pa0-f48.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753059AbbA0GeU (ORCPT ); Tue, 27 Jan 2015 01:34:20 -0500 Received: by mail-pa0-f48.google.com with SMTP id ey11so16540722pad.7 for ; Mon, 26 Jan 2015 22:34:20 -0800 (PST) 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 Cc: Peter Zijlstra , Paul Mackerras , Ingo Molnar , Adrian Hunter , Jiri Olsa , Avi Kivity , Masami Hiramatsu , Anton Blanchard , Dave Martin , linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Victor Kamensky 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> Sender: linux-kernel-owner@vger.kernel.org Precedence: list List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: victor.kamensky@linaro.org X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.42 as permitted sender) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org X-Google-Group-Id: 836684582541 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , 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 --- 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; }