Closed
Bug 624229
Opened 14 years ago
Closed 14 years ago
add API to enable/disable per-compartment GCs
Categories
(Core :: JavaScript Engine, defect)
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)
|
6.73 KB,
patch
|
shaver
:
review+
|
Details | Diff | Splinter Review |
No description provided.
| Assignee | ||
Comment 1•14 years ago
|
||
Assignee: general → gal
| Assignee | ||
Comment 2•14 years ago
|
||
Attachment #502322 -
Attachment is obsolete: true
| Assignee | ||
Comment 3•14 years ago
|
||
Attachment #502323 -
Attachment is obsolete: true
Attachment #502426 -
Flags: review?(jst)
| Assignee | ||
Updated•14 years ago
|
Attachment #502426 -
Flags: review?(brendan)
| Assignee | ||
Comment 4•14 years ago
|
||
brendan, if you can review the pref setting code as well, feel free to clear the review request for jst
| Assignee | ||
Updated•14 years ago
|
blocking2.0: --- → ?
Comment 5•14 years ago
|
||
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+
| Assignee | ||
Updated•14 years ago
|
Attachment #502426 -
Flags: review?(jst)
Attachment #502426 -
Flags: review?(brendan)
Comment 6•14 years ago
|
||
Nice review, shaver!
/be
| Assignee | ||
Comment 7•14 years ago
|
||
Whiteboard: fixed-in-tracemonkey
Updated•14 years ago
|
blocking2.0: ? → betaN+
Updated•14 years ago
|
Whiteboard: fixed-in-tracemonkey → [fixed-in-tracemonkey][hardblocker]
Comment 8•14 years ago
|
||
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.
Description
•