diff options
Diffstat (limited to 'intern/cycles/device/queue.cpp')
-rw-r--r-- | intern/cycles/device/queue.cpp | 21 |
1 files changed, 11 insertions, 10 deletions
diff --git a/intern/cycles/device/queue.cpp b/intern/cycles/device/queue.cpp index de65047ed6a..cc0cf0ccf84 100644 --- a/intern/cycles/device/queue.cpp +++ b/intern/cycles/device/queue.cpp @@ -19,7 +19,7 @@ DeviceQueue::DeviceQueue(Device *device) DeviceQueue::~DeviceQueue() { - if (VLOG_IS_ON(3)) { + if (VLOG_DEVICE_STATS_IS_ON) { /* Print kernel execution times sorted by time. */ vector<pair<DeviceKernelMask, double>> stats_sorted; for (const auto &stat : stats_kernel_time_) { @@ -32,17 +32,18 @@ DeviceQueue::~DeviceQueue() return a.second > b.second; }); - VLOG(3) << "GPU queue stats:"; + VLOG_DEVICE_STATS << "GPU queue stats:"; for (const auto &[mask, time] : stats_sorted) { - VLOG(3) << " " << std::setfill(' ') << std::setw(10) << std::fixed << std::setprecision(5) - << std::right << time << "s: " << device_kernel_mask_as_string(mask); + VLOG_DEVICE_STATS << " " << std::setfill(' ') << std::setw(10) << std::fixed + << std::setprecision(5) << std::right << time + << "s: " << device_kernel_mask_as_string(mask); } } } void DeviceQueue::debug_init_execution() { - if (VLOG_IS_ON(3)) { + if (VLOG_DEVICE_STATS_IS_ON) { last_sync_time_ = time_dt(); } @@ -51,9 +52,9 @@ void DeviceQueue::debug_init_execution() void DeviceQueue::debug_enqueue(DeviceKernel kernel, const int work_size) { - if (VLOG_IS_ON(3)) { - VLOG(4) << "GPU queue launch " << device_kernel_as_string(kernel) << ", work_size " - << work_size; + if (VLOG_DEVICE_STATS_IS_ON) { + VLOG_DEVICE_STATS << "GPU queue launch " << device_kernel_as_string(kernel) << ", work_size " + << work_size; } last_kernels_enqueued_ |= (uint64_t(1) << (uint64_t)kernel); @@ -61,10 +62,10 @@ void DeviceQueue::debug_enqueue(DeviceKernel kernel, const int work_size) void DeviceQueue::debug_synchronize() { - if (VLOG_IS_ON(3)) { + if (VLOG_DEVICE_STATS_IS_ON) { const double new_time = time_dt(); const double elapsed_time = new_time - last_sync_time_; - VLOG(4) << "GPU queue synchronize, elapsed " << std::setw(10) << elapsed_time << "s"; + VLOG_DEVICE_STATS << "GPU queue synchronize, elapsed " << std::setw(10) << elapsed_time << "s"; stats_kernel_time_[last_kernels_enqueued_] += elapsed_time; |