[GHC] #11094: Cost-center heap profiler should be able to emit samples to eventlog

#11094: Cost-center heap profiler should be able to emit samples to eventlog -------------------------------------+------------------------------------- Reporter: bgamari | Owner: Type: feature | Status: new request | Priority: normal | Milestone: Component: Compiler | Version: 7.10.2 Keywords: | Operating System: Unknown/Multiple Architecture: | Type of failure: Other Unknown/Multiple | Test Case: | Blocked By: Blocking: | Related Tickets: Differential Rev(s): | Wiki Page: -------------------------------------+------------------------------------- Often when looking at heap profiles I find myself wishing that I had better tools for aligning the heap behavior to various events in the lifetime of my program. The eventlog provides a nice facility for marking these events, why not record heap profile samples in the eventlog as well? -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/11094 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#11094: Cost-center heap profiler should be able to emit samples to eventlog -------------------------------------+------------------------------------- Reporter: bgamari | Owner: Type: feature request | Status: new Priority: normal | Milestone: Component: Compiler | Version: 7.10.2 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: Other | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Comment (by bgamari): Here is a proposed eventlog sample format. = Event types = == Beginning of sample stream == A single fixed-width event emitted during program start-up describing the samples that follow. * `Word64`: Sampling period in nanoseconds * `Word64`: Sample break-down type. One of, * `SAMPLE_TYPE_COST_CENTER` (output from `-hc`) * `SAMPLE_TYPE_CLOSURE_TYPE` (output from `-hC`) * `SAMPLE_TYPE_RETAINER` (output from `-hr`) * `SAMPLE_TYPE_BIOGRAPHY` (output from `-hb`) * `SAMPLE_TYPE_MODULE` (output from `-hm`) * `SAMPLE_TYPE_TYPE_DESCR` (output from `-hy`) == Cost center == A variable-length packet produced once for each cost center, * `Word32`: cost center number * `Word16`: name length in bytes * UTF-8 string: name == Cost-center sample == A variable-length packet encoding a heap profile sample broken down by cost-center. Since events may only be up to 2^16^ bytes in length a single sample may need to be split among multiple events. The event shall contain packed pairs of, * `Word32`: cost center number * `Word32`: heap residency in bytes == Type description sample == A variable-length event encoding a heap sample broken down by type description. The event shall contain packed triplets of, * `Word8`; type description length in bytes * UTF-8 string: type description * `Word32`: heap residency in bytes == Closure type sample == -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/11094#comment:1 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#11094: Cost-center heap profiler should be able to emit samples to eventlog -------------------------------------+------------------------------------- Reporter: bgamari | Owner: Type: feature request | Status: new Priority: normal | Milestone: Component: Compiler | Version: 7.10.2 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: Other | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Changes (by bgamari): * cc: ezyang (added) -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/11094#comment:2 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#11094: Cost-center heap profiler should be able to emit samples to eventlog -------------------------------------+------------------------------------- Reporter: bgamari | Owner: Type: feature request | Status: patch Priority: normal | Milestone: Component: Compiler | Version: 7.10.2 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: Other | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Phab:D1722 Wiki Page: | -------------------------------------+------------------------------------- Changes (by thomie): * status: new => patch * differential: => Phab:D1722 -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/11094#comment:3 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#11094: Cost-center heap profiler should be able to emit samples to eventlog -------------------------------------+------------------------------------- Reporter: bgamari | Owner: Type: feature request | Status: patch Priority: normal | Milestone: Component: Profiling | Version: 7.10.2 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: Other | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Phab:D1722 Wiki Page: | -------------------------------------+------------------------------------- Changes (by thomie): * component: Compiler => Profiling -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/11094#comment:4 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#11094: Cost-center heap profiler should be able to emit samples to eventlog -------------------------------------+------------------------------------- Reporter: bgamari | Owner: Type: feature request | Status: patch Priority: normal | Milestone: Component: Profiling | Version: 7.10.2 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: Other | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Phab:D1722 Wiki Page: | -------------------------------------+------------------------------------- Changes (by maoe): * cc: maoe (added) -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/11094#comment:5 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#11094: Cost-center heap profiler should be able to emit samples to eventlog
-------------------------------------+-------------------------------------
Reporter: bgamari | Owner:
Type: feature request | Status: patch
Priority: normal | Milestone:
Component: Profiling | Version: 7.10.2
Resolution: | Keywords:
Operating System: Unknown/Multiple | Architecture:
| Unknown/Multiple
Type of failure: Other | Test Case:
Blocked By: | Blocking:
Related Tickets: | Differential Rev(s): Phab:D1722
Wiki Page: |
-------------------------------------+-------------------------------------
Comment (by Ben Gamari

#11094: Cost-center heap profiler should be able to emit samples to eventlog -------------------------------------+------------------------------------- Reporter: bgamari | Owner: Type: feature request | Status: closed Priority: normal | Milestone: 8.2.1 Component: Profiling | Version: 7.10.2 Resolution: fixed | Keywords: Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: Other | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Phab:D1722 Wiki Page: | -------------------------------------+------------------------------------- Changes (by bgamari): * status: patch => closed * resolution: => fixed * milestone: => 8.2.1 -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/11094#comment:7 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler
participants (1)
-
GHC