Commit: aad96506c1baba091ad62dc50004303da9298208
Author: Sergey Sharybin
Date:   Sat Feb 14 19:39:14 2015 +0500
Branches: master
https://developer.blender.org/rBaad96506c1baba091ad62dc50004303da9298208

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.

===================================================================

M       intern/cycles/render/scene.cpp

===================================================================

diff --git a/intern/cycles/render/scene.cpp b/intern/cycles/render/scene.cpp
index 64d6fa4..524574f 100644
--- a/intern/cycles/render/scene.cpp
+++ b/intern/cycles/render/scene.cpp
@@ -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)

_______________________________________________
Bf-blender-cvs mailing list
[email protected]
http://lists.blender.org/mailman/listinfo/bf-blender-cvs

Reply via email to