From patchwork Wed Feb 11 21:09:00 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnaldo Carvalho de Melo X-Patchwork-Id: 44575 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-la0-f69.google.com (mail-la0-f69.google.com [209.85.215.69]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 24C6121527 for ; Wed, 11 Feb 2015 21:11:44 +0000 (UTC) Received: by labgm9 with SMTP id gm9sf3858771lab.2 for ; Wed, 11 Feb 2015 13:11:43 -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=tNYcm35ABY/J1tDg6n5RxktrWfETWTy8N6NdsQZvN7U=; b=m1XMRczlz0uQZUXF84eGzuPuX6e8Lq+1pwS4fFx9VwVbJAf13nFWUH6Lxg5ujvAIMP FdTPsmBf54Lgmpb+va4ELp3IZNE3OOXj/dcJcgXlALqtf/hgQPSnNnd31wXRwiMnugDe 06UKXjE6jvhiobqWnP3FlsX6yHlXyEgi48yEpbfwiKLXXbMIdllH+StZR01pkxnRe+74 yW3PnS0PGnPRRDldwP8LgIU/7THGFsHOB5vsdd3cbN7Sp2TJZvr1g18/D40G8o+/US/g qF0KlGLBDkK5QrVEwVNXasSHTDfE1ylfQvXpJzexZMAkKetAb2JrEyYzcYP2XgRdi4Ac 3FIg== X-Gm-Message-State: ALoCoQmXeMZ0DmWsMahVrufOfkjNA/ftn2POxxDQG0QIYzaLxY5OSDxWCTozHSjuFedBi0xesajP X-Received: by 10.194.178.234 with SMTP id db10mr84912wjc.2.1423689103133; Wed, 11 Feb 2015 13:11:43 -0800 (PST) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.234.102 with SMTP id ud6ls106372lac.26.gmail; Wed, 11 Feb 2015 13:11:42 -0800 (PST) X-Received: by 10.152.121.38 with SMTP id lh6mr468656lab.116.1423689102841; Wed, 11 Feb 2015 13:11:42 -0800 (PST) Received: from mail-lb0-f170.google.com (mail-lb0-f170.google.com. [209.85.217.170]) by mx.google.com with ESMTPS id nv4si1580259lbb.16.2015.02.11.13.11.42 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 11 Feb 2015 13:11:42 -0800 (PST) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.217.170 as permitted sender) client-ip=209.85.217.170; Received: by mail-lb0-f170.google.com with SMTP id u14so5768949lbd.1 for ; Wed, 11 Feb 2015 13:11:42 -0800 (PST) X-Received: by 10.152.181.168 with SMTP id dx8mr498680lac.76.1423689102709; Wed, 11 Feb 2015 13:11:42 -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 h5csp43301lbj; Wed, 11 Feb 2015 13:11:41 -0800 (PST) X-Received: by 10.68.106.226 with SMTP id gx2mr962807pbb.78.1423689092408; Wed, 11 Feb 2015 13:11:32 -0800 (PST) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id fn9si2224943pab.229.2015.02.11.13.11.31; Wed, 11 Feb 2015 13:11:32 -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 S1754607AbbBKVJ1 (ORCPT + 28 others); Wed, 11 Feb 2015 16:09:27 -0500 Received: from mail.kernel.org ([198.145.29.136]:38621 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754483AbbBKVJX (ORCPT ); Wed, 11 Feb 2015 16:09:23 -0500 Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id E574D20212; Wed, 11 Feb 2015 21:09:21 +0000 (UTC) Received: from zoo.ghostprotocols.net.ghostprotocols.net (unknown [191.184.42.27]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 618EB20219; Wed, 11 Feb 2015 21:09:17 +0000 (UTC) From: Arnaldo Carvalho de Melo To: Ingo Molnar Cc: linux-kernel@vger.kernel.org, Victor Kamensky , Adrian Hunter , Anton Blanchard , Avi Kivity , Dave Martin , David Ahern , Jiri Olsa , linux-arm-kernel@lists.infradead.org, Masami Hiramatsu , Paul Mackerras , Peter Zijlstra , Russell King , Arnaldo Carvalho de Melo Subject: [PATCH 06/21] perf symbols: Ignore mapping symbols on aarch64 Date: Wed, 11 Feb 2015 18:09:00 -0300 Message-Id: <1423688955-8094-7-git-send-email-acme@kernel.org> X-Mailer: git-send-email 1.9.3 In-Reply-To: <1423688955-8094-1-git-send-email-acme@kernel.org> References: <1423688955-8094-1-git-send-email-acme@kernel.org> X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00, UNPARSEABLE_RELAY autolearn=ham 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 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: acme@kernel.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.217.170 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: , From: Victor Kamensky 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: Namhyung Kim Acked-by: Will Deacon Cc: Adrian Hunter Cc: Anton Blanchard Cc: Avi Kivity Cc: Dave Martin Cc: David Ahern Cc: Jiri Olsa Cc: linux-arm-kernel@lists.infradead.org Cc: Masami Hiramatsu Cc: Paul Mackerras Cc: Peter Zijlstra Cc: Russell King Link: http://lkml.kernel.org/r/1422340442-4673-2-git-send-email-victor.kamensky@linaro.org Signed-off-by: Arnaldo Carvalho de Melo --- 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 b24f9d8727a8..225eb73ee78b 100644 --- a/tools/perf/util/symbol-elf.c +++ b/tools/perf/util/symbol-elf.c @@ -859,10 +859,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; }