This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] AutoFDO patch for trunk
- From: Dehao Chen <dehao at google dot com>
- To: Markus Trippelsdorf <markus at trippelsdorf dot de>
- Cc: Jan Hubicka <hubicka at ucw dot cz>, GCC Patches <gcc-patches at gcc dot gnu dot org>, David Li <davidxl at google dot com>
- Date: Tue, 21 Oct 2014 13:53:15 -0700
- Subject: Re: [PATCH] AutoFDO patch for trunk
- Authentication-results: sourceware.org; auth=none
- References: <CAO2gOZXmUY4RtO71PB0y2kVf0h2tCY9J8P4cirXnB-_8yDYuNQ at mail dot gmail dot com> <20140515210430 dot GB29194 at kam dot mff dot cuni dot cz> <CAO2gOZVEqf=atkVs8x99b6xoHHEQtFp0m1sDsVAohAEcSpT4MA at mail dot gmail dot com> <20141014150215 dot GA25780 at kam dot mff dot cuni dot cz> <CAO2gOZWLbyp7hiUaRv17t9BmiNL55LHb+b9p_t1GZnxmregAcA at mail dot gmail dot com> <CAO2gOZUGFE2E8b8qGZjpG83grRYmXsHUAN67z6-kstUjB08FxA at mail dot gmail dot com> <20141015142840 dot GB11581 at atrey dot karlin dot mff dot cuni dot cz> <CAO2gOZX7QE6HMxcoemaUtHUGNCz2Yin110fh_uhyvc8L3_HFhg at mail dot gmail dot com> <20141019095826 dot GB14852 at kam dot mff dot cuni dot cz> <CAO2gOZXMF1LHf9DfCc_y3Pbhm2btM0bK8012APDK8ROxLiW6gg at mail dot gmail dot com> <20141021193050 dot GA341 at x4>
Everything will be the same on non-intel CPUs except for the perf command:
perf record -e instructions -- your program.
i.e. you need to drop "-b" and use instructions as event.
Note that the current algorithm is tuned for accurate instruction
level profile, which is not available on non-Intel CPU. But you are
more than welcome to tune the propagation algorithm to get most out of
inaccurate instruction profile.
Cheers,
Dehao
On Tue, Oct 21, 2014 at 12:30 PM, Markus Trippelsdorf
<markus@trippelsdorf.de> wrote:
> On 2014.10.20 at 14:21 -0700, Dehao Chen wrote:
>> >> +If @var{path} is specified, GCC looks at the @var{path} to find
>> >> +the profile feedback data files.
>> >> +
>> >> +In order to collect AutoFDO profile, you need to have:
>> >> +
>> >> +1. A linux system with linux perf support
>> >> +2. An Intel processor with last branch record (LBR) support
>> >
>> > Is it really a requirement or will it only make profiles more accurate?
>>
>> It's optional, updated the doc.
>
> Can you give an example on how this is supposed to work on non Intel
> CPUs? It is not obvious to me.
>
> --
> Markus