Blogs >>
ECOOP 2016
Sun 17 - Fri 22 July 2016 Rome, Italy
Mon 18 Jul 2016 14:50 - 15:20 at Alfieri - Session 3 Chair(s): Edd Barrett

A method handle (MH) is a reference to an underlying Java method with potential method type transformations. Multiple interconnected method handles form a method handle graph (MHG). Together with the Java Virtual Machine (JVM) instruction, invokedynamic, the implementation of MHGs is significant to dynamically typed language implementations on the JVM. Addressing the abundance of equivalent MHGs during program runtime, this paper presents an MHG equivalence model and an online Method Handle Deduplication System (MHDeS). The equivalence model determines the equivalence of two MHGs in terms of two kinds of keys, i.e., MH key and MHG key, which uniquely identify the transformation of an MH and an MHG, respectively. MHDeS is an implementation of the equivalence model. Instead of creating equivalent MHGs and then detecting their equivalency, MHDeS employs a light-weight structure, the MHG index key, which wraps constructor parameters of an MH. MHDeS uses a transformation index, fast-path comparison, and filters, to speed up the equivalency detection of an MHG index key. Our experimental results with the Computer Language Benchmark Game (CLBG) JRuby micro-indy show that 1) MHDeS with filter off can speed up the benchmark by 4.67% and reduces memory usage by 7.19% on average; 2) the deduplication result can be affected by the choice of MH transformations for filtering; 3) MHDeS can have the MH JIT compilation performed earlier; and 4) as much as 32% of MHG index keys are detected as non-unique and eliminated by MHDeS, and the expense for a single detection is trivial.

Preprint (icooolps-final4.pdf)578KiB