Add basic clang-based AFDO support.
This patch adds support for clang-based AFDO to Chromium. AFDO stands for Automatic Feedback Directed Optimization. In short, it allows you to use the postprocessed output of a special `perf` command to inform the compiler of hot/cold code, among other things. This allows users to easily specify a profile to use, and allows for platforms to specify default profiles. It turns none of this on on its own. At the moment, this is very sharp and pointy, since the sample profile isn't a dependency for anything. Ideally, anything built with AFDO should depend on the profile. I have a CL to make this easily possible (CL:827560), but think this is useful enough (given care) to get in now. (and with clang_use_default_sample_profile set to true). We built with profiles and failed to `gn gen`, respectively. Patch seemed to be a nop running on an otherwise "regular" build. Bug: 794750 Test: Ran the build with and without clang_default_afdo_profile defined Change-Id: I7b2730d52875f108681232f4d8ce7e82e7570a74 Reviewed-on: https://chromium-review.googlesource.com/828277Reviewed-by:agrieve <agrieve@chromium.org> Commit-Queue: George Burgess <gbiv@chromium.org> Cr-Commit-Position: refs/heads/master@{#524620}
Showing
Please register or sign in to comment