On Sat, Oct 6, 2012 at 6:13 PM, Andi Kleen <a...@firstfloor.org> wrote: > Jan Hubicka <hubi...@ucw.cz> writes: >> >> I think it is useful feature, yes (and was in my TODO list for quite some >> time). Unlike edge profiles, these profiles should be also more independent >> of >> source code/configuration changes. > > It would be good to look at the tool, but:
Thanks a lot for the interests and feedback. > > - Does it use the perf LBR support to estimate the last 16 basic blocks > for each sample? Yes, it uses LBR to calculate binary level profile. > > - It doesn't seem to use callgraphs for estimating common indirect calls > for devirtualization? At this phase, VPT is not supported, but will definitely support later. > > I always disliked the limitation of the current indirect call profiling > to only support a single translation unit. Using callgraphs around > that would be quite nice. You can take a look at LIPO, which supports multiple indirect call targets. But yes, LBR can give us complete indirect call histogram for each callsite, and almost for free. We'll use that to drive indirect call promotion. Currently, open-sourcing the tool to generate profile data file seemed more work than rewriting it because it has some internal dependencies. My plan is to integrate it as part of perf, i.e. one can use perf to get .afdo file directly. We'll try to make this happen soon and make into the gcc 4.9 release schedule. Cheers, Dehao > > This would only work for non tail calls and with frame pointers, or > using LBRs again. > > -Andi > > -- > a...@linux.intel.com -- Speaking for myself only