Flexible and efficient profiling with aspect‐oriented programming

Flexible and efficient profiling with aspect‐oriented programming
复制标题

通过面向方面的编程实现灵活高效的分析

DOI:
--
复制
发表时间:
2011
期刊:
Concurrency and Computation
影响因子:
--
通讯作者:
Philippe Moret
Philippe Moret
中科院分区:
--
文献类型:
--
作者:
Walter Binder;Danilo Ansaloni;A. Villazón;Philippe Moret

文献摘要

被引文献

相似文献

许多用于虚拟执行环境(例如 Java 虚拟机 (JVM))的分析器都是使用低级字节码检测技术实现的,这种技术繁琐、容易出错,并且使工具的维护和扩展变得复杂。为了减少开发时间和成本,我们提倡使用高级面向方面编程(AOP)为 JVM 构建分析器。我们表明,使用方面可以产生简洁的分析器,易于开发、扩展和维护,因为低级检测细节对工具开发人员来说是隐藏的。为了构建高效的分析器,我们引入了建议间通信,这是常见 AOP 语言的扩展,可以在使用局部变量编织到同一方法中的建议之间实现高效的数据传递。我们通过两个案例研究来说明我们的方法。首先,我们展示了现有的基于检测的监听器延迟分析工具可以轻松地重新构建为一个方面。其次,我们提出了全面的调用上下文分析的一个方面。为了减少分析开销,我们的方面并行化了应用程序执行和配置文件创建,与原始的非并行方法相比,在具有两个以上内核的计算机上加速了 110%。版权所有 © 2011 约翰·威利父子有限公司
Many profilers for virtual execution environments, such as the Java virtual machine (JVM), are implemented with low‐level bytecode instrumentation techniques, which is tedious, error‐prone, and complicates maintenance and extension of the tools. In order to reduce the development time and cost, we promote building profilers for the JVM using high‐level aspect‐oriented programming (AOP). We show that the use of aspects yields concise profilers that are easy to develop, extend, and maintain, because low‐level instrumentation details are hidden from the tool developer. In order to build efficient profilers, we introduce inter‐advice communication, an extension to common AOP languages that enables efficient data passing between advices that are woven into the same method using local variables. We illustrate our approach with two case studies. First, we show that an existing, instrumentation‐based tool for listener latency profiling can be easily recast as an aspect. Second, we present an aspect for comprehensive calling context profiling. In order to reduce profiling overhead, our aspect parallelizes application execution and profile creation, resulting in a speedup of 110% on a machine with more than two cores, compared with a primitive, non‐parallel approach. Copyright © 2011 John Wiley & Sons, Ltd.