[Top][All Lists]

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

[Bug gprof/13325] gprof doesn't work when there are histogram data befor

From: carrot at google dot com
Subject: [Bug gprof/13325] gprof doesn't work when there are histogram data before the first symbol
Date: Mon, 24 Oct 2011 21:59:42 +0000


--- Comment #3 from Wei Guozhi <carrot at google dot com> 2011-10-24 21:59:42 
UTC ---
(In reply to comment #2)
> Hi Wei,
>   I believe that the uploaded patch should take care of this problem.  Please
> could you let me know what you think.
>   The patch just prevents j from being decremented below 0, which I think
> should be sufficient.
> Cheers
>   Nick

Hi Nick

This patch works perfectly.

For other histogram data that isn't belong to any known symbol and is not
before the first symbol, the value of j is still decremented. This is not
harmful to the final result, it just waste time to check more symbols. How
about the following patch? It can avoid rechecking symbols with lower address.

<   unsigned int i, j;
>   unsigned int i, j, k;
<   for (i = 0, j = 1; i < r->num_bins; ++i)
>   for (i = 0, k = 1; i < r->num_bins; ++i)
<       for (j = j - 1; j < symtab.len; ++j)
>       for (j = k - 1; j < symtab.len; k = ++j)


Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.

reply via email to

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