This is an archive of the discontinued LLVM Phabricator instance.

[PGO] Add support for profile dumping dir relocation
AcceptedPublic

Authored by davidxl on Aug 12 2017, 1:54 PM.

Details

Reviewers
vsk
xur
Summary

This patch adds support in profile runtime to allow user change the root directory of the profile. It uses a machanism compatible to libgcc: GCOV_PREFIX and GCOV_PREFIX_STRIP.

It also helps users to easily migrate to use LLVM PGO.

Diff Detail

Event Timeline

davidxl created this revision.Aug 12 2017, 1:54 PM
vsk edited edge metadata.Aug 14 2017, 12:21 AM

Lgtm, although I think the line-wrapping on the added RUN lines needs to be corrected.

xur edited edge metadata.Aug 14 2017, 9:07 AM

Lgtm.

lib/profile/InstrProfilingFile.c
524

Nit: the call is sunk to the branch, why not getting rid of SelectPat and PNS variable?
Also to the third calls.

davidxl updated this revision to Diff 111007.Aug 14 2017, 9:32 AM

Addressed review feedback.

xur accepted this revision.Aug 14 2017, 6:45 PM
This revision is now accepted and ready to land.Aug 14 2017, 6:45 PM