Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(326)

Unified Diff: gpu/command_buffer/service/cmd_parser.cc

Issue 554783002: Log command name with GPU parse errors. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | gpu/command_buffer/service/gpu_scheduler.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gpu/command_buffer/service/cmd_parser.cc
diff --git a/gpu/command_buffer/service/cmd_parser.cc b/gpu/command_buffer/service/cmd_parser.cc
index 65abc71f63c2e05d00e55c2213a170589bc52bdf..2c6d41d16a30da36edc158a6f4995bfa60c68fd8 100644
--- a/gpu/command_buffer/service/cmd_parser.cc
+++ b/gpu/command_buffer/service/cmd_parser.cc
@@ -51,12 +51,12 @@ error::Error CommandParser::ProcessCommand() {
CommandHeader header = buffer_[get].value_header;
if (header.size == 0) {
- DVLOG(1) << "Error: zero sized command in command buffer";
+ LOG(ERROR) << "Parse error: zero sized command in command buffer";
return error::kInvalidSize;
}
if (static_cast<int>(header.size) + get > entry_count_) {
- DVLOG(1) << "Error: get offset out of bounds";
+ LOG(ERROR) << "Parse error: get offset out of bounds";
return error::kOutOfBounds;
}
@@ -66,9 +66,6 @@ error::Error CommandParser::ProcessCommand() {
error::Error result = handler_->DoCommand(
header.command, header.size - 1, buffer_ + get);
- // TODO(gman): If you want to log errors this is the best place to catch them.
- // It seems like we need an official way to turn on a debug mode and
- // get these errors.
if (error::IsError(result)) {
ReportError(header.command, result);
}
@@ -82,8 +79,8 @@ error::Error CommandParser::ProcessCommand() {
void CommandParser::ReportError(unsigned int command_id,
error::Error result) {
- DVLOG(1) << "Error: " << result << " for Command "
- << handler_->GetCommandName(command_id);
+ LOG(ERROR) << "Error: " << result << " for Command "
+ << handler_->GetCommandName(command_id);
}
// Processes all the commands, while the buffer is not empty. Stop if an error
« no previous file with comments | « no previous file | gpu/command_buffer/service/gpu_scheduler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698