| 82 | |
| 83 | |
| 84 | void profile_exit( profile_frame * frame ) |
| 85 | { |
| 86 | if ( DEBUG_PROFILE ) |
| 87 | { |
| 88 | /* Cumulative time for this call. */ |
| 89 | double t = profile_clock() - frame->entry_time - frame->overhead; |
| 90 | /* If this rule is already present on the stack, do not add the time for |
| 91 | * this instance. |
| 92 | */ |
| 93 | if ( frame->info->stack_count == 1 ) |
| 94 | frame->info->cumulative += t; |
| 95 | /* Net time does not depend on presence of the same rule in call stack. |
| 96 | */ |
| 97 | frame->info->net += t - frame->subrules; |
| 98 | |
| 99 | if ( frame->caller ) |
| 100 | { |
| 101 | /* Caller's cumulative time must account for this overhead. */ |
| 102 | frame->caller->overhead += frame->overhead; |
| 103 | frame->caller->subrules += t; |
| 104 | } |
| 105 | /* Pop this stack frame. */ |
| 106 | --frame->info->stack_count; |
| 107 | profile_stack = frame->caller; |
| 108 | } |
| 109 | } |
| 110 | |
| 111 | |
| 112 | static void dump_profile_entry( void * p_, void * ignored ) |
no test coverage detected