Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp5110699imu; Tue, 15 Jan 2019 11:23:28 -0800 (PST) X-Google-Smtp-Source: ALg8bN5TTc5/O78VV0imQ0h2GRHg9BQqfOyo3pxFx6nb9vVZJITCCFfeaSLuIhyVmvns2K3b08rt X-Received: by 2002:a63:a84a:: with SMTP id i10mr5249823pgp.263.1547580208891; Tue, 15 Jan 2019 11:23:28 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1547580208; cv=none; d=google.com; s=arc-20160816; b=adMQiMxtFJ5y48tipIbJuRtbesgFbmIsyL0e6PT/oVIOi8HFeaTj56arjJrUChB6bB j+BvySuDQj3+XmLzFRbFHid1AwlQzo+SqxX6kY0MxpoA9bWxijzXEqcfIMtq8QT3KoSR Y+hLjH6cpNzx07nZWLEgqxUWZaJZGrZ+hYvGudg1yv235vtQD1a3rLhBjTbD8mqE353M Y4euZNOZ5Si4QpY1jQ+GnnHhRtDFhLT2MsLhSfHnhzbWV5tnaeqdqh2VDk6kwIAmEgos no0FsUL+dFsfmBidYLKF7JHFzs1uyVtVJg1wx8YLlCNn3hfqO1DNY6WDEFr5z/NN+ima bBNg== 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=4ZvJY5D38FQx9IGz/wbWdxD61ZnQMlLQr8Ko7yoR+O8=; b=SMpYbPeQ2AncbvYiSPC5bAbDd7XYVraqOAzg2JJDwQVj2rb+7J+RIV/i9yIbUxWLoD nSnhkdqa1BvegDVNBzbOfO9ZnK4rZwiuRv3TPltJ3P1W4eHqT6FSOWbtYFN6sbv42b42 p44fSQBbd73YcJjxNAHve6rKD4LynGd6/43/WwNlPnJ8lD0Jsy3siyasavmPIbCOIoIW Lzy4L2W96Ak68IgkcSWGLH7hBwEVQL9Dsw0BE8GM3490wo3eAnAsyMJcPv8igALr+vEB pWfVLsxIEnyuokI3NNixtucc3OV1f/LChsmhvL0WRcXucFwgjk9ygXNvvf+nvuov9phu 8YQA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=gtlNCGjK; 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 j13si3836203pgi.227.2019.01.15.11.23.09; Tue, 15 Jan 2019 11:23:28 -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=gtlNCGjK; 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 S1731630AbfAOQfp (ORCPT + 99 others); Tue, 15 Jan 2019 11:35:45 -0500 Received: from mail.kernel.org ([198.145.29.99]:51498 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726496AbfAOQfo (ORCPT ); Tue, 15 Jan 2019 11:35: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 A4B2C20657; Tue, 15 Jan 2019 16:35:43 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1547570143; bh=N7bLjQU0nI/WdEot0OKhtPXvCwEInbD14YR79QM/g+g=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=gtlNCGjKLrY24EsN+VHtjdVF5oGgn7k9VPFqYH+4c13p9V442HUbCBZ9fCwxNh5I7 9Vrmup/LgS+fqpLOimYXrCw7ZvBCNqi1GkMkQRIqsmlCC0qvxb0StsFl3Hw13dQ3gZ aWb/0Du5KYhCzHBjmhl40JSIv3XnAn6+FH6QPOGU= Received: by quaco.ghostprotocols.net (Postfix, from userid 1000) id 896ED41AB5; Tue, 15 Jan 2019 13:35:40 -0300 (-03) Date: Tue, 15 Jan 2019 13:35:40 -0300 From: Arnaldo Carvalho de Melo To: Nick Clifton Cc: Jiri Olsa , lkml , Ingo Molnar , Namhyung Kim , Alexander Shishkin , Peter Zijlstra , Michael Petlan , Masami Hiramatsu Subject: Re: [RFC] perf tools: Filter out hidden symbols from labels Message-ID: <20190115163540.GA20159@kernel.org> References: <20190115135354.11572-1-jolsa@kernel.org> <960f0b83-a623-67a6-ab55-d56139d10ba2@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <960f0b83-a623-67a6-ab55-d56139d10ba2@redhat.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, Jan 15, 2019 at 04:13:16PM +0000, Nick Clifton escreveu: > Hi Jiri, > > > When perf is built with annobin plugin (RHEL8 build) extra symbols > > are added to its binary: > > A bit of background for those wondering why annobin is creating > these symbols: Annobin is a plugin for gcc that records data > about how object file were built. It is specifically designed > to be able to cope with files that are built using multiple > different sets of optimization options. (Eg because of #pragma > directives or function specific optimization attributes). It > generates notes to cover each compiled region of code, and it > needs the symbols in order to be able to determine exactly which > areas in a linked binary were compiled with which options. Humm, it would be nice for perf annotate to show those options when one navigates the annotation, something like press some hotkey and see the optimization flags used. Is there any library that gets those annotations and put them in some linked list that we could use in tools/perf/? - Arnaldo > In the course of developing this plugin I encountered various > problems with tools not expecting to find extra symbols in a > binary. Hence I made the symbols local, hidden and with no type. > It was the best I could do to say "ignore these symbols - they > are not meant to be seen by anyone but annobin". > > > > + elf_sym__visibility(sym) != STV_HIDDEN; > > Just to be awkward, if you are going to ignore STV_HIDDEN > symbols then you should probably also ignore STV_INTERNAL ones > as well... Annobin does not generate them, but you never know, > one day some other tool might create some. > > Cheers > Nick > > > -- - Arnaldo