Last Comment Bug 759626 - Large amount of heap churn seemingly coming from InferSpewColorable (Debug-only)
: Large amount of heap churn seemingly coming from InferSpewColorable (Debug-only)
Status: RESOLVED FIXED
:
Product: Core
Classification: Components
Component: JavaScript Engine (show other bugs)
: unspecified
: x86_64 Windows 7
: -- normal (vote)
: mozilla15
Assigned To: Jan de Mooij [:jandem]
:
: Jason Orendorff [:jorendorff]
Mentors:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2012-05-29 20:38 PDT by Bas Schouten (:bas.schouten)
Modified: 2012-05-31 06:32 PDT (History)
1 user (show)
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---


Attachments
Patch (989 bytes, patch)
2012-05-30 01:54 PDT, Jan de Mooij [:jandem]
bhackett1024: review+
Details | Diff | Splinter Review

Description Bas Schouten (:bas.schouten) 2012-05-29 20:38:11 PDT
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.
Comment 1 Jan de Mooij [:jandem] 2012-05-30 01:54:07 PDT
Created attachment 628268 [details] [diff] [review]
Patch

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.
Comment 3 Ed Morley [:emorley] 2012-05-31 06:32:39 PDT
https://hg.mozilla.org/mozilla-central/rev/b072bbec8bda

Note You need to log in before you can comment on or make changes to this bug.