This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: AutoFDO profile toolchain is open-sourced


On Tue, Apr 21, 2015 at 6:33 AM, Ilya Palachev <i.palachev@samsung.com> wrote:
> ping?
>
> On 15.04.2015 10:41, Ilya Palachev wrote:
>>
>> Hi,
>>
>> One more question.
>>
> Does anybody know with which options should the perf be executed so that to
> collect appropriate data for the autofdo converter?

>From the autofdo page: https://github.com/google/autofdo

[ ... ]
Inputs:

--profile: PERF_PROFILE collected using linux perf (with last branch record).
In order to collect this profile, you will need to have an Intel CPU that
have last branch record (LBR) support. You also need to have your linux
kernel configured with LBR support. To profile:
# perf record -c PERIOD -e EVENT -b -o perf.data -- ./command
EVENT is refering to BR_INST_RETIRED:TAKEN if available. For some
architectures, BR_INST_EXEC:TAKEN also works.
[ ... ]

The important one for autofdo is -b. It asks perf to use LBR registers
for branch tracking (assuming your architecture supports it).

The binary you run under perf should also have line table information
(compiled with -gmlt) to produce location support for autofdo.


Diego.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]