|
From: Christian B. <bor...@de...> - 2014-10-09 07:53:07
|
Am 08.10.2014 20:31, schrieb Florian Krohm:
> On 08.10.2014 13:29, Christian Borntraeger wrote:
>
>>
>> I can now reproduce this manually. The code spends huge amount of times in
>> void CLG_(setup_bbcc)(BB* bb) (callgrind/bbcc.c)
>>
>> in this while loop:
>>
>> while(1) {
>> if (top_ce->ret_addr == bb_addr(bb)) break;
>> if (csp_up>0) {
>> csp_up--;
>> top_ce = &(CLG_(current_call_stack).entry[csp_up]);
>> if (top_ce->sp == sp) {
>> popcount_on_return++;
>> continue;
>> }
>> }
>> popcount_on_return = 0;
>> break;
>> }
>>
>> The reason is that the value of csp is increasing during that testcase to insanely high values.
>
> ?? What is increasing?
I did a VG_(printf) on csp.
csp = CLG_(current_call_stack).sp;
--> here
/* A return not matching the top call in our callstack is a jump */
if ( (jmpkind == jk_Return) && (csp >0)) {
Int csp_up = csp-1;
it starts sanely moving between 1 and twenty-something for some seconds
and the it goes up (stopped at 23000).
>
>>
>> I have to admit, that I dont fully understand that code, so any ideas are welcome.
>
> Perhaps this has to do with how we classify function returns.
> Any BCR with r1 == 15 will be taken as a return. But that is not
> necessarily true (just very often). And a BCR with r1 != 15 is not
> considered a return...
>
> Florian
>
|