The default bug view has changed. See this FAQ.

reTempAlloc: 512k heap allocation for no purpose

RESOLVED FIXED

Status

()

Core
JavaScript Engine
RESOLVED FIXED
7 years ago
6 years ago

People

(Reporter: jseward, Assigned: jseward)

Tracking

Trunk
Points:
---

Firefox Tracking Flags

(blocking2.0 betaN+)

Details

(Whiteboard: fixed-in-tracemonkey)

Attachments

(1 attachment)

(Assignee)

Description

7 years ago
jstracer.cpp, InitJIT():

7807:        tm->reTempAlloc = new VMAllocator();

allocates 512kb of memory at process start, but is never used.  AFAICS
reTempAlloc is redundant (nothing is ever allocated in it) and can be
done away with.  I guess it got left over from the old regexp engine.

The block stayed alive for 15.02 billion insns, almost the entire life
of the program (15.08 billion -- start browser and surf a bit).
Only 192 bytes of the block were read, and 825 written -- admin 
stuff I suspect.

  -------------------- 32 of 5000 --------------------
  max-live:    524,328 in 1 blocks
  tot-alloc:   524,328 in 1 blocks (avg size 524328.00)
  deaths:      1, at avg age 15,015,989,851
  acc-ratios:  0.00 rd, 0.00 wr  (192 b-read, 825 b-written)
     at 0x4C27ECA: operator new(unsigned long) (vg_replace_malloc.c:261)
     by 0x661D01D: js::InitJIT(js::TraceMonitor*) (jstracer.cpp:7807)
     by 0x651FBEB: JSThreadData::init() (jscntxt.cpp:497)
     by 0x652049D: js_CurrentThread(JSRuntime*) (jscntxt.cpp:588)
     by 0x652085C: js_InitContextThread(JSContext*) (jscntxt.cpp:659)
(Assignee)

Comment 1

7 years ago
Created attachment 488593 [details] [diff] [review]
remove reTempAlloc
Attachment #488593 - Flags: review?(nnethercote)
Comment on attachment 488593 [details] [diff] [review]
remove reTempAlloc

Nice find!
Attachment #488593 - Flags: review?(nnethercote) → review+
(Assignee)

Updated

7 years ago
Keywords: checkin-needed
Blocks: 598466
blocking2.0: --- → beta9+
http://hg.mozilla.org/tracemonkey/rev/25fd3451c0ae
Keywords: checkin-needed
Whiteboard: fixed-in-tracemonkey
Assignee: general → jseward

Comment 4

6 years ago
http://hg.mozilla.org/mozilla-central/rev/25fd3451c0ae
Status: NEW → RESOLVED
Last Resolved: 6 years ago
Resolution: --- → FIXED

Comment 5

6 years ago
As per today's meeting, beta 9 will be a time-based release. Marking these all betaN+. Please move it back to beta9+ if  you believe it MUST be in the next beta (ie: trunk is in an unshippable state without this)
blocking2.0: beta9+ → betaN+
You need to log in before you can comment on or make changes to this bug.