Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753918AbbLIK6P (ORCPT ); Wed, 9 Dec 2015 05:58:15 -0500 Received: from casper.infradead.org ([85.118.1.10]:43726 "EHLO casper.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753010AbbLIK6N (ORCPT ); Wed, 9 Dec 2015 05:58:13 -0500 Date: Wed, 9 Dec 2015 11:58:09 +0100 From: Peter Zijlstra To: Jiri Olsa Cc: Yunlong Song , dzickus@redhat.com, dsahern@gmail.com, fweisbec@gmail.com, jmario@redhat.com, efault@gmx.de, paulus@samba.org, rfowles@redhat.com, eranian@google.com, "acme@kernel.org >> Arnaldo Carvalho de Melo" , mingo@redhat.com, Linux Kernel Mailing List , Jiri Olsa , "wangnan0@huawei.com >> Wang Nan" , fowles@inreach.com, Namhyung Kim , andi@firstfloor.org Subject: Re: [Questions] perf c2c: What's the current status of perf c2c? Message-ID: <20151209105809.GE6373@twins.programming.kicks-ass.net> References: <5667A8D4.4090601@huawei.com> <20151209080440.GA17211@krava.brq.redhat.com> <20151209093402.GM6356@twins.programming.kicks-ass.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20151209093402.GM6356@twins.programming.kicks-ass.net> User-Agent: Mutt/1.5.21 (2012-12-30) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1373 Lines: 32 On Wed, Dec 09, 2015 at 10:34:02AM +0100, Peter Zijlstra wrote: > Which we can imagine could result in code like: > > foobar: > mov (%rax), %rax # load bar::foo > mov (%rax,1,4), %rax # load foo::val > > > And DWARFs should know this, so by knowing the instruction we can know > which load missed the cache. > > Once you have this information, you can use pahole like structure output > and heat colour them or whatnot. Bright red if you miss lots etc.. > > Now currently this is possible but a bit of work because the DWARF > annotations are not exactly following these data types, that is you > might need to decode previous instructions and infer some bits. To clarify, current DWARFs might only know the argument to foobar is of type struct bar *, and we'll have to infer the rest. > I think Stephane was working with GCC people to allow more/better DWARF > annotations and allow easier retrieval of this information. And even if that gets sorted, it might still make sense to implement the hard case as per the above, because it'll take a long time before everything is build with the fancy new GCC/dwarf output. -- 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/