From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753306AbbFVPyP (ORCPT ); Mon, 22 Jun 2015 11:54:15 -0400 Received: from mail.kernel.org ([198.145.29.136]:46633 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752142AbbFVPx4 (ORCPT ); Mon, 22 Jun 2015 11:53:56 -0400 Date: Mon, 22 Jun 2015 12:53:49 -0300 From: Arnaldo Carvalho de Melo To: Hou Pengyang Cc: Ingo Molnar , "Wangnan (F)" , mingo@redhat.com, namhyung@kernel.org, a.p.zijlstra@chello.nl, linux-kernel@vger.kernel.org Subject: Re: [RFC] perf report: introduce --map-anon-mem for anon-executable-memory symbols parsing Message-ID: <20150622155349.GG13937@kernel.org> References: <1434636076-13502-1-git-send-email-houpengyang@huawei.com> <5583E088.6080202@huawei.com> <20150619104214.GA3298@gmail.com> <55882825.3030804@huawei.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <55882825.3030804@huawei.com> X-Url: http://acmel.wordpress.com User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Em Mon, Jun 22, 2015 at 11:22:13PM +0800, Hou Pengyang escreveu: > On 2015/6/19 18:42, Ingo Molnar wrote: > > > >* Wangnan (F) wrote: > > > >>On 2015/6/18 22:01, Hou Pengyang wrote: > >>>This patch introduces a --map-anon-mem argument to perf report to deal > >>>with anon-executable-memory symbol parsing. > >> > >>--map-anon-mem is not a good name. The user defined map area list > >>introduced in this patch can be used on not only anon mapping but > >>also file mapping. > > > >Yeah, so quirky options generally suck and only 0.01% of the users will use it. > >It's in a way worse than not having this code, because we'll have to maintain it, > >but it won't be used. > > > >Is there a way to auto-detect 'executable anon mappings' (perhaps by generating an > >MMAP event with some extra bit set, or a new MMAP event?) so that it's all > >seemless? > > > I think it not difficult to generate such MMAP event, just like : > > 0 435090424309600 0x3e0 [0x68]: PERF_RECORD_MMAP2 > 788/788:[0x7f946c0000(0x4000) @ 0x7f946c0000 00:00 0 0]: ---p //anon > > But for symbol parsing, this is not enough. For such mmap area, perf > doesn't know the path of '.so/.o', which is necessarcy for symbol- > parsing. So we need to tell perf the relationship between the .so file and > the mmap range explicitly. What is done to provide maps for JIT is detailed at: tools/perf/Documentation/jit-interface.txt Are you sure that can't be used for you guys? Its already automagically done, you just have to provide a file for that pid with the mappings. Sure, it is not for ELF, but that could be easily done, just autodetect the map type. - Arnaldo > Thanks, > Hou > > >The user should not be required to know about such details! > > > >Thanks, > > > > Ingo > >-- > >To unsubscribe from this list: send the line "unsubscribe linux-kernel" in > >the body of a message to majordomo@vger.kernel.org > >More majordomo info at http://vger.kernel.org/majordomo-info.html > >Please read the FAQ at http://www.tux.org/lkml/ > > > > > -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in Please read the FAQ at http://www.tux.org/lkml/