This is an archive of the discontinued LLVM Phabricator instance.

[SampleFDO] Set ProfileIsFS bit properly in extbinary format from the internal option
ClosedPublic

Authored by xur on Aug 25 2021, 8:35 AM.

Details

Summary

We have "-profile-isfs" internal option for text, binary, and compactbinary format (mostly for debug and test purpose).
We need to set the related flag in FunctionSamples so that ProfileIsFS is written to the header in extbinary format.

Diff Detail

Event Timeline

xur created this revision.Aug 25 2021, 8:35 AM
xur requested review of this revision.Aug 25 2021, 8:35 AM
Herald added a project: Restricted Project. · View Herald TranscriptAug 25 2021, 8:35 AM
wenlei accepted this revision.Aug 25 2021, 8:53 AM
This revision is now accepted and ready to land.Aug 25 2021, 8:53 AM

Thanks Wenlei for the fast response!

-Rong

This revision was landed with ongoing or failed builds.Aug 25 2021, 9:17 AM
This revision was automatically updated to reflect the committed changes.
xur added a comment.Sep 16 2021, 2:41 PM

Wenlei / Hongtao / Lei,

Wei committed the FSAFDO tool part of change to GitHub yesterday. Sorry for
taking so long.

I'm wondering if you can port the change to llvm-profgen and do some
experiments with FSAFDO. Let me know if there anything that I can help with.

Best regards,

-Rong

MaskRay added inline comments.
llvm/lib/ProfileData/SampleProfReader.cpp
254

Writes to the static data member ProfileIsFS is racy: ThinLTO may creates multiple InProcessThinBackend instances and backends may run the code concurrently.