Smalltalk and tiered compile data
mroos at roos.com
Wed Feb 8 13:47:37 PST 2012
I think I am starting to get it.
My normal fallback creates a GWT and does a getTarget + setTarget on the
root callsite to put this GWT at the
head of the chain. I assume that this use of setTarget is as expected and
causes no problems. I think I
found this technique in some of your early code.
For the switchPoint approach I would set the first (root) target to a
switchPoint which invokes a new callsite
which then takes the normal fallback. This keeps the switchPoint at the
head with the GWT chain now
growing from the second callsite.
The invalidate path has a method handle which will create a new
switchPoint with fallbacks and place it
in the root callsite replacing the now dead switchPoint. This setTarget
will occur on the next invocation
of the root callSite after the invalidation.
This state is similar to the first after a bootstrap.
So I am going to do a lot of setTargets. One for each method cache miss
and again for every call site which
is invalidated plus any lookups it needs to do.
Given that every setTarget involves a safe point this sounds like it could
get expensive. Should I be
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the mlvm-dev