Abstract
We present an efficient online subpath profiling algorithm, OSP, that reports hot subpaths executed by a program in a given run. The hot subpaths can start at arbitrary basic block boundaries, and their identification is important for code optimization; e.g., to locate program traces in which optimizations could be most fruitful, and to help programmers in identifying performance bottlenecks.
The OSP algorit hm is online in the sense that it reports at any point during execution the hot subpaths as observed so far. It has very low memory and runtime overheads, and exhibits high accuracy in reports for benchmarks such as JLex and FFT. These features make the OSP algorithm potentially attractive for use in just-in-time (JIT) optimizing compilers, in which profiling performance is crucial and it is useful to locate hot subpaths as early as possible.
The OSP algorithm is based on an adaptive sampling technique that makes effective utilization of memory with small overhead. Both memory and runtime overheads can be controlled, and the OSPalgorit hm can therefore be used for arbitrarily large applications, realizing a tradeoff between report accuracy and performance.
We have implemented a Java prototype of the OSPa lgorithm for Java programs. The implementation was tested on programs from the Java Grande benchmark suite and exhibited a low average runtime overhead.
Research supported in part by an Alon Fellowship and by the Israel Science Foundation founded by The Academy of Sciences and Humanities
Research supported in part by the Israel Science Foundation founded by The Academy of Science and Humanities
Chapter PDF
Similar content being viewed by others
Keywords
These keywords were added by machine and not by the authors. This process is experimental and the keywords may be updated as the learning algorithm improves.
References
G. Ammons, T. Ball, and J. R. Larus. Exploiting hardware performance counters with flow and context sensitive profiling. ACM SIGPLAN Notices, 32(5):85–96, 1997.
M. Arnold and B. G. Ryder. A framework for reducing the cost of instrumented code. In SIGPLAN Conference on Programming Language Design and Implementation, pages 168–179, 2001.
V. Bala, E. Duesterwald, and S. Banerjia. Dynamo: A transparent dynamic optimization system. In SIGPLAN Conference on Programming Language Design and Implementation, pages 1–12, 2001.
T. Ball and J. R. Larus. Efficient path profiling. In International Symposium on Microarchitecture, pages 46–57, 1996.
E. Berk and C. S. Ananian. JLex-A lexical analyzer generator for Java. Available at http://www.cs.princeton.edu/~appel/modern/java/JLex.
M. Burrows. Efficient and flexible value sampling. In Proceedings of the 9th Conference on Architectural Support for Programming Languages and Operating Systems, November 2000.
E. Duesterwald and V. Bala. Software profiling for hot path prediction: Less is more. In Ninth International Conference on Architectural Support for Programming Languages and Operating Systems, pages 202–211, 2000.
P. B. Gibbons and Y. Matias. New sampling-based summary statistics for improving approximate query answers. In Proceedings of the ACM SIGMOD, pages 331–342, 1998.
JGF. The java grande forum benchmark suite. Available at http://www.epcc.ed.ac.uk/javagrande.
J. R. Larus. Whole program paths. In SIGPLAN Conference on Programming Language Design and Implementation, pages 256–269, 1999.
D. Melski and T. W. Reps. Interprocedural path profiling. In International Conference on Compiler Construction, pages 47–62, 1999.
D. Oren. Online subpath profiling. Master’s thesis, Tel-Aviv University, 2002.
D. Oren, Y. Matias, and M. Sagiv. Online subpath profiling. Technical report, Tel Aviv University, 2002.
S. Sastry, R. Bodik, and J. Smith. Rapid profiling via stratified sampling. In the 28th International Symposium on Computer Architecture, July 2001.
Sun. The Java2 Platform Standard Edition. Available at http://java.sun.com/j2se/1.3.
O. Taub, S. Schechter, and M. D. Smith. Ephemeral instrumentation for lightweight program profiling. Technical report, Harvard University, 2000.
R. Vallee-Rai, E. Gagnon, L. J. Hendren, P. Lam, P. Pominville, and V. Sundaresan. Optimizing java bytecode using the soot framework: Is it feasible? In Proceedings of the International Conference on Compiler Construction, pages 18–34, 2000.
J. S. Vitter. Random sampling with a reservoir. ACM Transactions on Mathematical Software, 11(1):37–57, 1985.
Author information
Authors and Affiliations
Editor information
Editors and Affiliations
Rights and permissions
Copyright information
© 2002 Springer-Verlag Berlin Heidelberg
About this paper
Cite this paper
Oren, D., Matias, Y., Sagiv, M. (2002). Online Subpath Profiling. In: Horspool, R.N. (eds) Compiler Construction. CC 2002. Lecture Notes in Computer Science, vol 2304. Springer, Berlin, Heidelberg. https://doi.org/10.1007/3-540-45937-5_8
Download citation
DOI: https://doi.org/10.1007/3-540-45937-5_8
Published:
Publisher Name: Springer, Berlin, Heidelberg
Print ISBN: 978-3-540-43369-9
Online ISBN: 978-3-540-45937-8
eBook Packages: Springer Book Archive