commit c2fc3b92b80ceed396f202be4f2cb17dacd335d8 parent c1a64b33a5d1a764656f44aabe0d4c62c6734f29 Author: Michael Savage <mikejsavage@gmail.com> Date: Mon Dec 26 01:13:34 +0200 next_sibling -> prev_sibling Diffstat:
profiler.cc | | | 8 | ++++---- |
diff --git a/profiler.cc b/profiler.cc @@ -30,7 +30,7 @@ struct LogEntry { str< 256 > message; double dt; u32 first_child; - u32 next_sibling; + u32 prev_sibling; }; #define MAX_TIMERS 4096 @@ -69,8 +69,8 @@ void profiler_push( u32 timer_idx ) { static void print_node( u32 idx, double frame_dt ) { const LogEntry & entry = logs[ idx ]; - if( entry.next_sibling != 0 ) { - print_node( entry.next_sibling, frame_dt ); + if( entry.prev_sibling != 0 ) { + print_node( entry.prev_sibling, frame_dt ); } printf( "%s (%.2f%%)\n", entry.message.c_str(), entry.dt * 100.0 / frame_dt ); @@ -102,7 +102,7 @@ void profiler_pop() { entry->message.sprintf( "%*s%s (%s:%d) - %.3fms", timer_stack_top * 2, "", timer->name, timer->file, timer->line, dt * 1000.0 ); entry->dt = dt; entry->first_child = last_at_depth[ timer_stack_top + 1 ]; - entry->next_sibling = last_at_depth[ timer_stack_top ]; + entry->prev_sibling = last_at_depth[ timer_stack_top ]; last_at_depth[ timer_stack_top ] = num_log_entries; last_at_depth[ timer_stack_top + 1 ] = 0;