Commit 5caf7c32 authored by Sebastien Marchand's avatar Sebastien Marchand Committed by Commit Bot

Add a synthetic Finch trial for the segment heap

This synthetic Finch trial will allow measuring the impact that the
segment heap has on performance.

Bug: 1014701
Change-Id: I614f4b94fc11e43878d0d2f16af018490fc170f3
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2283241
Commit-Queue: Sébastien Marchand <sebmarchand@chromium.org>
Reviewed-by: default avatarBruce Dawson <brucedawson@chromium.org>
Reviewed-by: default avatarAlexei Svitkine <asvitkine@chromium.org>
Cr-Commit-Position: refs/heads/master@{#788339}
parent 8db32985
......@@ -45,6 +45,10 @@ if (is_android) {
import("//tools/grit/grit_rule.gni")
}
if (is_win) {
import("//build/config/win/manifest.gni")
}
additional_modules_list_file =
"$root_gen_dir/chrome/browser/internal/additional_modules_list.txt"
......@@ -82,6 +86,9 @@ buildflag_header("buildflags") {
"ENABLE_KALEIDOSCOPE=$enable_kaleidoscope",
"USE_THIN_LTO=$use_thin_lto",
]
if (is_win) {
flags += [ "ENABLE_SEGMENT_HEAP=$enable_segment_heap" ]
}
}
# This proto library is used for non - android NTPs below.
......
......@@ -549,6 +549,22 @@ void ChromeBrowserMainExtraPartsMetrics::PreBrowserStart() {
"Disabled"
#endif
);
// Records whether or not the Segment heap is in use.
#if defined(OS_WIN)
if (base::win::GetVersion() >= base::win::Version::WIN10_20H1) {
ChromeMetricsServiceAccessor::RegisterSyntheticFieldTrial("WinSegmentHeap",
#if BUILDFLAG(ENABLE_SEGMENT_HEAP)
"OptedIn"
#else
"OptedOut"
#endif
);
} else {
ChromeMetricsServiceAccessor::RegisterSyntheticFieldTrial("WinSegmentHeap",
"NotSupported");
}
#endif
}
void ChromeBrowserMainExtraPartsMetrics::PostBrowserStart() {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment