[9] RFR (M): 8057967: CallSite dependency tracking scales devastatingly poorly

John Rose john.r.rose at oracle.com
Thu Apr 2 20:21:03 UTC 2015

On Apr 2, 2015, at 9:17 AM, Vladimir Ivanov <vladimir.x.ivanov at oracle.com> wrote:
>> I recommend putting CONTEXT_OFFSET into CallSite, not the nested class.
>> For one thing, your getDeclaredField call will fail (I think) with a security manager installed.
>> You can load it up where TARGET_OFFSET is initialized.
> Since I removed DependencyContext, I moved CONTEXT_OFFSET to CallSite.
> BTW why do you think security manager was the problem? (1) Class.getDeclaredField() is caller-sensitive; and (2) DependencyContext was eagerly initialized with CallSite (see UNSAFE.ensureClassInitialized() in original version).

CallSite$DependencyContext and CallSite are distinct classes.
At the JVM level they cannot access each others' private members.
So if DependencyContext wants to reflect a private field from CallSite,
there will be extra security checks.  These sometimes fail, as in:


— John

More information about the core-libs-dev mailing list