Closed
Bug 444034
Opened 16 years ago
Closed 16 years ago
jprof fails to sort symbols correctly
Categories
(Core :: General, defect)
Tracking
()
RESOLVED
FIXED
mozilla1.9.1b1
People
(Reporter: jcranmer, Assigned: jcranmer)
Details
Attachments
(1 file)
490 bytes,
patch
|
dbaron
:
review+
|
Details | Diff | Splinter Review |
While trying to do some profiling of code, I found that a startling 97.7% of time was spent in the function name "Flist." A little bit of sleuthing showed that to be the last symbol (it's not even a function) defined in the executable. Given that the profile report shows no calls in JS despite knowledge that heavy JS usage is present (as well as other relevant JS called), as well as similar statistics showing no XPCOM or NSPR or NSS code, all of which are dynamically linked. Looking at the code tells me that it fails to resolve these, especially with this dynamic run: b7f196b7 8be585c. The former is the address, the latter the highest known address.
Assignee | ||
Comment 1•16 years ago
|
||
More fun to the puzzle: The symbols are loaded (and so are non-function string names, but that's an easy if statement), but the array is not sorted properly: it goes b15a5000...b7fe9654, 08048114..08be585c
Assignee | ||
Comment 2•16 years ago
|
||
And, in short, the failing code was the sort code. This code works: static int symbolOrder(void const* a, void const* b) { Symbol const* ap = (Symbol const *)a; Symbol const* bp = (Symbol const *)b; return ap->address == bp->address ? 0 : (ap->address > bp->address ? 1 : -1); }
Assignee | ||
Comment 3•16 years ago
|
||
Changing the name to be representative of the error which causes this as opposed to the error which is the effect.
Summary: jprof fails to resolve symbol names in shared libraries → jprof fails to sort symbols correctly
Assignee | ||
Updated•16 years ago
|
Version: 1.9.0 Branch → Trunk
Assignee | ||
Comment 4•16 years ago
|
||
A little tardier than I said, but here's a patch nonetheless.
Assignee | ||
Updated•16 years ago
|
Attachment #340023 -
Flags: review? → review?(dbaron)
Comment on attachment 340023 [details] [diff] [review] fix the problem r=dbaron
Attachment #340023 -
Flags: review?(dbaron) → review+
Assignee | ||
Comment 6•16 years ago
|
||
Checked in as changeset 3bfd66c81a78.
Status: ASSIGNED → RESOLVED
Closed: 16 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla1.9.1b1
You need to log in
before you can comment on or make changes to this bug.
Description
•