An Empirical Study of the Code Pitching Mechanism in the .NET Framework

The .NET Compact Framework is designed to be a high-performance virtual machine for mobile and embedded devices that operate on Windows CE (version 4.1 and later). It achieves fast execution time by compiling methods dynamically instead of using interpretation. Once compiled, these methods are stored in a portion of the heap called the code cache and can be quickly reused to satisfy future method calls. While the code cache provides a high-level of reusability, it can also use a large amount of memory. As a result, the Compact Framework provides a “code pitching” mechanism that can be used to discard the previously compiled methods as needed. In this paper, we study the effect of code pitching on the overall performance and memory utilization of .NET applications. We conduct our experiments using Microsoft’s Shared-Source Common Language Infrastructure (SSCLI). We profile the access behavior of the compiled methods. We also experiment with various code cache configurations to perform pitching. We find that programs can operate efficiently with a small code cache without incurring substantial recompilation and execution overheads.

[1]  James E. Smith,et al.  Virtual machines - versatile platforms for systems and processes , 2005 .

[2]  Per Capita,et al.  About the authors , 1995, Machine Vision and Applications.

[3]  Peter J. Brown Throw‐away compiling , 1976, Softw. Pract. Exp..

[4]  Rafael Dueire Lins,et al.  Garbage collection: algorithms for automatic dynamic memory management , 1996 .

[5]  Andreas Krall,et al.  Efficient JavaVM just-in-time compilation , 1998, Proceedings. 1998 International Conference on Parallel Architectures and Compilation Techniques (Cat. No.98EX192).

[6]  Urs Hölzle,et al.  A Study of the Allocation Behavior of the SPECjvm98 Java Benchmark , 1999, ECOOP.

[7]  Chandra Krintz,et al.  Profile-driven code unloading for resource-constrained JVMs , 2004, PPPJ.

[8]  Matthew Arnold,et al.  Adaptive optimization in the Jalapeño JVM , 2000, OOPSLA '00.

[9]  David J. Anthony,et al.  To JIT or not to JIT: The Effect of Code Pitching on the Performance of .NET Framework , 2005 .

[10]  David Stutz,et al.  Shared source CLI essentials , 2003 .

[11]  Derek Bruening,et al.  An infrastructure for adaptive dynamic optimization , 2003, International Symposium on Code Generation and Optimization, 2003. CGO 2003..

[12]  Ifor Williams,et al.  The design and evaluation of a high-performance smalltalk system , 1988 .

[13]  David Keppel,et al.  Shade: a fast instruction-set simulator for execution profiling , 1994, SIGMETRICS.

[14]  Chandra Krintz,et al.  Adaptive code unloading for resource-constrained JVMs , 2004, LCTES '04.

[15]  Andreas Krall,et al.  CACAO - A 64-bit JavaVM Just-in-Time Compiler , 1997, Concurr. Pract. Exp..

[16]  Witawas Srisa-an,et al.  Java virtual machine timing probes: a study of object life span and garbage collection , 2002, Conference Proceedings of the IEEE International Performance, Computing, and Communications Conference (Cat. No.02CH37326).