Abstract

Profiling real-world Haskell programs is hard, as compiler optimizations make it tricky to establish causality between the source code and program behavior. In this paper we attack the root issue by performing a causality analysis of functional programs under optimization. We apply our findings to build a novel profiling infrastructure on top of the Glasgow Haskell Compiler, allowing for performance analysis even of aggressively optimized programs.
- DWARF debugging information format, version 2. Technical report, UNIX International Programming Languages SIG, 1993.Google Scholar
- A. W. Appel, B. F. Duba, and D. B. MacQueen. Profiling in the presence of optimization and garbage collection. Technical Report CS-TR-197-88, Princeton University, Nov 1988.Google Scholar
- G. Brooks, G. J. Hansen, and S. Simmons. A new approach to debugging optimized code. In Proceedings of the SIGPLAN conference on programming language design and implementation, PLDI '92, pages 1--11, New York, NY, USA, 1992. ACM. ISBN 0-89791-475-9. Google Scholar
Digital Library
- D. Coutts, R. Leshchinskiy, and D. Stewart. Stream fusion: From lists to streams to nothing at all. In ICFP '07: Proceedings of the 12th ACM SIGPLAN international conference on functional programming, pages 315--326, New York, NY, USA, 2007. ACM. Google Scholar
Digital Library
- A. Gill and G. Hutton. The worker/wrapper transformation. Journal of Functional Programming, 19 (2): 227--251, Mar. 2009. Google Scholar
Digital Library
- A. Gill and C. Runciman. Haskell program coverage. In Proceedings of the ACM SIGPLAN workshop on Haskell, Haskell '07, pages 1--12, New York, NY, USA, 2007. ACM. Google Scholar
Digital Library
- A. Gill, J. Launchbury, and S. L. Peyton Jones. A short cut to deforestation. In Proceedings of the conference on functional programming languages and computer architecture, FPCA '93, pages 223--232, New York, NY, USA, 1993. ACM. Google Scholar
Digital Library
- S. L. Graham, P. B. Kessler, and M. K. McKusick. gprof: A call graph execution profiler. In Proceedings of the symposium on compiler construction, pages 120--126, New York, NY, USA, 1982. ACM. Google Scholar
Digital Library
- D. Jones, Jr., S. Marlow, and S. Singh. Parallel performance tuning for Haskell. In Proceedings of the 2nd ACM SIGPLAN symposium on Haskell, Haskell '09, pages 81--92, New York, NY, USA, 2009. ACM. Google Scholar
Digital Library
- S. Kaneshiro and T. Shindo. Profiling optimized code: A profiling system for an hpf compiler. In Proceedings of the 10th International Parallel Processing Symposium, IPPS '96, pages 469--473, Washington, DC, USA, 1996. IEEE Computer Society. Google Scholar
Digital Library
- C. Lattner and V. Adve. LLVM: A compilation framework for lifelong program analysis & transformation. In Proceedings of the international symposium on code generation and optimization, CGO '04, pages 75--86, Washington, DC, USA, March 2004. IEEE Computer Society. Google Scholar
Digital Library
- J. Launchbury. A natural semantics for lazy evaluation. In Proceedings of the 20th ACM SIGPLAN-SIGACT symposium on principles of programming languages, POPL '93, pages 144--154, New York, NY, USA, 1993. ACM. Google Scholar
Digital Library
- D. Lewis. Counterfactuals. Blackwell Publishers, Oxford, 1973. ISBN 978-0-631-22425-9.Google Scholar
- S. Marlow. Why can't I get a stack trace? Sept. 2012. URL haskell.org/haskellwiki/HaskellImplementorsWorkshop/2012.Google Scholar
- W. Partain. The nofib benchmark suite of Haskell programs. In Functional Programming, Glasgow 1992, pages 195--202. Springer, 1993. Google Scholar
Digital Library
- R. Perera, U. A. Acar, J. Cheney, and P. B. Levy. Functional programs that explain their work. In Proceedings of the 17th ACM SIGPLAN international conference on Functional programming, ICFP '12, pages 365--376, New York, NY, USA, 2012. ACM. Google Scholar
Digital Library
- S. L. Peyton Jones and A. L. M. Santos. A transformation-based optimiser for Haskell. Science of Computer Programming, 32 (1--3): 3--47, Sep 1998. 6th European Symposium on Programming. Google Scholar
Digital Library
- S. L. Peyton Jones and S. Marlow. Secrets of the Glasgow Haskell compiler inliner. Journal of Functional Programming, 12 (5): 393--434, July 2002. Google Scholar
Digital Library
- S. L. Peyton Jones, C. V. Hall, K. Hammond, W. Partain, and P. Wadler. The Glasgow Haskell compiler: a technical overview. In phProceedings of Joint Framework for Information Technology Technical Conference, JFIT '93, March 1993.Google Scholar
- S. L. Peyton Jones, W. Partain, and A. Santos. Let-floating: moving bindings to give faster programs. In Proceedings of the first ACM SIGPLAN international conference on functional programming, ICFP '96, pages 1--12, New York, NY, USA, 1996. ACM. Google Scholar
Digital Library
- S. L. Peyton Jones, T. Nordin, and D. Oliva. C--: A portable assembly language. In Implementation of Functional Languages, pages 1--19. Springer, 1998. Google Scholar
Digital Library
- S. L. Peyton Jones, A. Tolmach, and T. Hoare. Playing by the rules: Rewriting as a practical optimization technique in GHC. In Proceedings of the 2001 Haskell Workshop, Haskell '01, pages 203--233, Sept. 2001.Google Scholar
- N. Röjemo and C. Runciman. Lag, drag, void and use-heap profiling and space-efficient compilation revisited. In Proceedings of the first ACM SIGPLAN international conference on Functional programming, ICFP '96, pages 34--41, New York, NY, USA, 1996. ACM. Google Scholar
Digital Library
- P. M. Sansom. Execution Profiling for Non-strict Functional Languages. PhD thesis, University of Glasgow, 1994.Google Scholar
- P. M. Sansom and S. L. Peyton Jones. Formally based profiling for higher-order functional languages. ACM Transactions on Programming Languages and Systems, 19 (2): 334--385, Mar. 1997. Google Scholar
Digital Library
- P. Sestoft. Deriving a lazy abstract machine. Journal of Functional Programming, 7 (03): 231--264, 1997. Google Scholar
Digital Library
- D. A. Terei and M. M. Chakravarty. An LLVM backend for GHC. In Proceedings of the third ACM Haskell symposium, Haskell '10, pages 109--120, New York, NY, USA, 2010. ACM. Google Scholar
Digital Library
- J. Tibell. State of Haskell, 2011 Survey, Aug. 2011. URL http://blog.johantibell.com/2011/08/results-from-state-of-haskell-2011.html.Google Scholar
- P. Wadler. The essence of functional programming. In Proceedings of the 19th symposium on principles of programming languages, POPL '92, pages 1--14, New York, NY, USA, 1992. ACM. Google Scholar
Digital Library
Index Terms
Causality of optimized Haskell: what is burning our cycles?
Recommendations
Causality of optimized Haskell: what is burning our cycles?
Haskell '13: Proceedings of the 2013 ACM SIGPLAN symposium on HaskellProfiling real-world Haskell programs is hard, as compiler optimizations make it tricky to establish causality between the source code and program behavior. In this paper we attack the root issue by performing a causality analysis of functional programs ...
The Intel labs Haskell research compiler
Haskell '13The Glasgow Haskell Compiler (GHC) is a well supported optimizing compiler for the Haskell programming language, along with its own extensions to the language and libraries. Haskell's lazy semantics imposes a runtime model which is in general difficult ...
The Intel labs Haskell research compiler
Haskell '13: Proceedings of the 2013 ACM SIGPLAN symposium on HaskellThe Glasgow Haskell Compiler (GHC) is a well supported optimizing compiler for the Haskell programming language, along with its own extensions to the language and libraries. Haskell's lazy semantics imposes a runtime model which is in general difficult ...







Comments