|
From: Josef W. <Jos...@gm...> - 2014-10-08 18:26:46
|
Am 08.10.2014 um 13:29 schrieb Christian Borntraeger:
>>> many-xpts valgrind-new:0.07s no: 0.6s ( 9.0x, -----) [...] ca:374.8s (5353.6x, -----) [...]
>>> many-xpts valgrind-old:0.07s no: 0.6s ( 9.0x, 0.0%) [...] ca:371.9s (5312.4x, 0.8%) [...]
>
> I can now reproduce this manually.
Cool.
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;
> }
setup_bbcc is called from instrumented code at entry of every basic block.
Callgrind maintains a shadow stack, and this code is part of
synchronizing the shadow stack
with the real stack. It should be executed for a basic block that is
coming after
a guest return instruction was executed.
This may need to pop multiple entries of the shadow stack as Callgrind
tries to interpret
tail recursion optimization (jumps to the beginning of a function) as
calls to that
function, resulting in new entries on the shadow stack (with equal sp)
which all need to be
popped when returning.
Hm. Looking at many-xpts.c, I see that the compiler may do tail
recursion optimization,
but stack frames should not have depths larger than 18 (?).
Can you send me the a callgrind.out result of a Callgrind run of
many-xpts on s390?
> The reason is that the value of csp is increasing during that testcase to insanely high values.
The reason for such high csp values is not really clear to me...
Josef
>
> I have to admit, that I dont fully understand that code, so any ideas are welcome.
>
>
> ------------------------------------------------------------------------------
> Meet PCI DSS 3.0 Compliance Requirements with EventLog Analyzer
> Achieve PCI DSS 3.0 Compliant Status with Out-of-the-box PCI DSS Reports
> Are you Audit-Ready for PCI DSS 3.0 Compliance? Download White paper
> Comply to PCI DSS 3.0 Requirement 10 and 11.5 with EventLog Analyzer
> http://pubads.g.doubleclick.net/gampad/clk?id=154622311&iu=/4140/ostg.clktrk
> _______________________________________________
> Valgrind-developers mailing list
> Val...@li...
> https://lists.sourceforge.net/lists/listinfo/valgrind-developers
>
|