Closed Bug 624229 Opened 14 years ago Closed 14 years ago

add API to enable/disable per-compartment GCs

Categories

(Core :: JavaScript Engine, defect)

x86
macOS
defect
Not set
normal

Tracking

()

RESOLVED FIXED
Tracking Status
blocking2.0 --- betaN+

People

(Reporter: gal, Assigned: gal)

Details

(Whiteboard: [fixed-in-tracemonkey][hardblocker])

Attachments

(1 file, 2 obsolete files)

No description provided.
Attached patch draft patch (obsolete) — Splinter Review
Assignee: general → gal
Attached patch draft patch, v2 (obsolete) — Splinter Review
Attachment #502322 - Attachment is obsolete: true
Attached patch patchSplinter Review
Attachment #502323 - Attachment is obsolete: true
Attachment #502426 - Flags: review?(jst)
Attachment #502426 - Flags: review?(brendan)
brendan, if you can review the pref setting code as well, feel free to clear the review request for jst
blocking2.0: --- → ?
Comment on attachment 502426 [details] [diff] [review] patch >+static int >+SetMemoryGCModePrefChangedCallback(const char* aPrefName, void* aClosure) I don't know why memory is in these names, but it seems to be all over! >diff --git a/js/src/jsapi.cpp b/js/src/jsapi.cpp >--- a/js/src/jsapi.cpp >+++ b/js/src/jsapi.cpp >@@ -2592,16 +2592,19 @@ JS_SetGCParameter(JSRuntime *rt, JSGCPar > rt->gcMaxBytes = value; > break; > case JSGC_MAX_MALLOC_BYTES: > rt->setGCMaxMallocBytes(value); > break; > case JSGC_STACKPOOL_LIFESPAN: > rt->gcEmptyArenaPoolLifespan = value; > break; >+ case JSGC_MODE: >+ rt->gcMode = JSGCMode(value); >+ break; Check (or at least assert) that value is in the legal range. >+typedef enum JSGCMode { >+ /* Perform only global GCs. */ >+ JSGC_STOP_THE_WORLD_ONLY = 0, JSGC_MODE_GLOBAL and JSGC_MODE_COMPARTMENT? "Stop the world" is a separate concept, more related to mutator blocking than separation of heaps and collection, IMO. >+ /* Perform per-compartment GCs until too much garbage has accumulated. */ >+ JSGC_PER_COMPARTMENT = 1 >+} JSGCMode; >+ r=shaver with those changes.
Attachment #502426 - Flags: review+
Attachment #502426 - Flags: review?(jst)
Attachment #502426 - Flags: review?(brendan)
Nice review, shaver! /be
Whiteboard: fixed-in-tracemonkey
blocking2.0: ? → betaN+
Whiteboard: fixed-in-tracemonkey → [fixed-in-tracemonkey][hardblocker]
Status: NEW → RESOLVED
Closed: 14 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: