[Logging] Added ability to disable GPU related logs
This commit is contained in:
@@ -55,7 +55,7 @@ DEFINE_bool(flush_log, true, "Flush log file after each log line batch.",
|
||||
|
||||
DEFINE_uint32(log_mask, 0,
|
||||
"Disables specific categorizes for more granular debug logging. "
|
||||
"Kernel = 1, Apu = 2, Cpu = 4.",
|
||||
"Kernel = 1, Apu = 2, Cpu = 4, Gpu = 8.",
|
||||
"Logging");
|
||||
|
||||
DEFINE_int32(
|
||||
|
||||
@@ -38,12 +38,7 @@ enum class LogLevel {
|
||||
|
||||
// bitmasks!
|
||||
namespace LogSrc {
|
||||
enum : uint32_t {
|
||||
Uncategorized = 0,
|
||||
Kernel = 1,
|
||||
Apu = 2,
|
||||
Cpu = 4,
|
||||
};
|
||||
enum : uint32_t { Uncategorized = 0, Kernel = 1, Apu = 2, Cpu = 4, Gpu = 8 };
|
||||
}
|
||||
|
||||
class LogSink {
|
||||
@@ -214,8 +209,8 @@ void XELOGAPU(std::string_view format, const Args&... args) {
|
||||
|
||||
template <typename... Args>
|
||||
void XELOGGPU(std::string_view format, const Args&... args) {
|
||||
xe::logging::AppendLogLineFormat(xe::LogSrc::Uncategorized,
|
||||
xe::LogLevel::Debug, 'G', format, args...);
|
||||
xe::logging::AppendLogLineFormat(xe::LogSrc::Gpu, xe::LogLevel::Debug, 'G',
|
||||
format, args...);
|
||||
}
|
||||
|
||||
template <typename... Args>
|
||||
|
||||
@@ -774,8 +774,8 @@ void CommandProcessor::MakeCoherent() {
|
||||
}
|
||||
|
||||
// TODO(benvanik): notify resource cache of base->size and type.
|
||||
XELOGD("Make {:08X} -> {:08X} ({}b) coherent, action = {}", base_host,
|
||||
base_host + size_host, size_host, action);
|
||||
XELOGGPU("Make {:08X} -> {:08X} ({}b) coherent, action = {}", base_host,
|
||||
base_host + size_host, size_host, action);
|
||||
|
||||
// Mark coherent.
|
||||
regs_volatile[XE_GPU_REG_COHER_STATUS_HOST] = 0;
|
||||
|
||||
Reference in New Issue
Block a user