New dimensions in heap profiling

Abstract First-generation heap profilers for lazy functional languages have proved to be effective tools for locating some kinds of space faults, but in other cases they cannot provide sufficient information to solve the problem. This paper describes the design, implementation and use of a new profiler that goes beyond the two-dimensional ‘who produces what’ view of heap cells to provide information about their more dynamic and structural attributes. Specifically, the new profiler can distinguish between cells according to their eventual lifetime, or on the basis of the closure retainers by virtue of which they remain part of the live heap. A bootstrapping Haskell compiler (nhc) hosts the implementation: among examples of the profiler's use we include self-application to nhc. Another example is the original heap-profiling case study clausify, which now consumes even less memory and is much faster.

[1]  Niklas Röjemo,et al.  Highlights from nhc—a space-efficient Haskell compiler , 1995, FPCA '95.

[2]  Stuart Clayman,et al.  Lexical profiling: theory and practice , 1995, Journal of Functional Programming.

[3]  Niklas Röjemo Garbage Collection, and Memory Efficiency, in Lazy Functional Languages , 1995 .

[4]  Darko Stefanovic,et al.  Characterization of object behaviour in Standard ML of New Jersey , 1994, LFP '94.

[5]  Patrick M. Sansom,et al.  Execution profiling for non-strict functional languages , 1994 .

[6]  Jan Sparud,et al.  Fixing some space leaks without a garbage collector , 1993, FPCA '93.

[7]  Colin Runciman,et al.  Heap profiling of lazy functional programs , 1993, Journal of Functional Programming.

[8]  Colin Runciman,et al.  Heap Profiling of a Lazy Functional Compiler , 1992, Functional Programming.

[9]  Will Partain,et al.  The nofib Benchmark Suite of Haskell Programs , 1992, Functional Programming.

[10]  Joyce L. Vedral,et al.  Functional Programming Languages and Computer Architecture , 1989, Lecture Notes in Computer Science.

[11]  Colin Runciman,et al.  Problems & Proposals for Time & Space Profiling of Functional Programs , 1990, Functional Programming.

[12]  Pieter H. Hartel,et al.  Statistics on graph reduction of SASL programs , 1988, Softw. Pract. Exp..

[13]  Philip Wadler,et al.  Deforestation: Transforming Programs to Eliminate Trees , 1990, Theor. Comput. Sci..

[14]  Simon L. Peyton Jones,et al.  The Implementation of Functional Programming Languages , 1987 .

[15]  David R. Hanson,et al.  Performance of Storage Management in an Implementation of SNOBOL4 , 1978, IEEE Transactions on Software Engineering.

[16]  William M. Waite,et al.  An efficient machine-independent procedure for garbage collection in various list structures , 1967, CACM.