期刊文献+

基于跨语言对象迁移策略的复合本地对象模型 被引量:4

A Compound Native Object Model Based on the Strategy of Cross-Language Object Migration
下载PDF
导出
摘要 Java本地调用接口(Java native interface,JNI)机制被广泛应用在移动应用开发领域.JNI机制中JNI接口函数被用于在本地代码中解析和转换Java端的数据类型和Java对象.然而,JNI接口函数的调用开销影响了程序运行的效率,其复杂的使用规范也是集成与复用第三方本地组件时的主要障碍.提出一种基于跨语言对象迁移策略的复合本地对象模型,能够实现有效减少本地调用程序中的JNI接口函数调用开销和有效利用已有本地组件的目的.详细讨论了复合本地对象的语言特性及其具体实现,并给出跨语言对象迁移规范以及开发实例.在Dalvik虚拟机中实现了该模型,通过实验证明该策略和模型能够有效改善JNI机制的不足. The Java native interface (JNI) mechanism, which is designed to handle the interaction between native code and Java code, is currently widely utilized to develop mobile applications. However, JNI is observed hardly from perfection in two points: on one hand, the overhead of invoking functions of JNI interfaces heavily affects programs' runtime performance; on the other hand, the complexity of the JNI's programming specification prevents the integration and reusing of third party native components in Java code. To solve these problems, a new strategy is advised to migrate objects between Java components and native components by injecting necessary information of native objects into high-level objects. Guided by this strategy, a model of compound native objects (CNO) is proposed to integrate a Java object and a native object into a compound object which share same metadata maintained by Java class objects. Therefore the CNO model could literally reduce the overheads for the time saving of data type conversions, and lessen down the programming burden of the bridging code. A prototype of the CNO model is implemented on the basis of the Dalvik virtual machine such that Java could reuse third party components in a dynamical and efficient way. Experiments show that the CNO model outweighs JNI in better performance of accessing native methods.
出处 《计算机研究与发展》 EI CSCD 北大核心 2015年第1期141-155,共15页 Journal of Computer Research and Development
基金 国家科技重大专项基金项目(2009ZX03004-005) “核高基”国家科技重大专项基金项目(2009ZX01039-002-002)
关键词 Java本地调用接口 跨语言 本地组件 元数据 DALVIK虚拟机 Java native interface (JNI) cross-ianguage native component metadata Dalvik virtual machine
  • 相关文献

参考文献35

  • 1Fernande A.Microsoft Java Virtual Machine[M].British Columbia,Canada:Spire,2012:10-88.
  • 2蒋章概,陈榕.基于CAR构件的WebKit本地扩展策略[J].计算机应用,2009,29(B12):195-197. 被引量:11
  • 3Ciacca F,Flamia S,Trevisti G.Process,apparatus andsystem for executing mhp applications:Germany,PCT/IT2005/000,719[P].2005-12-07.
  • 4Jawin H S.An open source interoperability solution[EB/OL].(2001-11-14)[2013-06-30].http://www.onjava.com/pub/a/onjava/2001/11 / 14/jawin.html.
  • 5Bornstein D.Dalvik VM internals[C]//Proc of the Google I/O Developer Conf.San Francisco:Google,2008:1-58.
  • 6Chen Miaobo,Goldenberg S,Srinivas S,et al.Java JNIBridge:A framework for mixed native ISA execution[C]//Proc of the 4th Int Symp on Code Generation and Optimization.Piscataway,NJ:IEEE,2006:65-75.
  • 7郑炜,陈榕,苏翼鹏,殷人昆.CAR构件编程技术中的自描述特性[J].计算机工程与应用,2005,41(9):95-98. 被引量:4
  • 8Kim Y J,Cho S J,Kim K J,et al.Benchmarking Javaapplication using JNI and native C application on Android[C]//Proc of the 12th Int Conf on Control,Automation and Systems(ICCAS).Piscataway,NJ:IEEE,2012:284-287.
  • 9Lin Chengmin,Lin J H,Dow C R,et al.Benchmark dalvikand native code for android system[C]//Proc of the 2nd IntConf on Innovations in Bio-inspired Computing and Applications.Piscataway,NJ:IEEE,2011;320-323.
  • 10Newhall T,Miller B P.Performance measurement ofdynamically compiled Java executions[C]//Proc of the 1999 ACM Conf on Java Grande.New York:ACM,1999:42-50.

二级参考文献51

  • 1吴丽贤,李丽,和力.基于COM的自动化及其实现的几种方式[J].德州学院学报,2002,18(2):74-77. 被引量:3
  • 2冯正全.COM原理概述[J].成都信息工程学院学报,2004,19(3):398-402. 被引量:11
  • 3来社安.在Java中访问自动化COM组件[J].电脑知识与技术,2006,1(4):111-112. 被引量:1
  • 4C.League,Z.Shao,V.Trifonov.Type-preserving compiler of feather-weight Java.ACM Trans.Programming Language and Systems,2002,24(2):112~152.
  • 5C.League,Z.Shao,V.Trifonov.Precision in practice:A typepreserving Java compiler.The 12th Int'l Conf.Compiler Construction (CC'03),Warsaw,Poland,2003.
  • 6Neal Glew.An efficient class and object encoding.STAR Lab,Tech.Rep.:STAR-TR-00.07-02,2000.
  • 7Samuel Kamin.Inheritance in Smalltalk-80:A denotational definition.The 15th ACM SIGACT-SIGPLAN Symposium on Principles of Programming Languages,San Diego,1988.
  • 8K.B.Bruce,L.Cardelli,B.C.Pierce.Comparing object encodings.Information and Computation,1999,155(1/2):108~133.
  • 9G.Necula.Proof-carrying code.ACM Symp.Principles of Programming Language,New York,1997.
  • 10G.Morrisett,D.Walker,K.Crary,et al.From system F to typed assembly language.ACM Trans.Programming Languages and Systems,1999,21(3):528~569.

共引文献72

同被引文献17

引证文献4

二级引证文献1

相关作者

内容加载中请稍等...

相关机构

内容加载中请稍等...

相关主题

内容加载中请稍等...

浏览历史

内容加载中请稍等...
;
使用帮助 返回顶部