Method handle graph optimization in JVM Shijie Xu

  • Slides: 1
Download presentation
Method handle graph optimization in JVM Shijie Xu, David Bremner University of New Brunswick,

Method handle graph optimization in JVM Shijie Xu, David Bremner University of New Brunswick, IBM Canada Faculty of Computer Science Email: sx 3@unb. ca Motivation Invokedynamic is a new instruction in JVM 7 to support dynamic languages, i. e. ruby, groovy. Different from strong type languages, variable in dynamic languages does not have type until it is assigned. Therefore, it is necessary for JVM, as runtime environment, to support and optimize this language feature. Background Solutions: JVM collects multiple runtime method handle graphs knowledge, and data mine them for possible optimization, that are: 1, Method handle equivalence. 2, Frequent Method Handle pattern. 3, Mehtod Handle combination. Experimental results 40, 00% 35, 00% Both bootstrap and method handle graph are introduced to complete dynamic invocation. The former is a java method 30, 00% 25, 00% 20, 00% 10, 00% languages, on the other handle, transfers java dynamic call handle graph by dynamic language itself, it is independent and lacks of runtime knowledge of method handle graph. Contrast to language, jvm has overview of runtime MH graph knowledge and is capable of exerting more extensive optimization. d hr re d _t no b_ co u nt _s ha 1 m r_ fe ns so Though intensive optimization have been done on method ck et _t ra ea lis t a bl oc k gc _a rra y pr im es st fa pr or in t ff m g m c_ ba m b ri_ bo gu s 1 i _n ra l sp e ct ar lo _p rix at _c te on m s ra y _m so ar so _ um rti al _s is ts r _l pa e_ pl si m so on _c se rv e ca t al ev ng st ri ve _s ie its _b ve so al l ct m ie ns e_ _s ne co n so _ pl si m lis ts pi ra i ta t p_ lb ap de an m p_ ap ro l ct a fra se rv b 1 m ob l r_ fe ns et _t ra ap p_ fa ct o ria fib p_ g tri n e _s rg gc la e_ ap ck co u so _m ul tit hr ea de d 0, 00% nt to dynamic languages functions via division and aggregation. 5, 00% rit method handle graph. MH graph provided by dynamic 15, 00% w which is capable of linking dynamic language call name to a Series 1 The y-axis of above figure is ratio of equivalent method handle among the number of method handles during each test. The experimental result on indy benchmark above shows that there about 28% of method handles are classified equivalent. Therefore, reuse of existing optimized method handle object does not only help reduce usage of heap , but also speedup program via avoid of method handle initialization.