Status: Accepted
Owner: ----
CC: rmcil...@chromium.org, erikco...@chromium.org,
verwa...@chromium.org, u...@chromium.org, hpa...@chromium.org,
joc...@chromium.org
Labels: Type-FeatureRequest Priority-Medium
New issue 4049 by rmcil...@chromium.org: Enable fast collection of run-once
code objects with lightweight pre-aging
https://code.google.com/p/v8/issues/detail?id=4049
On low-end devices we use pre-aging to enable collection of run-once code
on the second GC after the code was run (rather than >5 GC which is the
case normally). We only do this on low-end phones because the pre-aging
code involves patching the prologue of the code and thus slows down
execution speed of all functions.
It would be possible to provide a somewhat similar pre-aging of run-once
code without patching the code as follows:
- Reserve a bit on the code object (e.g., called BecameYoungOnce) which is
initially unset
- Code starts in the young code-age state
- On first GC if the code object's BecameYoungOnce is false, age the code
object to Octogenarian immediately
- if the code is never run, on the next GC it will be collected since
it is already 'old'
- if the code runs before the next GC it will transition to young
again, which will set the BecameYoungOnce bit, and any future code-age
transitions will be normal (e.g., starting at Quadragenarian and not being
collected for a few GCs).
This would not be as accurate as the current pre-aging approach (and
therefore we probably want to keep that for low-end devices), but could
provide good memory savings on higher-end devices with hopefully minimal
performance overhead.
--
You received this message because this project is configured to send all
issue notifications to this address.
You may adjust your notification preferences at:
https://code.google.com/hosting/settings
--
--
v8-dev mailing list
v8-dev@googlegroups.com
http://groups.google.com/group/v8-dev
---
You received this message because you are subscribed to the Google Groups "v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to v8-dev+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.