Add a pref to control the order of weak and gray marking
Categories
(Core :: JavaScript: GC, task, P3)
Tracking
()
People
(Reporter: jonco, Unassigned)
Details
Attachments
(1 obsolete file)
Currently the order of black, gray and weak marking looks something like this:
- mark from black roots
- mark from gray roots
- mark black through weak edges
- mark gray through weak edges
It's possible for some things to get marked gray in (2) and then later get marked black in (3). Since marking things twice is wasteful we'd like to experiment with a different order:
- mark from black roots
- mark black through weak edges
- mark from gray roots
- mark gray through weak edges
Depending on factors like the number of weak edges and the number of gray roots this may or may not make any difference. To allow us to compare the two approaches we can add a pref and this should allow us to run with a trial on a subset of nightly users.
Comment 1•4 years ago
|
||
It would be nice if this pref could get fuzzed, too, as I can imagine stuff accidentally depending on the order.
Reporter | ||
Comment 2•4 years ago
|
||
Reporter | ||
Comment 3•4 years ago
|
||
I wrote a patch to mark weak edges before tracing gray roots, but it doesn't work:
https://treeherder.mozilla.org/#/jobs?repo=try&revision=ccc8ac43f776dd49e61187424eab6c0d9b848445
I get lots of weak marking failures like:
[task 2020-09-01T09:10:45.814Z] 09:10:45 INFO - GECKO(4046) | WeakMap value is less marked than map and key
[task 2020-09-01T09:10:45.818Z] 09:10:45 INFO - GECKO(4046) | (map 0x7f301e3a5d60 is black, key 0x7c492bcd500 is black, value 0x350ac2a5caf0 is gray)
[task 2020-09-01T09:10:45.819Z] 09:10:45 INFO - GECKO(4046) | Key:
[task 2020-09-01T09:10:45.820Z] 09:10:45 INFO - GECKO(4046) | object 7c492bcd500
[task 2020-09-01T09:10:45.822Z] 09:10:45 INFO - GECKO(4046) | compartment 7f301eb7d2a0
[task 2020-09-01T09:10:45.823Z] 09:10:45 INFO - GECKO(4046) | class 7f3030b28ce8 Proxy
[task 2020-09-01T09:10:45.823Z] 09:10:45 INFO - GECKO(4046) | group 90181fe4160
[task 2020-09-01T09:10:45.824Z] 09:10:45 INFO - GECKO(4046) | flags: maybe_has_interesting_symbol not_native
[task 2020-09-01T09:10:45.825Z] 09:10:45 INFO - GECKO(4046) | proto <dynamic>
[task 2020-09-01T09:10:45.826Z] 09:10:45 INFO - GECKO(4046) | Delegate:
[task 2020-09-01T09:10:45.826Z] 09:10:45 INFO - GECKO(4046) | object 7c492b7fc40
[task 2020-09-01T09:10:45.827Z] 09:10:45 INFO - GECKO(4046) | global 2be882da2c40 [Window]
[task 2020-09-01T09:10:45.828Z] 09:10:45 INFO - GECKO(4046) | class 7f3030876478 Location
[task 2020-09-01T09:10:45.834Z] 09:10:45 INFO - GECKO(4046) | group 350ac2a03af0
[task 2020-09-01T09:10:45.835Z] 09:10:45 INFO - GECKO(4046) | flags: maybe_has_interesting_symbol not_native
[task 2020-09-01T09:10:45.836Z] 09:10:45 INFO - GECKO(4046) | proto <dynamic>
[task 2020-09-01T09:10:45.836Z] 09:10:45 INFO - GECKO(4046) | Value:
[task 2020-09-01T09:10:45.837Z] 09:10:45 INFO - GECKO(4046) | object 350ac2a5caf0
[task 2020-09-01T09:10:45.838Z] 09:10:45 INFO - GECKO(4046) | global 90181f77060 [BackstagePass]
[task 2020-09-01T09:10:45.839Z] 09:10:45 INFO - GECKO(4046) | class 7f3030b26be8 Object
[task 2020-09-01T09:10:45.839Z] 09:10:45 INFO - GECKO(4046) | group ab16b503250
[task 2020-09-01T09:10:45.840Z] 09:10:45 INFO - GECKO(4046) | flags:
[task 2020-09-01T09:10:45.841Z] 09:10:45 INFO - GECKO(4046) | proto <Object at 90181f7a040>
[task 2020-09-01T09:10:45.841Z] 09:10:45 INFO - GECKO(4046) | properties:
[task 2020-09-01T09:10:45.842Z] 09:10:45 INFO - GECKO(4046) | [Latin 1]"proxy": <Proxy object at 7c492bd7f00> (shape ab16b500b28 enumerate slot 0)
I'm not sure what's going on here.
Updated•3 years ago
|
Updated•2 years ago
|
Description
•