Abstract
Prevailing profilers for Java, which rely on standard, native-code profiling interfaces, are not portable, give imprecise results due to serious measurement perturbation, and cause excessive overheads. In contrast, program transformations allow to generate reproducible profiles in a fully portable way with significantly less overhead. This paper presents a profiling framework that instruments Java programs at the bytecode level to build context-sensitive execution profiles at runtime. The profiling framework includes an exact profiler as well as a sampling profiler. User-defined profiling agents can be written in pure Java, too, in order to customize the runtime processing of profiling data.
Preview
Unable to display preview. Download preview PDF.
Similar content being viewed by others
References
Ammons, G., Ball, T., Larus, J.R.: Exploiting hardware performance counters with flow and context sensitive profiling. In: PLDI 1997: Proceedings of the ACM SIGPLAN 1997 conference on Programming language design and implementation, pp. 85–96. ACM Press, New York (1997)
Anderson, J., Berc, L., Dean, J., Ghemawat, S., Henzinger, M., Leung, S.-T., Sites, R., Vandervoorde, V., Waldspurger, C., Weihl, W.: Continuous profiling: Where have all the cycles gone? ACM Transactions on Computer Systems 15(4) (November 1997)
Arnold, M., Ryder, B.G.: A framework for reducing the cost of instrumented code. In: SIGPLAN Conference on Programming Language Design and Implementation, pp. 168–179 (2001)
Ball, T., Larus, J.R.: Optimally profiling and tracing programs. ACM Transactions on Programming Languages and Systems 16(4), 1319–1360 (1994)
Ball, T., Larus, J.R.: Efficient path profiling. In: International Symposium on Microarchitecture, pp. 46–57 (1996)
Binder, W., Hulaas, J.: A portable CPU-management framework for Java. IEEE Internet Computing 8(5), 74–83 (2004)
Binder, W., Hulaas, J.G., Villazón, A.: Portable resource control in Java. ACM SIGPLAN Notices 36(11), 139–155 (2001); Proceedings of the 2001 ACM SIGPLAN Conference on Object Oriented Programming, Systems, Languages and Applications (OOPSLA 2001)
Choi, J.-D., Grove, D., Hind, M., Sarkar, V.: Efficient and precise modeling of exceptions for the analysis of Java programs. In: Proceedings of the ACM SIGPLAN–SIGSOFT Workshop on Program Analysis for Software Tools and Engineering, pp. 21–31. ACM Press, New York (1999)
Dmitriev, M.: Profiling Java applications using code hotswapping and dynamic call graph revelation. In: WOSP 2004: Proceedings of the Fourth International Workshop on Software and Performance, pp. 139–150. ACM Press, New York (2004)
Dufour, B., Driesen, K., Hendren, L., Verbrugge, C.: Dynamic metrics for Java. ACM SIGPLAN Notices 38(11), 149–168 (2003)
Feller, P.: Value profiling for instructions and memory locations. Master Thesis CS1998-581, University of California, Sa Diego (April 1998)
Hulaas, J., Binder, W.: Program transformations for portable CPU accounting and control in Java. In: Proceedings of PEPM 2004 (2004 ACM SIGPLAN Symposium on Partial Evaluation & Program Manipulation), Verona, Italy, August 24–25, pp. 169–177 (2004)
Larus, J.R., Ball, T.: Rewriting executable files to measure program behavior. Software–Practice and Experience 24(2), 197–218 (1994)
Liang, S., Viswanathan, D.: Comprehensive profiling support in the Java virtual machine. In: Proceedings of the 5th USENIX Conference on Object-Oriented Technologies and Systems (COOTS 1999), Berkeley, CA, May 3–7, pp. 229–240. USENIX Association (1999)
Sun Microsystems, Inc. Java Virtual Machine Profiler Interface (JVMPI). Web pages at http://java.sun.com/j2se/1.4.2/docs/guide/jvmpi/
Sun Microsystems, Inc. JVM Tool Interface (JVMTI). Web pages at http://java.sun.com/j2se/1.5.0/docs/guide/jvmti/
The Standard Performance Evaluation Corporation. SPEC JVM98 Benchmarks. Web pages at http://www.spec.org/osg/jvm98/
Whaley, J.: A portable sampling-based profiler for Java Virtual Machines. In: Proceedings of the ACM 2000 Conference on Java Grande, June 2000, pp. 78–87. ACM Press, New York (2000)
Author information
Authors and Affiliations
Editor information
Editors and Affiliations
Rights and permissions
Copyright information
© 2005 Springer-Verlag Berlin Heidelberg
About this paper
Cite this paper
Binder, W. (2005). A Portable and Customizable Profiling Framework for Java Based on Bytecode Instruction Counting. In: Yi, K. (eds) Programming Languages and Systems. APLAS 2005. Lecture Notes in Computer Science, vol 3780. Springer, Berlin, Heidelberg. https://doi.org/10.1007/11575467_13
Download citation
DOI: https://doi.org/10.1007/11575467_13
Publisher Name: Springer, Berlin, Heidelberg
Print ISBN: 978-3-540-29735-2
Online ISBN: 978-3-540-32247-4
eBook Packages: Computer ScienceComputer Science (R0)