[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 |
http://sourceware.org/bugzilla/show_bug.cgi?id=13325
--- 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.
368c368
< unsigned int i, j;
---
> unsigned int i, j, k;
374c374
< for (i = 0, j = 1; i < r->num_bins; ++i)
---
> for (i = 0, k = 1; i < r->num_bins; ++i)
393c393
< for (j = j - 1; j < symtab.len; ++j)
---
> for (j = k - 1; j < symtab.len; k = ++j)
thanks
Carrot
--
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.
- [Bug gprof/13325] New: gprof doesn't work when there are histogram data before the first symbol, carrot at google dot com, 2011/10/19
- [Bug gprof/13325] gprof doesn't work when there are histogram data before the first symbol, nickc at redhat dot com, 2011/10/24
- [Bug gprof/13325] gprof doesn't work when there are histogram data before the first symbol, nickc at redhat dot com, 2011/10/24
- [Bug gprof/13325] gprof doesn't work when there are histogram data before the first symbol,
carrot at google dot com <=
- [Bug gprof/13325] gprof doesn't work when there are histogram data before the first symbol, cvs-commit at gcc dot gnu.org, 2011/10/25
- [Bug gprof/13325] gprof doesn't work when there are histogram data before the first symbol, nickc at redhat dot com, 2011/10/25
- [Bug gprof/13325] gprof doesn't work when there are histogram data before the first symbol, carrot at google dot com, 2011/10/25
- [Bug gprof/13325] gprof doesn't work when there are histogram data before the first symbol, nickc at redhat dot com, 2011/10/25
- [Bug gprof/13325] gprof doesn't work when there are histogram data before the first symbol, carrot at google dot com, 2011/10/25
- [Bug gprof/13325] gprof doesn't work when there are histogram data before the first symbol, nickc at redhat dot com, 2011/10/26