首页 > 最新文献

Principles and Practice of Programming in Java最新文献

英文 中文
ejIP: a TCP/IP stack for embedded Java ejIP:用于嵌入式Java的TCP/IP栈
Pub Date : 2011-08-24 DOI: 10.1145/2093157.2093167
Martin Schoeberl
To enable Java on resource constraint embedded devices, the whole system should be implemented in a single programming language to avoid overheads on language boundaries. However, most of the functionality that is dedicated to the operating system layer is usually written in C. In this paper we present the design and implementation of a network stack written entirely in Java. This implementation serves as an example how to implement system functions in a safe language and gives evidence that Java can be used for operating system related functionality. The described TCP/IP stack ejIP has already been successfully used in industrial projects on pure Java embedded systems.
为了在资源受限的嵌入式设备上启用Java,整个系统应该用一种编程语言实现,以避免语言边界上的开销。然而,大多数专用于操作系统层的功能通常是用c语言编写的。在本文中,我们提出了一个完全用Java编写的网络堆栈的设计和实现。这个实现作为一个如何用安全语言实现系统功能的例子,并证明了Java可以用于操作系统相关的功能。所描述的TCP/IP栈ejIP已经成功地应用于纯Java嵌入式系统的工业项目中。
{"title":"ejIP: a TCP/IP stack for embedded Java","authors":"Martin Schoeberl","doi":"10.1145/2093157.2093167","DOIUrl":"https://doi.org/10.1145/2093157.2093167","url":null,"abstract":"To enable Java on resource constraint embedded devices, the whole system should be implemented in a single programming language to avoid overheads on language boundaries. However, most of the functionality that is dedicated to the operating system layer is usually written in C. In this paper we present the design and implementation of a network stack written entirely in Java. This implementation serves as an example how to implement system functions in a safe language and gives evidence that Java can be used for operating system related functionality. The described TCP/IP stack ejIP has already been successfully used in industrial projects on pure Java embedded systems.","PeriodicalId":169989,"journal":{"name":"Principles and Practice of Programming in Java","volume":"7 1","pages":"0"},"PeriodicalIF":0.0,"publicationDate":"2011-08-24","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":null,"resultStr":null,"platform":"Semanticscholar","paperid":"116938446","PeriodicalName":null,"FirstCategoryId":null,"ListUrlMain":null,"RegionNum":0,"RegionCategory":"","ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":"","EPubDate":null,"PubModel":null,"JCR":null,"JCRName":null,"Score":null,"Total":0}
引用次数: 1
Fine-grained adaptive biased locking 细粒度自适应偏置锁定
Pub Date : 2011-08-24 DOI: 10.1145/2093157.2093184
F. Pizlo, Daniel Frampton, Antony Lloyd Hosking
Mutual-exclusion locking is the prevailing technique for protecting shared resources in concurrent programs. Fine-grained locking maximizes the opportunities for concurrent execution while preserving correctness, but increases both the number of locks and the frequency of lock operations. Adding to the frequency of these operations is the practice of using locks defensively --- such as in library code designed for use in both concurrent and single-threaded scenarios. If the library does not protect itself with locks, an engineering burden is placed on the library's users; if the library does use locks, it punishes those who use it only from a single thread. Biased locking is a dynamic protocol for eliminating this trade-off, in which the underlying run-time system optimizes lock operations by biasing a lock to a specific thread when the lock is dynamically found to be thread-local. Biased locking protocols are distinguished by how many opportunities for optimization are found, and what performance trade-offs for non-local locks are experienced. Of particular concern is the relatively high cost involved in revoking the bias of a lock, which makes existing biased locking protocols susceptible to performance pathologies for programs with specific patterns of contention. This work presents the biased locking protocol used in Jikes RVM, a high-throughput Java virtual machine. The protocol, dubbed Fable, builds on prior work by adding per-object-instance dynamic adaptation and inexpensive bias revocation. We describe the protocol, detail how it was implemented, and use it in offering the most thorough evaluation of Java locking protocols to date. Fable is shown to provide speed-ups over traditional Java locking across a broad spectrum of benchmarks while being robust to cases previous protocols handled poorly.
互斥锁是并发程序中保护共享资源的常用技术。细粒度锁定在保持正确性的同时最大化了并发执行的机会,但同时增加了锁的数量和锁操作的频率。防御性地使用锁的做法增加了这些操作的频率——比如在设计用于并发和单线程场景的库代码中。如果库不使用锁来保护自己,则会给库的用户带来工程负担;如果库确实使用了锁,它会惩罚那些只在单个线程中使用锁的人。偏置锁定是一种消除这种权衡的动态协议,在这种协议中,底层运行时系统在动态地发现锁是线程本地的时候,通过将锁偏置到特定线程来优化锁操作。有偏锁协议的区别在于找到了多少优化机会,以及非本地锁经历了哪些性能权衡。特别值得关注的是,撤销锁的偏置所涉及的相对较高的成本,这使得具有特定争用模式的程序的现有偏置锁定协议容易受到性能问题的影响。本文介绍了Jikes RVM(一个高吞吐量Java虚拟机)中使用的偏锁协议。这个被称为“寓言”的协议建立在先前工作的基础上,增加了每个对象实例的动态适应和廉价的偏见撤销。我们描述了该协议,详细介绍了它是如何实现的,并使用它对Java锁定协议进行了迄今为止最全面的评估。事实证明,在广泛的基准测试中,Fable提供了比传统Java锁定更快的速度,同时对以前协议处理不佳的情况也很健壮。
{"title":"Fine-grained adaptive biased locking","authors":"F. Pizlo, Daniel Frampton, Antony Lloyd Hosking","doi":"10.1145/2093157.2093184","DOIUrl":"https://doi.org/10.1145/2093157.2093184","url":null,"abstract":"Mutual-exclusion locking is the prevailing technique for protecting shared resources in concurrent programs. Fine-grained locking maximizes the opportunities for concurrent execution while preserving correctness, but increases both the number of locks and the frequency of lock operations. Adding to the frequency of these operations is the practice of using locks defensively --- such as in library code designed for use in both concurrent and single-threaded scenarios. If the library does not protect itself with locks, an engineering burden is placed on the library's users; if the library does use locks, it punishes those who use it only from a single thread. Biased locking is a dynamic protocol for eliminating this trade-off, in which the underlying run-time system optimizes lock operations by biasing a lock to a specific thread when the lock is dynamically found to be thread-local. Biased locking protocols are distinguished by how many opportunities for optimization are found, and what performance trade-offs for non-local locks are experienced. Of particular concern is the relatively high cost involved in revoking the bias of a lock, which makes existing biased locking protocols susceptible to performance pathologies for programs with specific patterns of contention.\u0000 This work presents the biased locking protocol used in Jikes RVM, a high-throughput Java virtual machine. The protocol, dubbed Fable, builds on prior work by adding per-object-instance dynamic adaptation and inexpensive bias revocation. We describe the protocol, detail how it was implemented, and use it in offering the most thorough evaluation of Java locking protocols to date. Fable is shown to provide speed-ups over traditional Java locking across a broad spectrum of benchmarks while being robust to cases previous protocols handled poorly.","PeriodicalId":169989,"journal":{"name":"Principles and Practice of Programming in Java","volume":"52 1","pages":"0"},"PeriodicalIF":0.0,"publicationDate":"2011-08-24","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":null,"resultStr":null,"platform":"Semanticscholar","paperid":"133229318","PeriodicalName":null,"FirstCategoryId":null,"ListUrlMain":null,"RegionNum":0,"RegionCategory":"","ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":"","EPubDate":null,"PubModel":null,"JCR":null,"JCRName":null,"Score":null,"Total":0}
引用次数: 20
Jazz2: a flexible and extensible framework for structural testing in a Java VM Jazz2:用于在Java VM中进行结构测试的灵活且可扩展的框架
Pub Date : 2011-08-24 DOI: 10.1145/2093157.2093169
Jonathan Misurda, B. Childers, M. Soffa
This paper describes a framework for structural testing in a Java Virtual Machine (JVM), called Jazz2. The framework provides instrumentation, memory management, control flow analysis, and callback handling services for structural tests, such as branch and node coverage. Additionally, it has a language for the specification of how and where to test. These facilities allow for the efficient implementation of demand-driven and static testing techniques. Jazz2 supports an extensible test library, where new tests can be easily added. The paper describes the framework, its implementation, and evaluates how the framework interacts with a JVM, the Jikes Research Virtual Machine (RVM). We demonstrate the ease of implementing a structural test in Jazz2, extending the test library, and specifying the use of these tests with our language. Our experimental results show that Jazz2 has low overhead in both time and memory, and has minimal interaction with the RVM's garbage collector.
本文描述了一个用于在Java虚拟机(JVM)(称为Jazz2)中进行结构测试的框架。该框架为结构测试(如分支和节点覆盖)提供工具、内存管理、控制流分析和回调处理服务。此外,它有一种语言来说明如何以及在哪里进行测试。这些设施允许有效地实现需求驱动和静态测试技术。Jazz2支持一个可扩展的测试库,在这个库中可以很容易地添加新的测试。本文描述了该框架及其实现,并评估了该框架如何与JVM (Jikes Research Virtual Machine, RVM)交互。我们演示了在Jazz2中实现结构测试、扩展测试库以及用我们的语言指定这些测试的使用的简单性。我们的实验结果表明,Jazz2在时间和内存方面的开销都很低,并且与RVM的垃圾收集器的交互最小。
{"title":"Jazz2: a flexible and extensible framework for structural testing in a Java VM","authors":"Jonathan Misurda, B. Childers, M. Soffa","doi":"10.1145/2093157.2093169","DOIUrl":"https://doi.org/10.1145/2093157.2093169","url":null,"abstract":"This paper describes a framework for structural testing in a Java Virtual Machine (JVM), called Jazz2. The framework provides instrumentation, memory management, control flow analysis, and callback handling services for structural tests, such as branch and node coverage. Additionally, it has a language for the specification of how and where to test. These facilities allow for the efficient implementation of demand-driven and static testing techniques. Jazz2 supports an extensible test library, where new tests can be easily added. The paper describes the framework, its implementation, and evaluates how the framework interacts with a JVM, the Jikes Research Virtual Machine (RVM). We demonstrate the ease of implementing a structural test in Jazz2, extending the test library, and specifying the use of these tests with our language. Our experimental results show that Jazz2 has low overhead in both time and memory, and has minimal interaction with the RVM's garbage collector.","PeriodicalId":169989,"journal":{"name":"Principles and Practice of Programming in Java","volume":"60 1","pages":"0"},"PeriodicalIF":0.0,"publicationDate":"2011-08-24","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":null,"resultStr":null,"platform":"Semanticscholar","paperid":"130139812","PeriodicalName":null,"FirstCategoryId":null,"ListUrlMain":null,"RegionNum":0,"RegionCategory":"","ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":"","EPubDate":null,"PubModel":null,"JCR":null,"JCRName":null,"Score":null,"Total":0}
引用次数: 4
Eliminating partially-redundant array-bounds check in the Android Dalvik JIT compiler 消除了Android Dalvik JIT编译器中部分冗余的数组边界检查
Pub Date : 2011-08-24 DOI: 10.1145/2093157.2093175
J. Absar, Deepak Shekhar
The Android operating system has transformed the mobile software platform landscape significantly. A significant component of the Android is the Dalvik Virtual Machine (DVM) that interprets client applications' codes written in Java and compiled to dexcode. Since interpretation is inherently slow, virtual machines typically employ just-in-time (JIT) compilation. In the Froyo 2.2 release of Android, DVM added a JIT compiler that selectively compiles hot-traces to native ARM code. Some crucial optimizations such as array bounds-check optimization have been implemented in the DVM-JIT compiler. DVM implements an extension of the state-of-the-art in optimization of partially-redundant array-bounds check, which is the approach of Wurthinger et al. as implemented in Java Hot-Spot Compiler. That technique has a limitation that it can optimize bounds checks only for indices that are "iterator plus a constant". In this paper, we tackle that problem by proposing an extension that can handle indices that are "affine functions of iterators, loop-invariants and literals". Our extension is fast and is implemented into the DVM JIT compiler.
Android操作系统极大地改变了移动软件平台的格局。Android的一个重要组成部分是Dalvik虚拟机(DVM),它解释用Java编写的客户端应用程序代码并编译为dexcode。由于解释本身很慢,虚拟机通常采用即时(JIT)编译。在Android的Froyo 2.2版本中,DVM添加了一个JIT编译器,可以选择性地将热跟踪编译为本机ARM代码。一些关键的优化,如数组边界检查优化,已经在DVM-JIT编译器中实现。DVM实现了对部分冗余数组边界检查优化的最新技术的扩展,这是Wurthinger等人在Java Hot-Spot Compiler中实现的方法。这种技术有一个限制,它只能为“迭代器加常量”的索引优化边界检查。在本文中,我们通过提出一个扩展来解决这个问题,该扩展可以处理“迭代器、循环不变量和字面量的仿射函数”的索引。我们的扩展速度很快,并在DVM JIT编译器中实现。
{"title":"Eliminating partially-redundant array-bounds check in the Android Dalvik JIT compiler","authors":"J. Absar, Deepak Shekhar","doi":"10.1145/2093157.2093175","DOIUrl":"https://doi.org/10.1145/2093157.2093175","url":null,"abstract":"The Android operating system has transformed the mobile software platform landscape significantly. A significant component of the Android is the Dalvik Virtual Machine (DVM) that interprets client applications' codes written in Java and compiled to dexcode. Since interpretation is inherently slow, virtual machines typically employ just-in-time (JIT) compilation. In the Froyo 2.2 release of Android, DVM added a JIT compiler that selectively compiles hot-traces to native ARM code. Some crucial optimizations such as array bounds-check optimization have been implemented in the DVM-JIT compiler. DVM implements an extension of the state-of-the-art in optimization of partially-redundant array-bounds check, which is the approach of Wurthinger et al. as implemented in Java Hot-Spot Compiler. That technique has a limitation that it can optimize bounds checks only for indices that are \"iterator plus a constant\". In this paper, we tackle that problem by proposing an extension that can handle indices that are \"affine functions of iterators, loop-invariants and literals\". Our extension is fast and is implemented into the DVM JIT compiler.","PeriodicalId":169989,"journal":{"name":"Principles and Practice of Programming in Java","volume":"23 1","pages":"0"},"PeriodicalIF":0.0,"publicationDate":"2011-08-24","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":null,"resultStr":null,"platform":"Semanticscholar","paperid":"121530453","PeriodicalName":null,"FirstCategoryId":null,"ListUrlMain":null,"RegionNum":0,"RegionCategory":"","ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":"","EPubDate":null,"PubModel":null,"JCR":null,"JCRName":null,"Score":null,"Total":0}
引用次数: 4
The Java Virtual Machine in retargetable, high-performance instruction set simulation 实现了Java虚拟机中的可重标、高性能指令集仿真
Pub Date : 2011-08-24 DOI: 10.1145/2093157.2093161
M. Kaufmann, Matthias Häsing, Thomas B. Preußer, R. Spallek
Two main demands on instruction set simulation are portability and high simulation performance. For the testing and benchmarking of ISA prototypes such as in an ASIP design process, simulators are additionally required to offer retargetability for the rapid modeling and revisal of their simulation targets. In this paper, we present the techniques applied in a full-system instruction set simulation framework that combines these three conflicting demands. Our framework is retargetable, portable and provides high simulation performance. It is entirely implemented in Java and features a two-stage dynamic binary translation (DBT) targeting Java Bytecode in the first stage and employing the Java Virtual Machine as an external code generation back end in the second stage. While the use of state-of-the-art techniques such as DBT generates high simulation performance, the framework is also platform independent and can run on any J2SE-compliant Java Runtime Environment. In spite of this platform independence, the native code generated in the second stage will even profit from the platform-specific optimizations performed by modern JVM implementations. Our second contribution is HPADL, the instruction set description language that provides the retargetability of our framework. HPADL is tailored for the specific needs of dynamically compiling full-system IS simulation. Due to its clean separation of concerns between the instruction decoding and instruction execution, it easily enables DBT. Also, it is not restricted to a specific range of target architectures such as RISC. In this paper, we will compare the modeling effort in HPADL to that of QEMU. For our experiments and in order to show the practicability and flexibility of our approach, we implemented HPADL models of the DLX, 8086, ARMv4 and PowerPC/PowerPC VLE ISA as well as some IO device models in Java. A comparison with the simulation performance of QEMU by reference of the EEMBC AutoBench 1.1 shows that we achieve 78% of the QEMU performance on average.
指令集仿真的两个主要要求是可移植性和高仿真性能。对于ISA原型的测试和基准测试,例如在ASIP设计过程中,还需要模拟器提供可重定向性,以便快速建模和修改其仿真目标。在本文中,我们提出了在结合这三个相互冲突的需求的全系统指令集仿真框架中应用的技术。我们的框架是可重定向的,可移植的,并提供高仿真性能。它完全是用Java实现的,在第一阶段以Java字节码为目标,采用两阶段动态二进制转换(DBT),在第二阶段使用Java虚拟机作为外部代码生成后端。虽然使用最先进的技术(如DBT)可以生成高模拟性能,但该框架也是独立于平台的,并且可以在任何符合j2ee的Java运行时环境上运行。尽管有这种平台独立性,但在第二阶段生成的本机代码甚至可以从现代JVM实现执行的特定于平台的优化中获益。我们的第二个贡献是HPADL,这是一种指令集描述语言,它提供了框架的可重定向性。HPADL是为动态编译全系统is仿真的特定需求量身定制的。由于它清晰地分离了指令解码和指令执行之间的关注点,因此很容易实现DBT。此外,它并不局限于特定的目标体系结构范围,例如RISC。在本文中,我们将比较HPADL和QEMU的建模工作。在我们的实验中,为了展示我们方法的实用性和灵活性,我们在Java中实现了DLX、8086、ARMv4和PowerPC/PowerPC VLE ISA的HPADL模型以及一些IO设备模型。通过参考EEMBC AutoBench 1.1与QEMU的仿真性能进行比较,结果表明我们平均达到了QEMU性能的78%。
{"title":"The Java Virtual Machine in retargetable, high-performance instruction set simulation","authors":"M. Kaufmann, Matthias Häsing, Thomas B. Preußer, R. Spallek","doi":"10.1145/2093157.2093161","DOIUrl":"https://doi.org/10.1145/2093157.2093161","url":null,"abstract":"Two main demands on instruction set simulation are portability and high simulation performance. For the testing and benchmarking of ISA prototypes such as in an ASIP design process, simulators are additionally required to offer retargetability for the rapid modeling and revisal of their simulation targets.\u0000 In this paper, we present the techniques applied in a full-system instruction set simulation framework that combines these three conflicting demands. Our framework is retargetable, portable and provides high simulation performance. It is entirely implemented in Java and features a two-stage dynamic binary translation (DBT) targeting Java Bytecode in the first stage and employing the Java Virtual Machine as an external code generation back end in the second stage. While the use of state-of-the-art techniques such as DBT generates high simulation performance, the framework is also platform independent and can run on any J2SE-compliant Java Runtime Environment. In spite of this platform independence, the native code generated in the second stage will even profit from the platform-specific optimizations performed by modern JVM implementations. Our second contribution is HPADL, the instruction set description language that provides the retargetability of our framework. HPADL is tailored for the specific needs of dynamically compiling full-system IS simulation. Due to its clean separation of concerns between the instruction decoding and instruction execution, it easily enables DBT. Also, it is not restricted to a specific range of target architectures such as RISC. In this paper, we will compare the modeling effort in HPADL to that of QEMU. For our experiments and in order to show the practicability and flexibility of our approach, we implemented HPADL models of the DLX, 8086, ARMv4 and PowerPC/PowerPC VLE ISA as well as some IO device models in Java. A comparison with the simulation performance of QEMU by reference of the EEMBC AutoBench 1.1 shows that we achieve 78% of the QEMU performance on average.","PeriodicalId":169989,"journal":{"name":"Principles and Practice of Programming in Java","volume":"32 1","pages":"0"},"PeriodicalIF":0.0,"publicationDate":"2011-08-24","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":null,"resultStr":null,"platform":"Semanticscholar","paperid":"129764218","PeriodicalName":null,"FirstCategoryId":null,"ListUrlMain":null,"RegionNum":0,"RegionCategory":"","ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":"","EPubDate":null,"PubModel":null,"JCR":null,"JCRName":null,"Score":null,"Total":0}
引用次数: 6
Optimized memory management for class metadata in a JVM 为JVM中的类元数据优化了内存管理
Pub Date : 2011-08-24 DOI: 10.1145/2093157.2093182
Thomas Schatzl, L. Daynès, H. Mössenböck
A Java virtual machine (JVM) typically manages large amounts of class metadata (e.g. class descriptors, methods, byte codes) in main-memory. In this paper, we analyze the impact of metadata memory management on garbage collection costs in an industrial-strength JVM. We show that, for most applications in the latest DaCapo benchmark suite, the tracing of class metadata accounts for a significant part of full collection time. We propose a novel approach to metadata memory management based on metaspaces and on a linkset graph. Metaspaces store class metadata segregated by their class loader and keep an exact record of references from class metadata to the heap. The linkset graph summarizes what metaspaces reference others via resolved symbolic links. Metaspaces allow en masse reclamation of the storage allocated to classes defined by a class loader when this class loader becomes unreachable. The linkset graph eliminates the need to trace references between metadata to determine the liveness of classes and of the heap objects they refer to. This reduces the number of visited references in class metadata to less than 1% of the original amount and cuts down tracing time by up to 80%. Average full heap collection time improves by at least 35% for all but one of the Dacapo benchmarks, and by more than 70% for six of them. Metaspace-based management of class metadata also extends well to multi-tasking implementations of the JVM. It enables tasks to unload classes independently of other tasks.
Java虚拟机(JVM)通常在主存中管理大量的类元数据(例如类描述符、方法、字节码)。在本文中,我们分析了在工业级JVM中元数据内存管理对垃圾收集成本的影响。我们表明,对于最新的DaCapo基准套件中的大多数应用程序,类元数据的跟踪占完整收集时间的很大一部分。我们提出了一种基于元空间和链接集图的元数据内存管理新方法。元空间存储由其类装入器隔离的类元数据,并保留从类元数据到堆的引用的精确记录。链接集图总结了元空间通过解析的符号链接引用其他元空间的内容。元空间允许在类装入器无法访问时,对分配给类装入器定义的类的存储进行大规模回收。链接集图不需要跟踪元数据之间的引用,以确定类和它们所引用的堆对象的活跃度。这将类元数据中访问的引用数量减少到不到原始数量的1%,并将跟踪时间减少多达80%。除了一个Dacapo基准测试之外,其他所有基准测试的平均满堆收集时间至少提高了35%,其中六个基准测试的平均满堆收集时间提高了70%以上。基于元空间的类元数据管理也可以很好地扩展到JVM的多任务实现。它使任务能够独立于其他任务卸载类。
{"title":"Optimized memory management for class metadata in a JVM","authors":"Thomas Schatzl, L. Daynès, H. Mössenböck","doi":"10.1145/2093157.2093182","DOIUrl":"https://doi.org/10.1145/2093157.2093182","url":null,"abstract":"A Java virtual machine (JVM) typically manages large amounts of class metadata (e.g. class descriptors, methods, byte codes) in main-memory. In this paper, we analyze the impact of metadata memory management on garbage collection costs in an industrial-strength JVM. We show that, for most applications in the latest DaCapo benchmark suite, the tracing of class metadata accounts for a significant part of full collection time.\u0000 We propose a novel approach to metadata memory management based on metaspaces and on a linkset graph. Metaspaces store class metadata segregated by their class loader and keep an exact record of references from class metadata to the heap. The linkset graph summarizes what metaspaces reference others via resolved symbolic links. Metaspaces allow en masse reclamation of the storage allocated to classes defined by a class loader when this class loader becomes unreachable. The linkset graph eliminates the need to trace references between metadata to determine the liveness of classes and of the heap objects they refer to.\u0000 This reduces the number of visited references in class metadata to less than 1% of the original amount and cuts down tracing time by up to 80%. Average full heap collection time improves by at least 35% for all but one of the Dacapo benchmarks, and by more than 70% for six of them.\u0000 Metaspace-based management of class metadata also extends well to multi-tasking implementations of the JVM. It enables tasks to unload classes independently of other tasks.","PeriodicalId":169989,"journal":{"name":"Principles and Practice of Programming in Java","volume":"1 1","pages":"0"},"PeriodicalIF":0.0,"publicationDate":"2011-08-24","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":null,"resultStr":null,"platform":"Semanticscholar","paperid":"128455581","PeriodicalName":null,"FirstCategoryId":null,"ListUrlMain":null,"RegionNum":0,"RegionCategory":"","ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":"","EPubDate":null,"PubModel":null,"JCR":null,"JCRName":null,"Score":null,"Total":0}
引用次数: 1
The SOUL tool suite for querying programs in symbiosis with Eclipse 用于查询与Eclipse共生的程序的SOUL工具套件
Pub Date : 2011-08-24 DOI: 10.1145/2093157.2093168
Coen De Roover, Carlos Noguera, Andy Kellens, V. Jonckers
Program queries can answer important software engineering questions that range from "which expressions are cast to this type?" over "does my program attempt to read from a closed file?" to "does my code follow the prescribed design?". In this paper, we present a comprehensive tool suite for querying Java programs. It consists of the logic program query language Soul, the Cava library of predicates for quantifying over an Eclipse workspace and the Eclipse plugin Barista for launching queries and inspecting their results. Barista allows other Eclipse plugins to peruse program query results which is facilitated by the symbiosis of Soul with Java -- setting Soul apart from other program query languages. This symbiosis enables the Cava library to forego the predominant transcription to logic facts of the queried program. Instead, the library queries the actual AST nodes used by Eclipse itself, making it trivial for any Eclipse plugin to find the AST nodes that correspond to a query result. Moreover, such plugins do not have to worry about having queried stale program information. We illustrate the extensibility of our suite by implementing a tool for co-evolving source code and annotations using program queries.
程序查询可以回答重要的软件工程问题,从“哪些表达式被强制转换为这种类型?”到“我的程序是否试图从一个关闭的文件中读取?”到“我的代码是否遵循规定的设计?”在本文中,我们提供了一个用于查询Java程序的综合工具套件。它由逻辑程序查询语言Soul、用于对Eclipse工作空间进行量化的Cava谓词库和用于启动查询并检查其结果的Eclipse插件Barista组成。Barista允许其他Eclipse插件仔细阅读程序查询结果,这得益于Soul与Java的共生关系——将Soul与其他程序查询语言区分开来。这种共生关系使Cava库能够放弃对所查询程序的逻辑事实的主要转录。相反,该库查询Eclipse本身使用的实际AST节点,使得任何Eclipse插件查找与查询结果对应的AST节点都很简单。此外,这样的插件不必担心查询过时的节目信息。我们通过实现一个使用程序查询共同进化源代码和注释的工具来说明我们的套件的可扩展性。
{"title":"The SOUL tool suite for querying programs in symbiosis with Eclipse","authors":"Coen De Roover, Carlos Noguera, Andy Kellens, V. Jonckers","doi":"10.1145/2093157.2093168","DOIUrl":"https://doi.org/10.1145/2093157.2093168","url":null,"abstract":"Program queries can answer important software engineering questions that range from \"which expressions are cast to this type?\" over \"does my program attempt to read from a closed file?\" to \"does my code follow the prescribed design?\". In this paper, we present a comprehensive tool suite for querying Java programs. It consists of the logic program query language Soul, the Cava library of predicates for quantifying over an Eclipse workspace and the Eclipse plugin Barista for launching queries and inspecting their results. Barista allows other Eclipse plugins to peruse program query results which is facilitated by the symbiosis of Soul with Java -- setting Soul apart from other program query languages. This symbiosis enables the Cava library to forego the predominant transcription to logic facts of the queried program. Instead, the library queries the actual AST nodes used by Eclipse itself, making it trivial for any Eclipse plugin to find the AST nodes that correspond to a query result. Moreover, such plugins do not have to worry about having queried stale program information. We illustrate the extensibility of our suite by implementing a tool for co-evolving source code and annotations using program queries.","PeriodicalId":169989,"journal":{"name":"Principles and Practice of Programming in Java","volume":"74 3-4","pages":"0"},"PeriodicalIF":0.0,"publicationDate":"2011-08-24","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":null,"resultStr":null,"platform":"Semanticscholar","paperid":"132192101","PeriodicalName":null,"FirstCategoryId":null,"ListUrlMain":null,"RegionNum":0,"RegionCategory":"","ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":"","EPubDate":null,"PubModel":null,"JCR":null,"JCRName":null,"Score":null,"Total":0}
引用次数: 56
DeepFJig: modular composition of nested classes DeepFJig:嵌套类的模块化组合
Pub Date : 2011-08-24 DOI: 10.1145/2093157.2093172
A. Corradi, M. Servetto, E. Zucca
We present a new language design which smoothly integrates modular composition and nesting of Java-like classes. That is, inheritance has been replaced by an expressive set of composition operators, inspired by Bracha's Jigsaw framework, and these operators allow to manipulate (e.g., rename or duplicate) a nested class at any level of depth. Typing is nominal as characteristic of Java-like languages, so types are paths of the form outern. c1..... ck which, depending on the class (node) where they occur, denote another node in the nesting tree. However, paths denoting the same class are not equivalent, since they behave differently w.r.t. composition operators. The resulting language, called DeepFJig, obtains a great expressive power, allowing, e.g., to solve the expression problem, encode basic AOP mechanisms, and bring some refactoring techniques at the language level, while keeping a very simple semantics and type system which represent a natural extension for, say, a Java programmer.
我们提出了一种新的语言设计,它平滑地集成了模块化组合和类java嵌套。也就是说,受Bracha的Jigsaw框架的启发,继承已经被一组富有表现力的组合操作符所取代,这些操作符允许在任何深度级别上操作(例如,重命名或复制)嵌套类。类型化是类java语言的典型特征,所以类型是形式为outern的路径。c1……Ck,这取决于它们发生的类(节点),表示嵌套树中的另一个节点。但是,表示相同类的路径并不等效,因为它们的组合操作符的行为不同。由此产生的语言,称为DeepFJig,获得了强大的表达能力,例如,允许解决表达式问题,编码基本的AOP机制,并在语言级别引入一些重构技术,同时保持非常简单的语义和类型系统,这代表了Java程序员的自然扩展。
{"title":"DeepFJig: modular composition of nested classes","authors":"A. Corradi, M. Servetto, E. Zucca","doi":"10.1145/2093157.2093172","DOIUrl":"https://doi.org/10.1145/2093157.2093172","url":null,"abstract":"We present a new language design which smoothly integrates modular composition and nesting of Java-like classes. That is, inheritance has been replaced by an expressive set of composition operators, inspired by Bracha's Jigsaw framework, and these operators allow to manipulate (e.g., rename or duplicate) a nested class at any level of depth. Typing is nominal as characteristic of Java-like languages, so types are paths of the form outern. c1..... ck which, depending on the class (node) where they occur, denote another node in the nesting tree. However, paths denoting the same class are not equivalent, since they behave differently w.r.t. composition operators.\u0000 The resulting language, called DeepFJig, obtains a great expressive power, allowing, e.g., to solve the expression problem, encode basic AOP mechanisms, and bring some refactoring techniques at the language level, while keeping a very simple semantics and type system which represent a natural extension for, say, a Java programmer.","PeriodicalId":169989,"journal":{"name":"Principles and Practice of Programming in Java","volume":"118 1","pages":"0"},"PeriodicalIF":0.0,"publicationDate":"2011-08-24","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":null,"resultStr":null,"platform":"Semanticscholar","paperid":"132322034","PeriodicalName":null,"FirstCategoryId":null,"ListUrlMain":null,"RegionNum":0,"RegionCategory":"","ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":"","EPubDate":null,"PubModel":null,"JCR":null,"JCRName":null,"Score":null,"Total":0}
引用次数: 6
Optimizing interpreters by tuning opcode orderings on virtual machines for modern architectures: or: how I learned to stop worrying and love hill climbing 通过调整现代架构的虚拟机上的操作码顺序来优化解释器;或者:我如何学会停止担忧,爱上爬山
Pub Date : 2011-08-24 DOI: 10.1145/2093157.2093183
Jason McCandless, David Gregg
Virtual machines (VMs) are commonly used to execute programs written in languages such as Java, Python and Lua. VMs are typically implemented using an interpreter, a JIT compiler, or some combination of the two. A long-standing question in the design of VM interpreters is whether it is worthwhile to reorder the cases in the main interpreter loop to improve code locality. We investigate this phenomenon using an iterative, feedback-directed approach. We show that the ordering of the cases in the interpreter loop has a significant impact on performance on recent processors. Using hardware performance counters, we demonstrate that the performance improvement is primarily the result of indirect branch prediction, not instruction cache locality. We propose a number of strategies to achieve better orderings, and evaluate these strategies in the Python and Lua virtual machine interpreters. We show speedups of up to 40%.
虚拟机(vm)通常用于执行用Java、Python和Lua等语言编写的程序。虚拟机通常使用解释器、JIT编译器或两者的某种组合来实现。VM解释器设计中的一个长期存在的问题是,是否值得在主解释器循环中重新排序以改善代码局部性。我们使用迭代的、反馈导向的方法来研究这种现象。我们展示了解释器循环中用例的顺序对最新处理器的性能有重大影响。使用硬件性能计数器,我们证明了性能改进主要是间接分支预测的结果,而不是指令缓存局部性的结果。我们提出了一些策略来实现更好的排序,并在Python和Lua虚拟机解释器中评估了这些策略。我们展示了高达40%的加速。
{"title":"Optimizing interpreters by tuning opcode orderings on virtual machines for modern architectures: or: how I learned to stop worrying and love hill climbing","authors":"Jason McCandless, David Gregg","doi":"10.1145/2093157.2093183","DOIUrl":"https://doi.org/10.1145/2093157.2093183","url":null,"abstract":"Virtual machines (VMs) are commonly used to execute programs written in languages such as Java, Python and Lua. VMs are typically implemented using an interpreter, a JIT compiler, or some combination of the two. A long-standing question in the design of VM interpreters is whether it is worthwhile to reorder the cases in the main interpreter loop to improve code locality. We investigate this phenomenon using an iterative, feedback-directed approach. We show that the ordering of the cases in the interpreter loop has a significant impact on performance on recent processors. Using hardware performance counters, we demonstrate that the performance improvement is primarily the result of indirect branch prediction, not instruction cache locality. We propose a number of strategies to achieve better orderings, and evaluate these strategies in the Python and Lua virtual machine interpreters. We show speedups of up to 40%.","PeriodicalId":169989,"journal":{"name":"Principles and Practice of Programming in Java","volume":"14 1","pages":"0"},"PeriodicalIF":0.0,"publicationDate":"2011-08-24","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":null,"resultStr":null,"platform":"Semanticscholar","paperid":"115367483","PeriodicalName":null,"FirstCategoryId":null,"ListUrlMain":null,"RegionNum":0,"RegionCategory":"","ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":"","EPubDate":null,"PubModel":null,"JCR":null,"JCRName":null,"Score":null,"Total":0}
引用次数: 6
Portable and accurate collection of calling-context-sensitive bytecode metrics for the Java virtual machine 用于Java虚拟机的可移植且准确的调用上下文敏感字节码度量集合
Pub Date : 2011-08-24 DOI: 10.1145/2093157.2093160
Aibek Sarimbekov, Andreas Sewe, Walter Binder, Philippe Moret, Martin Schoeberl, M. Mezini
Calling-context profiles and dynamic metrics at the bytecode level are important for profiling, workload characterization, program comprehension, and reverse engineering. Prevailing tools for collecting calling-context profiles or dynamic bytecode metrics often provide only incomplete information or suffer from limited compatibility with standard JVMs. However, completeness and accuracy of the profiles is essential for tasks such as workload characterization, and compatibility with standard JVMs is important to ensure that complex workloads can be executed. In this paper, we present the design and implementation of JP2, a new tool that profiles both the inter- and intra-procedural control flow of workloads on standard JVMs. JP2 produces calling-context profiles preserving callsite information, as well as execution statistics at the level of individual basic blocks of code. JP2 is complemented with scripts that compute various dynamic bytecode metrics from the profiles. As a case-study and tutorial on the use of JP2, we use it for cross-profiling for an embedded Java processor.
字节码级别的调用上下文概要文件和动态度量对于概要分析、工作负载描述、程序理解和逆向工程非常重要。用于收集调用上下文概要文件或动态字节码度量的主流工具通常只提供不完整的信息,或者与标准jvm的兼容性有限。然而,概要文件的完整性和准确性对于工作负载表征等任务至关重要,并且与标准jvm的兼容性对于确保能够执行复杂的工作负载非常重要。在本文中,我们介绍了JP2的设计和实现,JP2是一个新工具,它可以分析标准jvm上工作负载的过程间和过程内控制流。JP2生成保存调用信息的调用上下文概要文件,以及单个基本代码块级别的执行统计数据。JP2补充了从配置文件中计算各种动态字节码度量的脚本。作为使用JP2的案例研究和教程,我们使用它对嵌入式Java处理器进行交叉分析。
{"title":"Portable and accurate collection of calling-context-sensitive bytecode metrics for the Java virtual machine","authors":"Aibek Sarimbekov, Andreas Sewe, Walter Binder, Philippe Moret, Martin Schoeberl, M. Mezini","doi":"10.1145/2093157.2093160","DOIUrl":"https://doi.org/10.1145/2093157.2093160","url":null,"abstract":"Calling-context profiles and dynamic metrics at the bytecode level are important for profiling, workload characterization, program comprehension, and reverse engineering. Prevailing tools for collecting calling-context profiles or dynamic bytecode metrics often provide only incomplete information or suffer from limited compatibility with standard JVMs. However, completeness and accuracy of the profiles is essential for tasks such as workload characterization, and compatibility with standard JVMs is important to ensure that complex workloads can be executed. In this paper, we present the design and implementation of JP2, a new tool that profiles both the inter- and intra-procedural control flow of workloads on standard JVMs. JP2 produces calling-context profiles preserving callsite information, as well as execution statistics at the level of individual basic blocks of code. JP2 is complemented with scripts that compute various dynamic bytecode metrics from the profiles. As a case-study and tutorial on the use of JP2, we use it for cross-profiling for an embedded Java processor.","PeriodicalId":169989,"journal":{"name":"Principles and Practice of Programming in Java","volume":"1 1","pages":"0"},"PeriodicalIF":0.0,"publicationDate":"2011-08-24","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":null,"resultStr":null,"platform":"Semanticscholar","paperid":"121821439","PeriodicalName":null,"FirstCategoryId":null,"ListUrlMain":null,"RegionNum":0,"RegionCategory":"","ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":"","EPubDate":null,"PubModel":null,"JCR":null,"JCRName":null,"Score":null,"Total":0}
引用次数: 25
期刊
Principles and Practice of Programming in Java
全部 Acc. Chem. Res. ACS Applied Bio Materials ACS Appl. Electron. Mater. ACS Appl. Energy Mater. ACS Appl. Mater. Interfaces ACS Appl. Nano Mater. ACS Appl. Polym. Mater. ACS BIOMATER-SCI ENG ACS Catal. ACS Cent. Sci. ACS Chem. Biol. ACS Chemical Health & Safety ACS Chem. Neurosci. ACS Comb. Sci. ACS Earth Space Chem. ACS Energy Lett. ACS Infect. Dis. ACS Macro Lett. ACS Mater. Lett. ACS Med. Chem. Lett. ACS Nano ACS Omega ACS Photonics ACS Sens. ACS Sustainable Chem. Eng. ACS Synth. Biol. Anal. Chem. BIOCHEMISTRY-US Bioconjugate Chem. BIOMACROMOLECULES Chem. Res. Toxicol. Chem. Rev. Chem. Mater. CRYST GROWTH DES ENERG FUEL Environ. Sci. Technol. Environ. Sci. Technol. Lett. Eur. J. Inorg. Chem. IND ENG CHEM RES Inorg. Chem. J. Agric. Food. Chem. J. Chem. Eng. Data J. Chem. Educ. J. Chem. Inf. Model. J. Chem. Theory Comput. J. Med. Chem. J. Nat. Prod. J PROTEOME RES J. Am. Chem. Soc. LANGMUIR MACROMOLECULES Mol. Pharmaceutics Nano Lett. Org. Lett. ORG PROCESS RES DEV ORGANOMETALLICS J. Org. Chem. J. Phys. Chem. J. Phys. Chem. A J. Phys. Chem. B J. Phys. Chem. C J. Phys. Chem. Lett. Analyst Anal. Methods Biomater. Sci. Catal. Sci. Technol. Chem. Commun. Chem. Soc. Rev. CHEM EDUC RES PRACT CRYSTENGCOMM Dalton Trans. Energy Environ. Sci. ENVIRON SCI-NANO ENVIRON SCI-PROC IMP ENVIRON SCI-WAT RES Faraday Discuss. Food Funct. Green Chem. Inorg. Chem. Front. Integr. Biol. J. Anal. At. Spectrom. J. Mater. Chem. A J. Mater. Chem. B J. Mater. Chem. C Lab Chip Mater. Chem. Front. Mater. Horiz. MEDCHEMCOMM Metallomics Mol. Biosyst. Mol. Syst. Des. Eng. Nanoscale Nanoscale Horiz. Nat. Prod. Rep. New J. Chem. Org. Biomol. Chem. Org. Chem. Front. PHOTOCH PHOTOBIO SCI PCCP Polym. Chem.
×
引用
GB/T 7714-2015
复制
MLA
复制
APA
复制
导出至
BibTeX EndNote RefMan NoteFirst NoteExpress
×
0
微信
客服QQ
Book学术公众号 扫码关注我们
反馈
×
意见反馈
请填写您的意见或建议
请填写您的手机或邮箱
×
提示
您的信息不完整,为了账户安全,请先补充。
现在去补充
×
提示
您因"违规操作"
具体请查看互助需知
我知道了
×
提示
现在去查看 取消
×
提示
确定
Book学术官方微信
Book学术文献互助
Book学术文献互助群
群 号:481959085
Book学术
文献互助 智能选刊 最新文献 互助须知 联系我们:info@booksci.cn
Book学术提供免费学术资源搜索服务,方便国内外学者检索中英文文献。致力于提供最便捷和优质的服务体验。
Copyright © 2023 Book学术 All rights reserved.
ghs 京公网安备 11010802042870号 京ICP备2023020795号-1