Commit 0a354fc7 authored by Maggie Chen's avatar Maggie Chen Committed by Commit Bot

Rename the command line switch for disabling DX12/Vulkan info collection

We no longer collect Vulkan info for UMA at the browser start. Rename
command line switch to DX12 only. This switch is mainly used for testing.

Change --disable-gpu-process-for-dx12-vulkan-info-collection to
--disable-gpu-process-for-dx12-info-collection
and
Change kDisableGpuProcessForDX12VulkanInfoCollection[] to
kDisableGpuProcessForDX12InfoCollection[]

Bug: 775983
Change-Id: Iddbac1fb81cddce16df8910109fba1b6ddfb8089
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2280587Reviewed-by: default avatarZhenyao Mo <zmo@chromium.org>
Reviewed-by: default avatarScott Violet <sky@chromium.org>
Commit-Queue: Maggie Chen <magchen@chromium.org>
Cr-Commit-Position: refs/heads/master@{#787850}
parent e0cc7236
...@@ -302,7 +302,7 @@ class SystemInfoHandlerGpuObserver : public content::GpuDataManagerObserver { ...@@ -302,7 +302,7 @@ class SystemInfoHandlerGpuObserver : public content::GpuDataManagerObserver {
base::CommandLine* command = base::CommandLine::ForCurrentProcess(); base::CommandLine* command = base::CommandLine::ForCurrentProcess();
// Only wait for DX12/Vulkan info if requested at Chrome start up. // Only wait for DX12/Vulkan info if requested at Chrome start up.
if (!command->HasSwitch( if (!command->HasSwitch(
switches::kDisableGpuProcessForDX12VulkanInfoCollection) && switches::kDisableGpuProcessForDX12InfoCollection) &&
command->HasSwitch(switches::kNoDelayForDX12VulkanInfoCollection) && command->HasSwitch(switches::kNoDelayForDX12VulkanInfoCollection) &&
!GpuDataManagerImpl::GetInstance()->IsDx12VulkanVersionAvailable()) !GpuDataManagerImpl::GetInstance()->IsDx12VulkanVersionAvailable())
return; return;
......
...@@ -717,7 +717,7 @@ void GpuDataManagerImplPrivate::RequestGpuSupportedDx12Version(bool delayed) { ...@@ -717,7 +717,7 @@ void GpuDataManagerImplPrivate::RequestGpuSupportedDx12Version(bool delayed) {
base::CommandLine* command_line = base::CommandLine* command_line =
base::CommandLine::ForCurrentProcess(); base::CommandLine::ForCurrentProcess();
if (command_line->HasSwitch( if (command_line->HasSwitch(
switches::kDisableGpuProcessForDX12VulkanInfoCollection)) { switches::kDisableGpuProcessForDX12InfoCollection)) {
manager->UpdateDx12RequestStatus(false); manager->UpdateDx12RequestStatus(false);
return; return;
} }
...@@ -778,14 +778,6 @@ void GpuDataManagerImplPrivate::RequestGpuSupportedVulkanVersion(bool delayed) { ...@@ -778,14 +778,6 @@ void GpuDataManagerImplPrivate::RequestGpuSupportedVulkanVersion(bool delayed) {
if (manager->VulkanRequested()) if (manager->VulkanRequested())
return; return;
base::CommandLine* command_line =
base::CommandLine::ForCurrentProcess();
if (command_line->HasSwitch(
switches::kDisableGpuProcessForDX12VulkanInfoCollection)) {
manager->UpdateVulkanRequestStatus(false);
return;
}
// No info collection for software GL implementation (id == 0xffff) or // No info collection for software GL implementation (id == 0xffff) or
// abnormal situation (id == 0). There are a few crash reports on // abnormal situation (id == 0). There are a few crash reports on
// exit_or_terminate_process() during process teardown. The GPU ID // exit_or_terminate_process() during process teardown. The GPU ID
......
...@@ -362,11 +362,9 @@ void BrowserTestBase::SetUp() { ...@@ -362,11 +362,9 @@ void BrowserTestBase::SetUp() {
disabled_features); disabled_features);
} }
// Always disable the unsandbox GPU process for DX12 and Vulkan Info // Always disable the unsandbox GPU process for DX12 Info collection to avoid
// collection to avoid interference. This GPU process is launched 120 // interference. This GPU process is launched 120 seconds after chrome starts.
// seconds after chrome starts. command_line->AppendSwitch(switches::kDisableGpuProcessForDX12InfoCollection);
command_line->AppendSwitch(
switches::kDisableGpuProcessForDX12VulkanInfoCollection);
// The current global field trial list contains any trials that were activated // The current global field trial list contains any trials that were activated
// prior to main browser startup. That global field trial list is about to be // prior to main browser startup. That global field trial list is about to be
......
...@@ -266,11 +266,9 @@ bool WrapperTestLauncherDelegate::ShouldRunTest( ...@@ -266,11 +266,9 @@ bool WrapperTestLauncherDelegate::ShouldRunTest(
void AppendCommandLineSwitches() { void AppendCommandLineSwitches() {
base::CommandLine* command_line = base::CommandLine::ForCurrentProcess(); base::CommandLine* command_line = base::CommandLine::ForCurrentProcess();
// Always disable the unsandbox GPU process for DX12 and Vulkan Info // Always disable the unsandbox GPU process for DX12 Info collection to avoid
// collection to avoid interference. This GPU process is launched 120 // interference. This GPU process is launched 120 seconds after chrome starts.
// seconds after chrome starts. command_line->AppendSwitch(switches::kDisableGpuProcessForDX12InfoCollection);
command_line->AppendSwitch(
switches::kDisableGpuProcessForDX12VulkanInfoCollection);
} }
} // namespace } // namespace
......
...@@ -132,11 +132,9 @@ void WebTestBrowserMainRunner::Initialize() { ...@@ -132,11 +132,9 @@ void WebTestBrowserMainRunner::Initialize() {
command_line.AppendSwitch( command_line.AppendSwitch(
switches::kDisableBackgroundingOccludedWindowsForTesting); switches::kDisableBackgroundingOccludedWindowsForTesting);
// Always disable the unsandbox GPU process for DX12 and Vulkan Info // Always disable the unsandbox GPU process for DX12 Info collection to avoid
// collection to avoid interference. This GPU process is launched 120 // interference. This GPU process is launched 120 seconds after chrome starts.
// seconds after chrome starts. command_line.AppendSwitch(switches::kDisableGpuProcessForDX12InfoCollection);
command_line.AppendSwitch(
switches::kDisableGpuProcessForDX12VulkanInfoCollection);
#if BUILDFLAG(ENABLE_PLUGINS) #if BUILDFLAG(ENABLE_PLUGINS)
bool ppapi_ok = ppapi::RegisterBlinkTestPlugin(&command_line); bool ppapi_ok = ppapi::RegisterBlinkTestPlugin(&command_line);
...@@ -217,11 +215,9 @@ void WebTestBrowserMainRunner::Initialize() { ...@@ -217,11 +215,9 @@ void WebTestBrowserMainRunner::Initialize() {
// Enable the deprecated WebAuthn Mojo Testing API. // Enable the deprecated WebAuthn Mojo Testing API.
command_line.AppendSwitch(switches::kEnableWebAuthDeprecatedMojoTestingApi); command_line.AppendSwitch(switches::kEnableWebAuthDeprecatedMojoTestingApi);
// Always disable the unsandbox GPU process for DX12 and Vulkan Info // Always disable the unsandbox GPU process for DX12 Info collection to avoid
// collection to avoid interference. This GPU process is launched 120 // interference. This GPU process is launched 120 seconds after chrome starts.
// seconds after chrome starts. command_line.AppendSwitch(switches::kDisableGpuProcessForDX12InfoCollection);
command_line.AppendSwitch(
switches::kDisableGpuProcessForDX12VulkanInfoCollection);
#if defined(OS_WIN) || defined(OS_MACOSX) || defined(OS_LINUX) #if defined(OS_WIN) || defined(OS_MACOSX) || defined(OS_LINUX)
content::WebTestBrowserPlatformInitialize(); content::WebTestBrowserPlatformInitialize();
......
...@@ -34,9 +34,9 @@ const char kIgnoreGpuBlacklist[] = "ignore-gpu-blacklist"; ...@@ -34,9 +34,9 @@ const char kIgnoreGpuBlacklist[] = "ignore-gpu-blacklist";
// devices. // devices.
const char kShaderDiskCacheSizeKB[] = "shader-disk-cache-size-kb"; const char kShaderDiskCacheSizeKB[] = "shader-disk-cache-size-kb";
// Disables the non-sandboxed GPU process for DX12 and Vulkan info collection // Disables the non-sandboxed GPU process for DX12 info collection
const char kDisableGpuProcessForDX12VulkanInfoCollection[] = const char kDisableGpuProcessForDX12InfoCollection[] =
"disable-gpu-process-for-dx12-vulkan-info-collection"; "disable-gpu-process-for-dx12-info-collection";
const char kEnableUnsafeWebGPU[] = "enable-unsafe-webgpu"; const char kEnableUnsafeWebGPU[] = "enable-unsafe-webgpu";
......
...@@ -16,7 +16,7 @@ GPU_EXPORT extern const char kGpuDriverBugListTestGroup[]; ...@@ -16,7 +16,7 @@ GPU_EXPORT extern const char kGpuDriverBugListTestGroup[];
GPU_EXPORT extern const char kGpuPreferences[]; GPU_EXPORT extern const char kGpuPreferences[];
GPU_EXPORT extern const char kIgnoreGpuBlacklist[]; GPU_EXPORT extern const char kIgnoreGpuBlacklist[];
GPU_EXPORT extern const char kShaderDiskCacheSizeKB[]; GPU_EXPORT extern const char kShaderDiskCacheSizeKB[];
GPU_EXPORT extern const char kDisableGpuProcessForDX12VulkanInfoCollection[]; GPU_EXPORT extern const char kDisableGpuProcessForDX12InfoCollection[];
GPU_EXPORT extern const char kEnableUnsafeWebGPU[]; GPU_EXPORT extern const char kEnableUnsafeWebGPU[];
GPU_EXPORT extern const char kEnableDawnBackendValidation[]; GPU_EXPORT extern const char kEnableDawnBackendValidation[];
GPU_EXPORT extern const char kUseHighGPUThreadPriorityForPerfTests[]; GPU_EXPORT extern const char kUseHighGPUThreadPriorityForPerfTests[];
......
...@@ -233,7 +233,7 @@ bool HeadlessContentMainDelegate::BasicStartupComplete(int* exit_code) { ...@@ -233,7 +233,7 @@ bool HeadlessContentMainDelegate::BasicStartupComplete(int* exit_code) {
#if defined(OS_WIN) #if defined(OS_WIN)
command_line->AppendSwitch( command_line->AppendSwitch(
::switches::kDisableGpuProcessForDX12VulkanInfoCollection); ::switches::kDisableGpuProcessForDX12InfoCollection);
#endif #endif
content::Profiling::ProcessStarted(); content::Profiling::ProcessStarted();
......
...@@ -110,7 +110,7 @@ class PerfBenchmark(benchmark.Benchmark): ...@@ -110,7 +110,7 @@ class PerfBenchmark(benchmark.Benchmark):
# skip this gpu process for all perf tests to prevent any interference # skip this gpu process for all perf tests to prevent any interference
# with the test results. # with the test results.
browser_options.AppendExtraBrowserArgs( browser_options.AppendExtraBrowserArgs(
'--disable-gpu-process-for-dx12-vulkan-info-collection') '--disable-gpu-process-for-dx12-info-collection')
self.SetExtraBrowserOptions(browser_options) self.SetExtraBrowserOptions(browser_options)
......
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