Closed
Bug 1312597
Opened 8 years ago
Closed 8 years ago
Try increasing the ThreadStackHelper's initial max buffer size to avoid (chrome script) in BHR pseudostacks
Categories
(Core :: XPCOM, defect)
Tracking
()
RESOLVED
FIXED
mozilla52
Tracking | Status | |
---|---|---|
firefox52 | --- | fixed |
People
(Reporter: mconley, Assigned: mconley)
References
(Blocks 1 open bug)
Details
Attachments
(1 file)
Bug 1023461 added the ability to get chrome script URIs in thread hang stacks for BHR. That's great, except that when looking at BHR data (particularly for bug 1310255), I'm noticing we're getting a lot of (chrome script) entries instead of URIs. I've messed around with ThreadStackHelper locally, and what I think is going on is that ThreadStackHelper is initializing with too small a buffer. The max buffer size that it starts with is actually 0, and then as thread hangs come in (and smash through that limit), the max buffer size is adjusted for next time. I'm pretty sure that means that for the first bunch of hangs in a process, the chrome script URIs are going to be missing. I suggest that we increase the initial buffer size from 0 to something else. I'm not sure what a good value is though. Locally, I noticed that the max buffer size in my content process stabilized around 340 bytes after a few minutes of use, but I really have no idea what it should be. Hey jchen, is my above analysis / suspicion in the ballpark? If so, any suggestions on what to set the max buffer size to be initially?
Assignee | ||
Updated•8 years ago
|
Flags: needinfo?(nchen)
Assignee | ||
Comment 1•8 years ago
|
||
Is it worth adding some kind of Telemetry probe to see where buffers out in the wild converge for their max buffer size? Or do we think we can make an educated guess on what an appropriate initial max buffer size would be?
Comment 2•8 years ago
|
||
I think adding a telemetry probe is a good idea, but for the mean time I believe using an empirical value is good enough. The origin concern was there would be a bunch of threads that never hang, so we would waste memory if we pre-allocate a large buffer for each thread, but for several hundred bytes that shouldn't be a concern.
Flags: needinfo?(nchen)
Assignee | ||
Comment 3•8 years ago
|
||
(In reply to Jim Chen [:jchen] [:darchons] from comment #2) > I think adding a telemetry probe is a good idea, but for the mean time I > believe using an empirical value is good enough. The origin concern was > there would be a bunch of threads that never hang, so we would waste memory > if we pre-allocate a large buffer for each thread, but for several hundred > bytes that shouldn't be a concern. Would 512 bytes be reasonable?
Flags: needinfo?(nchen)
Assignee | ||
Updated•8 years ago
|
Assignee: nobody → mconley
Comment hidden (mozreview-request) |
Comment 6•8 years ago
|
||
mozreview-review |
Comment on attachment 8804389 [details] Bug 1312597 - Increase ThreadStackHelper's initial max buffer size to avoid (chrome script) placeholder in BHR pseudostacks. https://reviewboard.mozilla.org/r/88388/#review87446
Attachment #8804389 -
Flags: review?(nchen) → review+
Pushed by mconley@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/570182c077ee Increase ThreadStackHelper's initial max buffer size to avoid (chrome script) placeholder in BHR pseudostacks. r=jchen
Comment 8•8 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/570182c077ee
Status: NEW → RESOLVED
Closed: 8 years ago
status-firefox52:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla52
You need to log in
before you can comment on or make changes to this bug.
Description
•