Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp2611025imm; Tue, 4 Sep 2018 07:19:30 -0700 (PDT) X-Google-Smtp-Source: ANB0Vdab9loQHS9cyUKwklIeJmiOcafNhkWwZxvkNt3/9JTWF5oY51eSGAP7E2+n/q+OICG0PxBi X-Received: by 2002:a62:8f90:: with SMTP id n138-v6mr1244881pfd.260.1536070770477; Tue, 04 Sep 2018 07:19:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1536070770; cv=none; d=google.com; s=arc-20160816; b=jHFbG44yv7Tc+i8RIIjocUgz8WOkSj25LzdyGEUWSXZ1rezcKOhK5Yno8R9Ko/Zq4U 88ukqYrDI7/g2/cXbfnH5vtDrmdZL3SUfbSrLMqX3ceWX2ovAD0eIbrDsatYoc1KbIu+ 8k0WQvoIyECKnfg9zjpf23GJdDxsuLfaWCN9WgWLUiB5vjpiLhm7Le7Li3OlU0JlWeyN B1VIZeikCUFSGFo6EoAgsEM1CcFNlHKMZLvCzKq/QMHllxIE1JN+0NwHmtktgfIK4iTg mYkMclyU9mZRZlCGrAQg9o4O0ZjtaCBdvBVwW0Qgq2xZa8YY4Z0I+foE9HVXzR97RhWa RcOQ== 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:arc-authentication-results; bh=X3s6ZZAWkRG494coXvB1HdqsHsZRoEADTyeE6lXMh9I=; b=aiXFlfBpapAWih28SZM1VHEFzLj4LIvK595UzR7m506TEeP85/s8tH1ptTQ1jenrHy /wuxj4s8wgez/P7mkD3a/wY4KuxE8msewWxcb/wl6aHBa0JAfZcTGIZ4H1tz8qqGxgeH AXbqQ0Gd1SO+zjdpLBuThNYdqrjsMfScgAXN7uQpWGUft5sIDDAuZNTkEq19Gew6t+dD mrCqZUWQKsgxitrGDqNz8/RCPKVJsVx11pDFt7kyYPw516I5Z1kJ3knmgr6jitMCuXcv d23MH5Y7Pf8CP2xr0H8LFYaa0YeAtreQvrgycDKGCR/C5ququhkaOGT8pQoje7AQyh95 6DXQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@infradead.org header.s=bombadil.20170209 header.b=Euzsso2q; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id e10-v6si23838061pln.161.2018.09.04.07.19.14; Tue, 04 Sep 2018 07:19:30 -0700 (PDT) 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=fail header.i=@infradead.org header.s=bombadil.20170209 header.b=Euzsso2q; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727520AbeIDSmp (ORCPT + 99 others); Tue, 4 Sep 2018 14:42:45 -0400 Received: from bombadil.infradead.org ([198.137.202.133]:49580 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727136AbeIDSmp (ORCPT ); Tue, 4 Sep 2018 14:42:45 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20170209; h=In-Reply-To:Content-Type:MIME-Version :References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=X3s6ZZAWkRG494coXvB1HdqsHsZRoEADTyeE6lXMh9I=; b=Euzsso2qSbBlHbc2FsW7smmZ4 hFWYo1oqrZYzr3bDqmZdCYHNNhtrSbAZIL9OSUoQAyCr14veypaYW0bWmP/KSYMwdVNSL1PvMk35w TtNoncKLy0sDhu3mKnUdvFUgVvrUtJHtbR5p3v9ezbuDgy2X/dt17igKSMV+SJNZnzFPGUCKIvrfe fhwKVwwDlrhgo8rhQpssksSSzW8maVhvDIqZREwX69zUR/71939tAwYjcQSDv6t1DpnjBe14AoR7h qyjJeRx2H0Kf7jzaKXs7qr7JooHS+Jpuh3XiBNx89xSKy9KC8anzgi5bUW6qg4M33UZJNUL/HqZf9 wXBoWWhwA==; Received: from j217100.upc-j.chello.nl ([24.132.217.100] helo=hirez.programming.kicks-ass.net) by bombadil.infradead.org with esmtpsa (Exim 4.90_1 #2 (Red Hat Linux)) id 1fxC90-0000ib-CS; Tue, 04 Sep 2018 14:17:26 +0000 Received: by hirez.programming.kicks-ass.net (Postfix, from userid 1000) id DDD50202AFE0C; Tue, 4 Sep 2018 16:17:24 +0200 (CEST) Date: Tue, 4 Sep 2018 16:17:24 +0200 From: Peter Zijlstra To: Arnaldo Carvalho de Melo Cc: Stephane Eranian , Jiri Olsa , Jiri Olsa , LKML , Namhyung Kim Subject: Re: [RFC] perf tool improvement requests Message-ID: <20180904141724.GJ24124@hirez.programming.kicks-ass.net> References: <20180904071049.GY24124@hirez.programming.kicks-ass.net> <20180904134218.GA5364@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180904134218.GA5364@kernel.org> User-Agent: Mutt/1.10.0 (2018-05-17) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Sep 04, 2018 at 10:42:18AM -0300, Arnaldo Carvalho de Melo wrote: > Then I need to get the DW_AT_location stuff parsed in pahole, so > that with those offsets (second column, ending with :) with hits (first > column, there its local period, but we can ask for some specific metric > [1]), I'll be able to figure out what DW_TAG_variable or > DW_TAG_formal_parameter is living there at that time, get the offset > from the decoded instruction, say that xor, 0x138 offset from the type > for %r15 at that offset (85) from kmem_cache_alloc, right? I'm not sure how the DWARF location stuff works; it could be it already includes the offset and decoding the instruction is not needed. But yes, that's the basic idea; get DWARF to tell you what variable is used at a certain IP. > In a first milestone we'd have something like: > > perf annotate --hits function | pahole --annotate -C task_struct > > perf annotate --hits | pahole --annotate Not sure keeping it two proglets makes sense, but whatever :-) The alternative I suppose is making perf do the IP->struct::member mapping and freed that to pahole, which then only uses it to annotate the output. Or, munge the entirety of pahole into perf..