Closed
Bug 914190
Opened 11 years ago
Closed 11 years ago
Avoid C getline() in profiler due to Android JB malloc conflict
Categories
(Core :: Gecko Profiler, defect)
Tracking
()
RESOLVED
FIXED
mozilla28
People
(Reporter: jld, Assigned: jld)
References
Details
(Keywords: perf, Whiteboard: [c=profiling p=2 s= u=])
Attachments
(1 file, 1 obsolete file)
(deleted),
patch
|
BenWa
:
review+
|
Details | Diff | Splinter Review |
We can't use getline() from Gecko on Android Jelly Bean because it calls bionic's realloc (not overrideable, despite having default visbility), and the caller needs to free() the result, and that will use jemalloc's free().
So, write a getline(), or import someone else's, and add it to libmozglue.
In particular, the Gecko profiler won't work on JB until this is fixed.
Comment 1•11 years ago
|
||
What about this version?
http://mxr.mozilla.org/mozilla-central/source/tools/profiler/shared-libraries-linux.cc#19
Assignee | ||
Comment 2•11 years ago
|
||
That one doesn't handle lines that are larger than 4096 bytes.
As it happens I also wrote a getline(), when I was parsing /proc files for miniperf-record, in my fork of gonk-misc; looking at it again, it's wrong in that it tries to add a '\n' if the file ends in the middle of a line, but that's easier to fix, and I think it conforms other than that.
And since we're overriding any getline() calls anywhere in Gecko, not just the one in the profiler, we probably need to make sure all the cases are covered.
Assignee | ||
Updated•11 years ago
|
Updated•11 years ago
|
Assignee | ||
Updated•11 years ago
|
Whiteboard: [c=profiler p= s= u=] → [c=profiling p= s= u=]
Assignee | ||
Updated•11 years ago
|
Component: General → mozglue
Product: Boot2Gecko → Core
Version: unspecified → Trunk
Assignee | ||
Updated•11 years ago
|
OS: Linux → Gonk (Firefox OS)
Hardware: x86_64 → ARM
Assignee | ||
Comment 3•11 years ago
|
||
Attachment #808081 -
Flags: review?(mh+mozilla)
Comment 4•11 years ago
|
||
Comment on attachment 808081 [details] [diff] [review]
bug914190-getline-mozglue-hg0.diff
Review of attachment 808081 [details] [diff] [review]:
-----------------------------------------------------------------
It feels to me you should just use std::getline.
Attachment #808081 -
Flags: review?(mh+mozilla) → review-
Assignee | ||
Updated•11 years ago
|
Component: mozglue → Gecko Profiler
Summary: Add getline to libmozglue (blocks Gecko profiler on JB B2G) → Avoid C getline() in profiler due to Android JB malloc conflict
Assignee | ||
Comment 5•11 years ago
|
||
Attachment #808081 -
Attachment is obsolete: true
Attachment #830532 -
Flags: review?(bgirard)
Updated•11 years ago
|
Attachment #830532 -
Flags: review?(bgirard) → review+
Assignee | ||
Updated•11 years ago
|
Keywords: checkin-needed
Whiteboard: [c=profiling p= s= u=] → [c=profiling p=2 s= u=]
Assignee | ||
Comment 6•11 years ago
|
||
Belated checkin note: for b2g-inbound.
Comment 7•11 years ago
|
||
Keywords: checkin-needed
Comment 8•11 years ago
|
||
Status: ASSIGNED → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla28
You need to log in
before you can comment on or make changes to this bug.
Description
•