Cycles: Report system memory usage and peak after scene device update
This only happens when built with WITH_CYCLES_DEBUG flag, memory statistics is coming from guarded STL allocator.
This commit is contained in:
@@ -36,6 +36,11 @@
|
||||
#include "util_foreach.h"
|
||||
#include "util_progress.h"
|
||||
|
||||
#ifdef WITH_CYCLES_DEBUG
|
||||
# include "util_guarded_allocator.h"
|
||||
# include "util_logging.h"
|
||||
#endif
|
||||
|
||||
CCL_NAMESPACE_BEGIN
|
||||
|
||||
Scene::Scene(const SceneParams& params_, const DeviceInfo& device_info_)
|
||||
@@ -239,6 +244,12 @@ void Scene::device_update(Device *device_, Progress& progress)
|
||||
progress.set_status("Updating Device", "Writing constant memory");
|
||||
device->const_copy_to("__data", &dscene.data, sizeof(dscene.data));
|
||||
}
|
||||
|
||||
#ifdef WITH_CYCLES_DEBUG
|
||||
VLOG(1) << "System memory statistics after full device sync:\n"
|
||||
<< " Usage: " << util_guarded_get_mem_used() << "\n"
|
||||
<< " Peak: " << util_guarded_get_mem_peak();
|
||||
#endif
|
||||
}
|
||||
|
||||
Scene::MotionType Scene::need_motion(bool advanced_shading)
|
||||
|
Reference in New Issue
Block a user