IIUC this is a glorified way to store exactly one bit of information,
namely
whether a code object is freshly generated and has never been aged before.
Wouldn't it be easier to store that bit of information in the code object
header? This could spare us from adding a NOP to every single method
prologue.
Also it would keep platform specific changes to a minimum.
This is a good point. I think it made sense storing this bit of
information in
the pre-existing nop on ARM, but was never happy with the added nop's in
ia32/x64 code. I've reworked this to use a bit in the code object, but
only for
FUNCTION types (I'm assuming if get around to optimizing a function then
there
is less chance it will only be run once and so benefit for preaging).
on execution --> go back to young, but increment a counter on the code
object.
Only needs to be 2 bits, but not in instruction stream.
When you age code, go directly to "old" if the execution count is only 1.
If
it's pinned at the max value, go through the old aging algorithm.
I'm not sure how the counter would help over the single bit of information
of
is_pre_aged. I've implemented this as a bit on the code object, please let
me
know if this is OK.
Also, please split this into 2 CLs, one for the resource management
framework
and one for the actual code aging.
As discussed offline, the resource framework code is already split into a
seperate CL (which is already submitted).
BTW, for resource constrained systems, why not just reduce the number of
GCs
to
one to reclaim code in general?
I tried this, but it gave a considerable reduction in performance for not
much
more of a peak code-space heap size reduction.
PTAL.
https://codereview.chromium.org/23480031/
--
--
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/groups/opt_out.