Closed
Bug 815931
Opened 12 years ago
Closed 12 years ago
Split out parts of jsgc.cpp into separate files
Categories
(Core :: JavaScript Engine, defect)
Core
JavaScript Engine
Tracking
()
RESOLVED
FIXED
mozilla20
People
(Reporter: billm, Assigned: billm)
Details
(Whiteboard: [js:t])
Attachments
(6 files, 3 obsolete files)
55.34 KB,
patch
|
terrence
:
review+
|
Details | Diff | Splinter Review |
8.33 KB,
patch
|
jonco
:
review+
|
Details | Diff | Splinter Review |
10.30 KB,
patch
|
jonco
:
review+
|
Details | Diff | Splinter Review |
2.91 KB,
patch
|
terrence
:
review+
|
Details | Diff | Splinter Review |
49.01 KB,
patch
|
terrence
:
review+
|
Details | Diff | Splinter Review |
2.21 KB,
patch
|
Details | Diff | Splinter Review |
This first patch moves some of the root marking code into a separate file.
Attachment #685922 -
Flags: review?(terrence)
Assignee | ||
Comment 1•12 years ago
|
||
This patch moves some of the auto classes used for tracing into headers. It also calls RecordNativeStackTop automatically from one of the auto classes. This isn't needed by all the tracers, but it's not very expensive and it simplifies things.
Attachment #685923 -
Flags: review?(jcoppeard)
Assignee | ||
Comment 2•12 years ago
|
||
This patch moves a bunch of heap iteration code into its own file.
Attachment #685924 -
Flags: review?(jcoppeard)
Assignee | ||
Comment 3•12 years ago
|
||
This just reuses AutoPrepareForTracing for the verifier.
Attachment #685925 -
Flags: review?(terrence)
Assignee | ||
Comment 4•12 years ago
|
||
This moves the verifier to its own file.
Attachment #685926 -
Flags: review?(terrence)
Comment 5•12 years ago
|
||
Comment on attachment 685923 [details] [diff] [review]
move some Auto classes to header
Review of attachment 685923 [details] [diff] [review]:
-----------------------------------------------------------------
Nice, looks good.
Attachment #685923 -
Flags: review?(jcoppeard) → review+
Comment 6•12 years ago
|
||
Comment on attachment 685924 [details] [diff] [review]
move iteration code
Review of attachment 685924 [details] [diff] [review]:
-----------------------------------------------------------------
Ditto.
Attachment #685924 -
Flags: review?(jcoppeard) → review+
Comment 7•12 years ago
|
||
Comment on attachment 685922 [details] [diff] [review]
move root marking
Review of attachment 685922 [details] [diff] [review]:
-----------------------------------------------------------------
Nice!
::: js/src/gc/RootMarking.cpp
@@ +36,5 @@
> +typedef RootedValueMap::Entry RootEntry;
> +typedef RootedValueMap::Enum RootEnum;
> +
> +static inline bool
> +InFreeList(ArenaHeader *aheader, uintptr_t addr)
Whoops! I should have added the new exact marking code /above/ this function. Could you move InFreeList down so that it is next to the conservative marking instead of the exact marking?
Attachment #685922 -
Flags: review?(terrence) → review+
Comment 8•12 years ago
|
||
Comment on attachment 685925 [details] [diff] [review]
use AutoPrepareForTracing in verifier routines
Review of attachment 685925 [details] [diff] [review]:
-----------------------------------------------------------------
::: js/src/gc/Iteration.cpp
@@ -23,5 @@
> {
> JS_ASSERT(!IS_GC_MARKING_TRACER(trc));
>
> AutoPrepareForTracing prep(trc->runtime);
> - RecordNativeStackTopForGC(trc->runtime);
I assume this has moved somewhere else since I last poked around here?
::: js/src/jsgc.cpp
@@ +4685,4 @@
> return;
> + }
> +
> + AutoPrepareForTracing prep(rt);
Ooooh, shiny! I really should have read your cleanup patch when it landed.
Attachment #685925 -
Flags: review?(terrence) → review+
Comment 9•12 years ago
|
||
Comment on attachment 685926 [details] [diff] [review]
move verifier
Review of attachment 685926 [details] [diff] [review]:
-----------------------------------------------------------------
I don't see Verifier.cpp in this patch. Could you hg add it and re-upload?
Attachment #685926 -
Flags: review?(terrence)
Assignee | ||
Comment 10•12 years ago
|
||
Sorry, here it is with Verifier.cpp.
Attachment #685926 -
Attachment is obsolete: true
Attachment #686266 -
Flags: review?(terrence)
Updated•12 years ago
|
Whiteboard: [js:t]
Comment 11•12 years ago
|
||
Comment on attachment 686266 [details] [diff] [review]
move verifier, v2
Review of attachment 686266 [details] [diff] [review]:
-----------------------------------------------------------------
Unsurprisingly, there were no surprises :-). Probably should have just r+'ed it sight-unseen.
Attachment #686266 -
Flags: review?(terrence) → review+
Comment 12•12 years ago
|
||
Comment on attachment 686266 [details] [diff] [review]
move verifier, v2
Review of attachment 686266 [details] [diff] [review]:
-----------------------------------------------------------------
Unsurprisingly, there were no surprises :-). Probably should have just r+'ed it sight-unseen.
Assignee | ||
Comment 13•12 years ago
|
||
https://hg.mozilla.org/integration/mozilla-inbound/rev/7fe5182d6786
https://hg.mozilla.org/integration/mozilla-inbound/rev/e94baab35c63
https://hg.mozilla.org/integration/mozilla-inbound/rev/15115c5169da
https://hg.mozilla.org/integration/mozilla-inbound/rev/1edf3b8879cf
https://hg.mozilla.org/integration/mozilla-inbound/rev/07ce116d5ee8
Comment 14•12 years ago
|
||
https://hg.mozilla.org/mozilla-central/rev/7fe5182d6786
https://hg.mozilla.org/mozilla-central/rev/e94baab35c63
https://hg.mozilla.org/mozilla-central/rev/15115c5169da
https://hg.mozilla.org/mozilla-central/rev/1edf3b8879cf
https://hg.mozilla.org/mozilla-central/rev/07ce116d5ee8
Status: NEW → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla20
Comment 15•12 years ago
|
||
I think this might have broken the --enable-valgrind stack-scan
annotations. I now get a whole bunch of error reports when GC runs,
which go away when I add the patch in the next comment.
Comment 16•12 years ago
|
||
Comment 17•12 years ago
|
||
Julian, thanks for the patch! I noticed those too, but didn't have time to investigate.
Updated•12 years ago
|
Attachment #689194 -
Flags: review?(terrence)
Comment 18•12 years ago
|
||
Comment on attachment 689194 [details] [diff] [review]
Fix up valgrind stack-scan annotations
Review of attachment 689194 [details] [diff] [review]:
-----------------------------------------------------------------
I talked this over with Bill just now and we are agreed that we want to just depend on MOZ_VALGRIND and remove JS_VALGRIND, since we're just aliasing them anyway. This should be as simple as changing the #ifdef JS_VALGRIND in jsgc.cpp, gc/Verifier.cpp, and gc/RootMarking.cpp to MOZ_VALGRIND and simplifying the #include protection accordingly. R+ with the above trivial changes and the nit below.
::: js/src/gc/RootMarking.cpp
@@ +30,5 @@
> +#ifdef MOZ_VALGRIND
> +# define JS_VALGRIND
> +#endif
> +#ifdef JS_VALGRIND
> +# include <valgrind/memcheck.h>
It looks like we also should have this include in gc/Verifier.cpp.
Attachment #689194 -
Flags: review?(terrence) → review+
Comment 19•12 years ago
|
||
I wanted to test this so I went ahead an updated the nits. I'm not jseward, so please verify. :)
BTW, I don't see any valgrind markup in jsgc.cpp. Does it still need the include?
Attachment #689194 -
Attachment is obsolete: true
Attachment #689371 -
Flags: review?(terrence)
Comment 20•12 years ago
|
||
Comment on attachment 689371 [details] [diff] [review]
Fix up valgrind stack-scan annotations
Review of attachment 689371 [details] [diff] [review]:
-----------------------------------------------------------------
Awesome! \o/
Attachment #689371 -
Flags: review?(terrence) → review+
Comment 21•12 years ago
|
||
(In reply to Ralph Giles (:rillian) from comment #19)
> BTW, I don't see any valgrind markup in jsgc.cpp. Does it still need the
> include?
Good catch: probably not. You can go ahead and remove it.
Comment 22•12 years ago
|
||
Done, thanks. Carrying forward previous r+.
Can someone please push the valgrind fix to incoming? I don't have level 2.
Attachment #689371 -
Attachment is obsolete: true
Attachment #689802 -
Flags: checkin?
Updated•12 years ago
|
Updated•12 years ago
|
Attachment #689802 -
Flags: checkin?
Comment 23•12 years ago
|
||
Keywords: checkin-needed
Comment 24•12 years ago
|
||
Status: REOPENED → RESOLVED
Closed: 12 years ago → 12 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•