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

Function profile_exit

src/engine/debug.cpp:84–109  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

82
83
84void 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
112static void dump_profile_entry( void * p_, void * ignored )

Callers 3

hash_insertFunction · 0.85
hash_findFunction · 0.85
evaluate_ruleFunction · 0.85

Calls 1

profile_clockFunction · 0.85

Tested by

no test coverage detected