Called when function left (no recursive level active) */
| 146 | |
| 147 | /* Called when function left (no recursive level active) */ |
| 148 | static void function_left(fn_node* fn) |
| 149 | { |
| 150 | CLG_ASSERT(fn != 0); |
| 151 | |
| 152 | if (fn->dump_after) { |
| 153 | HChar trigger[VG_(strlen)(fn->name) + 20]; |
| 154 | VG_(sprintf)(trigger, "--dump-after=%s", fn->name); |
| 155 | CLG_(dump_profile)(trigger, True); |
| 156 | } |
| 157 | if (fn->toggle_collect) { |
| 158 | CLG_(current_state).collect = !CLG_(current_state).collect; |
| 159 | CLG_DEBUG(2," leaving %s: toggled collection state to %s\n", |
| 160 | fn->name, |
| 161 | CLG_(current_state).collect ? "ON" : "OFF"); |
| 162 | } |
| 163 | |
| 164 | #if CLG_ENABLE_DEBUG |
| 165 | if (fn->verbosity >=0) { |
| 166 | Int old = CLG_(clo).verbose; |
| 167 | CLG_(clo).verbose = fn->verbosity; |
| 168 | fn->verbosity = old; |
| 169 | VG_(message)(Vg_DebugMsg, |
| 170 | "Leaving %s: Verbosity set back to %d\n", |
| 171 | fn->name, CLG_(clo).verbose); |
| 172 | } |
| 173 | #endif |
| 174 | } |
| 175 | |
| 176 | |
| 177 | /* Push call on call stack. |
no outgoing calls
no test coverage detected