Abstract
This paper presents a semantic space profiler for parallel functional programs. Building on previous work in sequential profiling, our tools help programmers to relate runtime resource use back to program source code. Unlike many profiling tools, our profiler is based on a cost semantics. This provides a means to reason about performance without requiring a detailed understanding of the compiler or runtime system. It also provides a specification for language implementers. This is critical in that it enables us to separate cleanly the performance of the application from that of the language implementation.
Some aspects of the implementation can have significant effects on performance. Our cost semantics enables programmers to understand the impact of different scheduling policies while hiding many of the details of their implementations. We show applications where the choice of scheduling policy has asymptotic effects on space use. We explain these use patterns through a demonstration of our tools. We also validate our methodology by observing similar performance in our implementation of a parallel extension of Standard ML.
Supplemental Material
Available for Download
Supplemental material for: Space profiling for parallel functional programs
- Shail Aditya, Arvind, Jan-Willem Maessen, and Lennart Augustsson. Semantics of pH: A parallel dialect of Haskell. Technical Report Computation Structures Group Memo 377, MIT, June 1995.Google Scholar
- Andrew W. Appel, Bruce Duba, and David B. MacQueen. Profiling in the presence of optimization and garbage collection. Technical Report CS-TR-197-88, Princeton University, November 1988.Google Scholar
- Arvind, Rishiyur S. Nikhil, and Keshav K. Pingali. I-structures: data structures for parallel computing. ACM Trans. Program. Lang. Syst., 11 (4): 598--632, 1989. Google Scholar
Digital Library
- Guy Blelloch and John Greiner. Parallelism in sequential functional languages. In Proc. of the Int. Conf. on Funct. Program. Languages and Computer Architecture, pages 226--237, New York, NY, USA, 1995. ACM. Google Scholar
Digital Library
- Guy E. Blelloch and John Greiner. A provable time and space efficient implementation of NESL. In Proc. of the Int. Conf. on Funct. Program., pages 213--225, May 1996. Google Scholar
Digital Library
- Guy E. Blelloch and Gary W. Sabot. Compiling collection-oriented languages onto massively parallel computers. J. Parallel Distrib. Comput., 8 (2): 119--134, 1990. Google Scholar
Digital Library
- Guy E. Blelloch, Jonathan C. Hardwick, Jay Sipelstein, Marco Zagha, and Siddhartha Chatterjee. Implementation of a portable nested data-parallel language. J. Parallel Distrib. Comput., 21 (1): 4--14, 1994. Google Scholar
Digital Library
- Guy E. Blelloch, Phillip B. Gibbons, and Yossi Matias. Provably efficient scheduling for languages with fine-grained parallelism. J. ACM, 46 (2): 281--321, 1999. Google Scholar
Digital Library
- Robert D. Blumofe and Charles E. Leiserson. Space-efficient scheduling of multithreaded computations. SIAM J. Comp., 27 (1): 202--229, 1998. Google Scholar
Digital Library
- Robert D. Blumofe and Charles E. Leiserson. Scheduling multithreaded computations by work stealing. J. ACM, 46 (5): 720--748, 1999. Google Scholar
Digital Library
- Manuel M. T. Chakravarty and Gabriele Keller. More types for nested data parallel programming. In Proc. of the Int. Conf. on Funct. Program., pages 94--105, New York, NY, USA, 2000. ACM. Google Scholar
Digital Library
- Nathan Charles and Colin Runciman. An interactive approach to profiling parallel functional programs. In Selected Papers of the Workshop on the Implementation of Funct. Languages, pages 20--37, London, UK, September 1998. Google Scholar
Digital Library
- Perry Cheng and Guy E. Blelloch. A parallel, real-time garbage collector. SIGPLAN Not., 36 (5): 125--136, 2001. Google Scholar
Digital Library
- Silvain Conchon and Fabrice Le Fessant. Jocaml: Mobile agents for objective-caml. In Proc. of the Int. Symposium on Agent Systems and Applications, page 22, Washington, DC, USA, 1999. IEEE Computer Society. Google Scholar
Digital Library
- Robert Ennals. Adaptive Evaluation of Non-Strict Programs. PhD thesis, University of Cambridge, 2004.Google Scholar
- Matthew Fluet, Nic Ford, Mike Rainey, John Reppy, Adam Shaw, and Yingqi Xiao. Status report: the manticore project. In Proc. of the Workshop on ML, pages 15--24, New York, NY, USA, 2007. ACM. Google Scholar
Digital Library
- Matthew Fluet, Michael Rainey, and John Reppy. A scheduling framework for general-purpose parallel languages. In Proc. of the Int. Conf. on Funct. Program., New York, NY, USA, 2008. ACM. Google Scholar
Digital Library
- Jörgen Gustavsson and David Sands. A foundation for space-safe transformations of call-by-need programs. In Proc. of Workshop on Higher Order Operational Techniques in Semantics, number volume 26 of Electronic Notes in Theoretical Computer Science, September 1999.Google Scholar
Cross Ref
- Kevin Hammond and Simon L. Peyton Jones. Profiling scheduling strategies on the GRIP multiprocessor. In Int. Workshop on the Parallel Implementation of Funct. Languages, pages 73-98, RWTH Aachen, Germany, September 1992.Google Scholar
- Kevin Hammond, Hans-Wolfgang Loidl, and Andrew S. Partridge. Visualising Granularity in Parallel Programs: A Graphical Winnowing System for Haskell. In A. P. Wim Böhm and John T. Feo, editors, High Performance Functional Computing, pages 208--221, 1995.Google Scholar
- Robin Milner, Mads Tofte, Robert Harper, and David Macqueen. The Definition of Standard ML (Revised). MIT Press, Cambridge, MA, USA, 1997. Google Scholar
Digital Library
- John H. Reppy. Concurrent programming in ML. Cambridge University Press, New York, NY, USA, 1999. Google Scholar
Digital Library
- Niklas Röjemo and Colin Runciman. Lag, drag, void and use - heap profiling and space-efficient compilation revisited. SIGPLAN Not., 31 (6): 34--41, 1996. Google Scholar
Digital Library
- Mads Rosendahl. Automatic complexity analysis. In Proc. of the Int. Conf. on Funct. Program. Languages and Computer Architecture, pages 144--156, New York, NY, USA, 1989. ACM. Google Scholar
Digital Library
- Colin Runciman and David Wakeling. Heap profiling of lazy functional programs. J. Funct. Program., 3 (2): 217--245, 1993.Google Scholar
Cross Ref
- Colin Runciman and David Wakeling. Profiling Parallel Functional Computations (Without Parallel Machines). In Functional Programming, Glasgow '93, pages 236--251. Springer-Verlag, 1993.Google Scholar
- David Sands. Calculi for Time Analysis of Functional Programs. PhD thesis, Department of Computing, Imperial College, University of London, September 1990.Google Scholar
- Patrick M. Sansom and Simon L. Peyton Jones. Profiling lazy functional programs. In Proc. of the Glasgow Workshop on Funct. Program., pages 227--239, London, UK, 1993. Springer-Verlag. Google Scholar
Digital Library
- Patrick M. Sansom and Simon L. Peyton Jones. Time and space profiling for non-strict, higher-order functional languages. In Proc. of the Symposium on Principles of Program. Languages, pages 355--366, New York, NY, USA, 1995. ACM. Google Scholar
Digital Library
- Zhong Shao and Andrew W. Appel. Space-efficient closure representations. In Proc. of the Conf. on LISP and Funct. Program., pages 150--161, New York, NY, USA, 1994. ACM. Google Scholar
Digital Library
- Daniel Spoonhower, Guy E. Blelloch, Robert Harper, and Phillip B. Gibbons. Space profiling for parallel functional programs. Technical Report CMU-CS-08-110, Carnegie Mellon University, April 2008.Google Scholar
Digital Library
- Stephen Weeks. Whole-program compilation in mlton. In Proc. of the Workshop on ML, page 1, New York, NY, USA, 2006. ACM. Google Scholar
Digital Library
Index Terms
Space profiling for parallel functional programs
Recommendations
Space profiling for parallel functional programs
ICFP '08: Proceedings of the 13th ACM SIGPLAN international conference on Functional programmingThis paper presents a semantic space profiler for parallel functional programs. Building on previous work in sequential profiling, our tools help programmers to relate runtime resource use back to program source code. Unlike many profiling tools, our ...
Formally based profiling for higher-order functional languages
We present the first source-level profiler for a compiled, nonstrict, higher-order, purely functional language capable of measuring time as well as space usage. Our profiler is implemented in a production-quality optimizing compiler for Haskell and can ...
On deriving data parallel code from a functional program
IPPS '95: Proceedings of the 9th International Symposium on Parallel ProcessingWe discuss a translation methodology for transforming a high level algorithmic specification written in ALPHA to an imperative data parallel language. We informally introduce the ALPHA language with the aid of an example and explain how it is adapted ...







Comments