Closed Bug 855081 Opened 12 years ago Closed 12 years ago

jprof should use abi::__cxa_demangle

Categories

(Core :: General, defect)

x86_64
Linux
defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla24

People

(Reporter: dbaron, Assigned: dbaron)

Details

Attachments

(2 files)

I've had a patch in my tree for a while to make jprof compile (which it wasn't for me without the patch). It switches from using the old cplus_demangle function to using abi::__cxa_demangle, which is sort of officially supported: http://gcc.gnu.org/onlinedocs/libstdc++/libstdc++-html-USERS-4.3/a01696.html cplus_demangle didn't link for me.
Comment on attachment 729808 [details] [diff] [review] Make jprof compile for me by switching from cplus_demangle (which doesn't link) to abi::__cxa_demangle. Review of attachment 729808 [details] [diff] [review]: ----------------------------------------------------------------- ::: tools/jprof/bfd.cpp @@ +187,5 @@ > } > sp->Init(dnm ? dnm : nm, syminfo.value + aBaseAddress); > + if (dnm) { > + free(dnm); > + } It would be a lot less malloc traffic if you just reused the same buffer each time (it will be realloced larger as needed). However, this only matters when processing, so it's not a big deal and this is provably safe.
Attachment #729808 - Flags: review?(rjesup) → review+
Landed: https://hg.mozilla.org/integration/mozilla-inbound/rev/261e3e928ce9 (I'll add a patch for the better way in my queue so I test it the next time I use jprof...)
Status: ASSIGNED → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla24
This has been working for me for a while.
Attachment #8384290 - Flags: review?(rjesup)
Attachment #8384290 - Flags: review?(rjesup) → review+
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: