Profiling Java applications using code hotswapping and dynamic call graph revelation

  • Authors:
  • Mikhail Dmitriev

  • Affiliations:
  • Sun Microsystems Laboratories, Mountain View, CA

  • Venue:
  • WOSP '04 Proceedings of the 4th international workshop on Software and performance
  • Year:
  • 2004

Quantified Score

Hi-index 0.00

Visualization

Abstract

Instrumentation-based profiling has many advantages and one serious disadvantage: usually high performance overhead. This overhead can be substantially reduced if only a small part of the target application (for example, one that has previously been identified as a performance bottleneck) is instrumented, while the rest of the application code continues to run at full speed. The value of such a profiling technology would increase further if the code could be instrumented and de-instrumented as many times as needed at run time.In this paper we present an experimental profiling system called JFluid, which includes a modified Java™ VM and a GUI tool, and addresses both of the above issues. Our tool supports instrumentation of a group of methods defined as an arbitrary "root" method plus all methods that it calls (a call subgraph). It appears that static determination of all methods in a call subgraph is difficult in presence of virtual methods, bug fortunately, with dynamic code hotswapping available, two schemes of dynamic call subgraph revelation and instrumentation can be suggested. Measurements that we obtained when performing full and partial program profiling using both schemes show that the overhead can be reduced substantially using this technique, and that one of the schemes generally results in a smaller number of instrumented methods and better performance. Furthermore, we observe that our approach generally works much better for large (for example, J2EE and Web) applications, than for small benchmarks.