Closed Bug 474801 Opened 17 years ago Closed 17 years ago

Checking for MaybeGC conditions when allocating GC things in JS shell

Categories

(Core :: JavaScript Engine, enhancement)

enhancement
Not set
normal

Tracking

()

RESOLVED FIXED

People

(Reporter: andrei, Assigned: andrei)

References

Details

(Keywords: fixed1.9.1, Whiteboard: fixed-in-tracemonkey)

Attachments

(2 files, 3 obsolete files)

This is part 1 of the original bug 453432. It adds "MaybeGC" conditions check for allocation of GC thins, but it does not remove the MaybeGC functionality for DOM objects.
Attached patch Initial patch (obsolete) — Splinter Review
Assignee: general → andrei
Attachment #358201 - Flags: review?(igor)
Attachment #358201 - Flags: review?(igor) → review+
Attached patch Updated patch (obsolete) — Splinter Review
Attachment #358201 - Attachment is obsolete: true
Attachment #358409 - Flags: review?(igor)
(In reply to comment #3) > Created an attachment (id=358409) [details] > Updated patch As discussed with Andrei a possible reason for tinderbox failures with the previous patch was subtle changes in the frequency of cycle collector runs. The patches replaces the explicit tracking of the number JS_GC calls with using JSRuntime.gcNumber exposed through a new API. But that means that JS_GC calls done outside nsJSEnvironment, like JS_GC done from the cycle collector itself, or JS_GC called when destroying JSContext, would also contribute to the counter. Effectively it may make nsJSRuntime::sGCCount to run faster leading to more frequent cycle collections. It principle it may explain the crash test timeout. It may also explain the mochitest leak as the cycle collector may not run at the proper moment that test expects. Now, the new version tries to offset that faster nsJSRuntime::sGCCount rate with ignoring at least the GC runs done during the cycle collection. It could be enough to offset that rate effect so I would try to land the updated patch again.
Attachment #358409 - Flags: review?(igor) → review+
Depends on: 475146
Attached patch Updated patch (obsolete) — Splinter Review
Attachment #358409 - Attachment is obsolete: true
Attachment #359034 - Flags: review?(igor)
Attached patch Updated patchSplinter Review
Previous patch was made in mozilla-central instead of tracemonkey
Attachment #359034 - Attachment is obsolete: true
Attachment #359053 - Flags: review?(igor)
Attachment #359034 - Flags: review?(igor)
Given the instability of tinderbox tests I prefer to play safe here. So I would try to land the patch without nsJSEnvironment changes related to the sGCCounter.
Attachment #359062 - Flags: review+
Whiteboard: fixed-in-tracemonkey
Status: NEW → RESOLVED
Closed: 17 years ago
Resolution: --- → FIXED
Blocks: 475680
Flags: in-testsuite-
Attachment #359053 - Flags: review?(igor)
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: