Closed Bug 1014010 Opened 12 years ago Closed 12 years ago

jemalloc_stats function is not defined on ARM linux build

Categories

(Core :: XPCOM, defect)

ARM
Mer
defect
Not set
normal

Tracking

()

RESOLVED INVALID

People

(Reporter: tatiana, Unassigned)

References

Details

Attachments

(3 files)

attempt to load about:memory on Jolla browser (arm-linux non android) failing with this console message: JavaScript error: chrome://global/content/aboutMemory.js, line 49: NS_ERROR_XPC_GS_RETURNED_FAILURE: Component returned failure code: 0x80570016 (NS_ERROR_XPC_GS_RETURNED_FAILURE) [nsIJSCID.getService] Looking deeply I've found that nsMemoryReporterManager::Init return NS_ERROR_FAILURE, due to if (!jemalloc_stats) { condition fail. I think this is cause bug 984237, and possibly related to some bad defines around mozilla/memory/*malloc* But I don't know that code very well and probably need some help
This is the kind of thing that glandium knows about :)
The first question I'd like to ask is how exactly are you building the Jolla browser? Because "arm-linux non android" is not exactly very explicit. The non-android arm linux builds on debian have the jemalloc_stats symbol exactly where it's supposed to be: in the iceweasel executable (which is the same as firefox).
Attached file autoconf.mk —
Attachment #8426738 - Attachment mime type: text/x-makefile → text/plain
That all looks "normal". You should have the jemalloc_stats symbol exported from the xulrunner executable. > mk_add_options PROFILE_GEN_SCRIPT=@TOPSRCDIR@/build/profile_pageloader.pl that script is long gone.
But I bet you're not using the xulrunner executable, but building your own stuff and linking libxul, or something in that vein. In all likeliness, it's missing the most important part: libmemory.a.
nice, adding -lmemory to linking fixed the problem, unlucky that -lmemory is not in any of .pc files currently
(In reply to Tatiana Meshkova (:tatiana) from comment #8) > nice, adding -lmemory to linking fixed the problem, unlucky that -lmemory is > not in any of .pc files currently The code should work without (that's why there's an if (jemalloc_stats)).
That said, I'd say that nsMemoryReporterManager::Init "gracefully" returning an error when jemalloc_stats is not there is the expected outcome.
Status: NEW → RESOLVED
Closed: 12 years ago
Resolution: --- → INVALID
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: