Closed Bug 759626 Opened 12 years ago Closed 12 years ago

Large amount of heap churn seemingly coming from InferSpewColorable (Debug-only)

Categories

(Core :: JavaScript Engine, defect)

x86_64
Windows 7
defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla15

People

(Reporter: bas.schouten, Assigned: jandem)

Details

Attachments

(1 file)

I was doing some memory profiling from another bug I'm looking at and I noticed the profiler telling me that there's an incredible amount of heap churn coming an allocation in InferSpewColorable (jsinfer.cpp:141). I should note this is in a debug build! I realize the code here is debug only.

In my (very low use) session that has only 3 tabs open for under 10 minutes with relatively little activity. this was responsible for over 60% of the blocks allocated(and freed) on the heap, at a grand total of 12 million blocks. Even for debug purposes that seems like it might be a little excessive.
Attached patch PatchSplinter Review
This bug reminded me of another problem with the spew colors: since OS X 10.7 the TERM variable is xterm-256color instead of xterm-color so the colors stopped working.

The patch uses a static variable to avoid multiple lookups and adds xterm-256color.
Assignee: general → jdemooij
Status: NEW → ASSIGNED
Attachment #628268 - Flags: review?(bhackett1024)
Attachment #628268 - Flags: review?(bhackett1024) → review+
https://hg.mozilla.org/mozilla-central/rev/b072bbec8bda
Status: ASSIGNED → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: