Mark builtins as hot sections using text section prefix in Windows.

This will places builtins in .text$hot code section that is generated by native compiler PGO

Change-Id: I9e66eea99fc9b25cda9d9a9d1f57a0cd43d3a924
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2628595
Commit-Queue: Jakob Gruber <jgruber@chromium.org>
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/master@{#72213}
This commit is contained in:
Hao Xu 2021-01-21 14:45:20 +08:00 committed by Commit Bot
parent 215416763e
commit e5ea57a5a7

View File

@ -566,8 +566,15 @@ int PlatformEmbeddedFileWriterWin::IndentedDataDirective(
#else
// The directives for text section prefix come from the COFF
// (Common Object File Format) standards:
// https://llvm.org/docs/Extensions.html
//
// .text$hot means this section contains hot code.
// x means executable section.
// r means read-only section.
void PlatformEmbeddedFileWriterWin::SectionText() {
fprintf(fp_, ".section .text\n");
fprintf(fp_, ".section .text$hot,\"xr\"\n");
}
void PlatformEmbeddedFileWriterWin::SectionData() {