MHDeS: deduplicating method handle graphs for efficient dynamic JVM language implementations

Shijie Xu, David Bremner, Daniel Heidinga
{"title":"MHDeS: deduplicating method handle graphs for efficient dynamic JVM language implementations","authors":"Shijie Xu, David Bremner, Daniel Heidinga","doi":"10.1145/3012408.3012412","DOIUrl":null,"url":null,"abstract":"A method handle (MH) is a reference to an underlying Java method with potential method type transformations. Multiple inter-connected 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 equivalence, 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 equivalence detection of an MHG index key. Our experimental results with the Computer Language Benchmark Game (CLBG) JRuby micro-indy show that 1) MHDeS with filtering 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.","PeriodicalId":186136,"journal":{"name":"Proceedings of the 11th Workshop on Implementation, Compilation, Optimization of Object-Oriented Languages, Programs and Systems","volume":"187 2 1","pages":"0"},"PeriodicalIF":0.0000,"publicationDate":"2016-07-17","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":"3","resultStr":null,"platform":"Semanticscholar","paperid":null,"PeriodicalName":"Proceedings of the 11th Workshop on Implementation, Compilation, Optimization of Object-Oriented Languages, Programs and Systems","FirstCategoryId":"1085","ListUrlMain":"https://doi.org/10.1145/3012408.3012412","RegionNum":0,"RegionCategory":null,"ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":null,"EPubDate":"","PubModel":"","JCR":"","JCRName":"","Score":null,"Total":0}
引用次数: 3

Abstract

A method handle (MH) is a reference to an underlying Java method with potential method type transformations. Multiple inter-connected 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 equivalence, 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 equivalence detection of an MHG index key. Our experimental results with the Computer Language Benchmark Game (CLBG) JRuby micro-indy show that 1) MHDeS with filtering 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.
MHDeS:用于高效动态JVM语言实现的重复数据删除方法处理图
方法句柄(MH)是对具有潜在方法类型转换的底层Java方法的引用。多个相互连接的方法句柄形成一个方法句柄图(MHG)。与Java虚拟机(JVM)指令invokedynamic一起,mhg的实现对于JVM上的动态类型语言实现非常重要。针对程序运行过程中存在大量等价的重复数据删除系统(MHDeS)的问题,提出了MHG等价模型和在线方法处理重复数据删除系统(MHDeS)。等价模型通过MH键和MHG键这两种键来确定两个MHG的等价性,这两种键分别唯一标识一个MH和一个MHG的变换。MHDeS是等效模型的一种实现。MHDeS不是先创建等价的MHG,然后再检测它们的等价性,而是使用轻量级结构MHG索引键,它封装了MH的构造函数参数。MHDeS使用转换索引、快速路径比较和过滤器来加快MHG索引键的等价性检测。我们在计算机语言基准游戏(CLBG) JRuby micro-indy上的实验结果表明:1)关闭滤波后的MHDeS可以使基准测试的速度提高4.67%,平均减少7.19%的内存使用;2)选择MH变换进行过滤会影响重复数据删除的结果;3) mhde可以更早地执行MH JIT编译;4)多达32%的MHG索引键被mhde检测为非唯一并被消除,单个检测的费用微不足道。
本文章由计算机程序翻译,如有差异,请以英文原文为准。
求助全文
约1分钟内获得全文 求助全文
来源期刊
自引率
0.00%
发文量
0
×
引用
GB/T 7714-2015
复制
MLA
复制
APA
复制
导出至
BibTeX EndNote RefMan NoteFirst NoteExpress
×
提示
您的信息不完整,为了账户安全,请先补充。
现在去补充
×
提示
您因"违规操作"
具体请查看互助需知
我知道了
×
提示
确定
请完成安全验证×
copy
已复制链接
快去分享给好友吧!
我知道了
右上角分享
点击右上角分享
0
联系我们:info@booksci.cn Book学术提供免费学术资源搜索服务,方便国内外学者检索中英文文献。致力于提供最便捷和优质的服务体验。 Copyright © 2023 布克学术 All rights reserved.
京ICP备2023020795号-1
ghs 京公网安备 11010802042870号
Book学术文献互助
Book学术文献互助群
群 号:481959085
Book学术官方微信