<div class="gmail_quote">On Mon, Aug 22, 2011 at 1:30 PM, Ludo Brands <span dir="ltr"><<a href="mailto:ludo.brands@free.fr">ludo.brands@free.fr</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
<u></u>
<div><div class="im">
<div> <span><font color="#0000ff" face="Arial" size="2"> <br></font></span></div>
</div><span><font color="#0000ff" face="Arial" size="2">IMO, a
big improvement would be to unwind the stack instead of checking
every value found on the stack. This would avoid false positives caused by
random data falling in the main address range or by passing function addresses
as a parameter. You could then even drop the check against the main program
address range and include dynamically loaded libraries. <br></font></span></div></blockquote><div><br>Interesting suggestion, can you point to some code maybe in the lazarus that does a similar job. Does GetLineInfo inside do something like this? <br>
</div><div> </div><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;"><div><div class="im">
<blockquote style="padding-left: 5px; margin-left: 5px; border-left: 2px solid rgb(0, 0, 255); margin-right: 0px;">
<div><span> </span><br>I tried to use it with
Lazarus (with opening 150 files afterwards) and the results were bad in terms
of the speed, 30 minutes just to start and a couple hours to work (1.7 Ghz
Celeron), obviously something like hash table is needed. Also showing the
number of memory requests for particular function overall can be also useful,
it could add more sense to some puzzling entries. <br><span><font color="#0000ff" face="Arial" size="2"> </font></span></div></blockquote>
</div><div><span><font color="#0000ff" face="Arial" size="2">Keeping AddrList and
FuncNames outside PMMCollectStat would also help for subsequent
uses.</font></span></div></div></blockquote><div><br>You're right about FuncNames, I checked for GetLineInfo speed, it's about 100 per second on my machine. The speed is good for lazarus "call stack" window, but for resolving dozens of addresses the caching of the results might become a necessity. <br>
</div><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;"><div><div class="im"><blockquote style="padding-left: 5px; margin-left: 5px; border-left: 2px solid rgb(0, 0, 255); margin-right: 0px;">
<div>As for lazarus results,
some entries are still unexplained to me (the first ~300 are in the
attachment)<br>...<br>Possibly those were false
positives i.e. some numbers on the stack that falls into usable range, but
actually is something else. <br><span><font color="#0000ff" face="Arial" size="2"> </font></span></div></blockquote>
</div><span> </span><br><div><span><font color="#0000ff" face="Arial" size="2">Where
these results obtained with or withouth the Depth patch?
</font></span></div><br></div></blockquote></div><br>It was before and looking at how much cpu time spent, I will be probably ready for the next measurement only after the hashing is implemented :). In you question I see a guess, that the fewer the depth, the less likely false positives get into view, right?<br>
<br>Max<br><br><br><br>