We did not set the call cost counters in CLG_(zero_bbcc) to zero,
which gets called by requests to set counters to zero
- via client request
- when entering a function if configured so
- via gdb monitor command (used by callgrind_control -z)
Counters are also set to zero after they are dumped out to a file.
This does not use CLG_(zero_bbcc), and was doing the right thing.
This fixes bug 392449.
bbcc->cost[i] = 0;
for(i=0;i <= bbcc->bb->cjmp_count;i++) {
bbcc->jmp[i].ecounter = 0;
- for(jcc=bbcc->jmp[i].jcc_list; jcc; jcc=jcc->next_from)
- CLG_(init_cost)( CLG_(sets).full, jcc->cost );
+ for(jcc=bbcc->jmp[i].jcc_list; jcc; jcc=jcc->next_from) {
+ CLG_(init_cost)( CLG_(sets).full, jcc->cost );
+ jcc->call_counter = 0;
+ }
}
bbcc->ecounter_sum = 0;
bbcc->ret_counter = 0;