MCPcopy Create free account
hub / github.com/boostorg/build / profile_exit

Function profile_exit

v2/engine/debug.c:83–108  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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

Callers 3

hash_insertFunction · 0.85
hash_findFunction · 0.85
evaluate_ruleFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected