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