[gpu] Add GL performance log suppression
Suppress GL_DEBUG_TYPE_PERFORMANCE log messages for web tests that can get sent to the JS console and cause unnecessary test failures due to test output log expectation comparisons. Tested by removing suppressions for tests due to such failures in PS5 and adding mac-skia-alt-arm64-blink-rel bot. Bug: 374090995 Change-Id: Id211e17e0f92f29af2faaadb9f806323162d9437 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6018367 Commit-Queue: Saifuddin Hitawala <hitawala@chromium.org> Reviewed-by: Vasiliy Telezhnikov <vasilyt@chromium.org> Reviewed-by: Kyle Charbonneau <kylechar@chromium.org> Reviewed-by: Dave Tapuska <dtapuska@chromium.org> Cr-Commit-Position: refs/heads/main@{#1382695}
This commit is contained in:

committed by
Chromium LUCI CQ

parent
1989a59ce8
commit
e608efe630
content
gpu
@ -290,6 +290,7 @@ static const char* const kSwitchNames[] = {
|
||||
switches::kUseGpuInTests,
|
||||
switches::kWatchDirForScrollJankReport,
|
||||
switches::kWebViewDrawFunctorUsesVulkan,
|
||||
switches::kSuppressPerformanceLogs,
|
||||
#if BUILDFLAG(IS_MAC)
|
||||
sandbox::policy::switches::kEnableSandboxLogging,
|
||||
sandbox::policy::switches::kDisableMetalShaderCache,
|
||||
|
@ -284,6 +284,11 @@ void WebTestBrowserMainRunner::Initialize() {
|
||||
// We want stable/baseline results when running web tests.
|
||||
command_line.AppendSwitch(switches::kDisableSkiaRuntimeOpts);
|
||||
|
||||
// Suppress GL_DEBUG_TYPE_PERFORMANCE log messages that can get sent to the JS
|
||||
// console and cause unnecessary test failures due test output log expectation
|
||||
// comparisons.
|
||||
command_line.AppendSwitch(switches::kSuppressPerformanceLogs);
|
||||
|
||||
command_line.AppendSwitch(switches::kDisallowNonExactResourceReuse);
|
||||
|
||||
// Always run with fake media devices.
|
||||
|
@ -417,7 +417,13 @@ void LogGLDebugMessage(GLenum source,
|
||||
const GLchar* message,
|
||||
Logger* error_logger) {
|
||||
std::string id_string = GLES2Util::GetStringEnum(id);
|
||||
if (type == GL_DEBUG_TYPE_ERROR && source == GL_DEBUG_SOURCE_API) {
|
||||
// Suppresses GL_DEBUG_TYPE_PERFORMANCE log messages for web tests that can
|
||||
// get sent to the JS console and cause unnecessary test failures due test
|
||||
// output log expectation comparisons.
|
||||
if (type == GL_DEBUG_TYPE_PERFORMANCE &&
|
||||
error_logger->SuppressPerformanceLogs()) {
|
||||
return;
|
||||
} else if (type == GL_DEBUG_TYPE_ERROR && source == GL_DEBUG_SOURCE_API) {
|
||||
error_logger->LogMessage(__FILE__, __LINE__,
|
||||
" " + id_string + ": " + message);
|
||||
} else {
|
||||
|
@ -24,6 +24,9 @@ Logger::Logger(const DebugMarkerManager* debug_marker_manager,
|
||||
Logger* this_temp = this;
|
||||
this_in_hex_ = std::string("GroupMarkerNotSet(crbug.com/242999)!:") +
|
||||
base::HexEncode(&this_temp, sizeof(this_temp));
|
||||
suppress_performance_logs_ =
|
||||
base::CommandLine::ForCurrentProcess()->HasSwitch(
|
||||
switches::kSuppressPerformanceLogs);
|
||||
}
|
||||
|
||||
Logger::~Logger() = default;
|
||||
@ -55,5 +58,9 @@ const std::string& Logger::GetLogPrefix() const {
|
||||
return prefix.empty() ? this_in_hex_ : prefix;
|
||||
}
|
||||
|
||||
bool Logger::SuppressPerformanceLogs() const {
|
||||
return suppress_performance_logs_;
|
||||
}
|
||||
|
||||
} // namespace gles2
|
||||
} // namespace gpu
|
||||
|
@ -38,6 +38,7 @@ class GPU_GLES2_EXPORT Logger {
|
||||
|
||||
void LogMessage(const char* filename, int line, const std::string& msg);
|
||||
const std::string& GetLogPrefix() const;
|
||||
bool SuppressPerformanceLogs() const;
|
||||
|
||||
// Defaults to true. Set to false for the gpu_unittests as they
|
||||
// are explicitly checking errors are generated and so don't need the numerous
|
||||
@ -56,6 +57,7 @@ class GPU_GLES2_EXPORT Logger {
|
||||
int log_message_count_;
|
||||
bool log_synthesized_gl_errors_;
|
||||
bool disable_gl_error_limit_;
|
||||
bool suppress_performance_logs_;
|
||||
};
|
||||
|
||||
} // namespace gles2
|
||||
|
@ -168,4 +168,9 @@ const char kUseRedistributableDirectML[] = "use-redist-dml";
|
||||
const char kEnableGpuMainTimeKeeperMetrics[] =
|
||||
"enable-gpu-main-time-keeper-metrics";
|
||||
|
||||
// Suppresses GL_DEBUG_TYPE_PERFORMANCE log messages for web tests that can get
|
||||
// sent to the JS console and cause unnecessary test failures due test output
|
||||
// log expectation comparisons.
|
||||
const char kSuppressPerformanceLogs[] = "suppress-performance-logs";
|
||||
|
||||
} // namespace switches
|
||||
|
@ -57,6 +57,7 @@ GPU_EXPORT extern const char kDisableSkiaGraphitePrecompilation[];
|
||||
GPU_EXPORT extern const char kEnableSkiaGraphitePrecompilation[];
|
||||
GPU_EXPORT extern const char kUseRedistributableDirectML[];
|
||||
GPU_EXPORT extern const char kEnableGpuMainTimeKeeperMetrics[];
|
||||
GPU_EXPORT extern const char kSuppressPerformanceLogs[];
|
||||
|
||||
} // namespace switches
|
||||
|
||||
|
Reference in New Issue
Block a user