Revision: 58790
          
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=58790
Author:   nazgul
Date:     2013-07-31 21:55:47 +0000 (Wed, 31 Jul 2013)
Log Message:
-----------
Code cleanup: get rid of unneeded thread count in statistics structure

Modified Paths:
--------------
    branches/soc-2013-depsgraph_mt/source/blender/blenkernel/intern/scene.c

Modified: 
branches/soc-2013-depsgraph_mt/source/blender/blenkernel/intern/scene.c
===================================================================
--- branches/soc-2013-depsgraph_mt/source/blender/blenkernel/intern/scene.c     
2013-07-31 21:55:41 UTC (rev 58789)
+++ branches/soc-2013-depsgraph_mt/source/blender/blenkernel/intern/scene.c     
2013-07-31 21:55:47 UTC (rev 58790)
@@ -1179,7 +1179,6 @@
 
 #ifdef ENABLE_THREAD_STATISTICS
        ListBase statistics[64];
-       int tot_thread;
 #endif
 } ThreadedObjectUpdateState;
 
@@ -1219,8 +1218,6 @@
                if (G.debug & G_DEBUG) {
                        StatisicsEntry *entry;
 
-                       state->tot_thread = max_ii(state->tot_thread, threadid 
+ 1);
-
                        entry = MEM_mallocN(sizeof(StatisicsEntry), "update 
thread statistics");
                        entry->object = object;
                        entry->time = PIL_check_seconds_timer() - start_time;
@@ -1253,8 +1250,9 @@
 static void print_threads_statistics(ThreadedObjectUpdateState *state)
 {
        int i;
+       int tot_thread = BLI_system_thread_count();
 
-       for (i = 0; i < state->tot_thread; i++) {
+       for (i = 0; i < tot_thread; i++) {
                int total_objects = 0;
                double total_time = 0.0;
                StatisicsEntry *entry;
@@ -1298,7 +1296,6 @@
        state.scene_parent = scene_parent;
 #ifdef ENABLE_THREAD_STATISTICS
        memset(state.statistics, 0, sizeof(state.statistics));
-       state.tot_thread = 0;
 #endif
        BLI_spin_init(&state.lock);
 

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

Reply via email to