[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Libunwind-devel] Testing time

From: Lassi Tuura
Subject: Re: [Libunwind-devel] Testing time
Date: Wed, 30 Mar 2011 17:22:04 +0200


I came up with a slightly better work-around to avoid calling unw_step() in 
backtrace(). The attached patch is very similar to the previous one, except it 
does the insert to 'buffer' at the end of the loop instead of beginning, thus 
avoiding the 'if' I previously added. I've verified the results stay identical. 
The patch also improves the function documentation.

It's again very slightly faster than the latest results I reported before 
(~3%). From my previous post:

  per walk: 1445 / 2604
  per level: 55.0 / 208.7
  total run time: 959s

With this patch:

  per walk: 1403 / 2591
  per level: 53.4 / 168.4
  total run time: 953s

I still didn't work out why the unw_step() loop doesn't return the last frame 
on the stack. I think it has to do with the way the state is remembered in the 
cursor - it has register values for the 'current' state, but the cursor itself 
already points to the 'next' frame - so we set c->dwarf.ip to zero when we 
encounter the last frame, and never return the last IP address. Or something 
like that.


Attachment: 03-tdep-trace-internal.patch
Description: Binary data

reply via email to

[Prev in Thread] Current Thread [Next in Thread]