-
Notifications
You must be signed in to change notification settings - Fork 0
/
stackcollapse-ghc.cabal
135 lines (121 loc) · 5.35 KB
/
stackcollapse-ghc.cabal
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
cabal-version: 2.4
name: stackcollapse-ghc
version: 0.0.1.4
synopsis: Program to fold GHC prof files into flamegraph input
description: Program to fold GHC prof files into flamegraph input
The reasons why this package exists despite other packages with similar functionality (not including the NIH syndrome) boil down to:
.
* it does only one thing (stack collapsing), so it's up to the user to install flamegraph scripts, pass options etc (in my eyes it's not a limitation, on the contrary),
.
* output control: annotations (color profiles), extending traces from a configured set of modules with the source locations or toggling qualified names,
.
* precise ticks and/or bytes with @-p@ reports,
.
* it's fast
.
= Basic usage
.
== Visualize ticks
.
If you have a detailed prof file (@-P@ RTS option)
.
> stackcollapse-ghc prof_file | flamegraph.pl --title 'Example' --subtitle 'Time' --countname ticks > path_to_svg
.
If you have a standard prof file (@-p@ RTS option)
.
> stackcollapse-ghc -p prof_file | flamegraph.pl --title 'Example' --subtitle 'Time' --countname ticks > path_to_svg
.
.
== Visualize allocations
.
If you have a detailed prof file (@-P@ RTS option)
.
> stackcollapse-ghc --alloc prof_file | flamegraph.pl --title 'Example' --subtitle 'Bytes allocated' --countname bytes > path_to_svg
.
If you have a standard prof file (@-p@ RTS option)
.
> stackcollapse-ghc --alloc -p prof_file | flamegraph.pl --title 'Example' --subtitle 'Bytes allocated' --countname bytes > path_to_svg
.
See the full [README](https://github.com/marcin-rzeznicki/stackcollapse-ghc) for details.
homepage: https://github.com/marcin-rzeznicki/stackcollapse-ghc
bug-reports: https://github.com/marcin-rzeznicki/stackcollapse-ghc/issues
license: GPL-3.0-only
license-file: LICENSE
author: Marcin Rzeźnicki
maintainer: Marcin Rzeźnicki <[email protected]>
copyright: 2020 Marcin Rzeźnicki
category: Profiling
build-type: Simple
extra-source-files: test/prof_files/*.prof
extra-doc-files: README.md
CHANGELOG.md
tested-with: GHC == 8.6.5
GHC == 8.8.2
GHC == 8.8.3
GHC == 8.10.1
GHC == 8.10.2
GHC == 8.10.3
GHC == 9.0.1
source-repository head
type: git
location: https://github.com/marcin-rzeznicki/stackcollapse-ghc.git
common common-options
build-depends: base >= 4.12.0.0 && < 4.16,
bytestring >= 0.10.8
ghc-options: -Wall
-Wcompat
-Widentities
-Wincomplete-uni-patterns
-Wincomplete-record-updates
-fdefer-typed-holes
if impl(ghc >= 8.0)
ghc-options: -Wredundant-constraints
if impl(ghc >= 8.2)
ghc-options: -fhide-source-paths
if impl(ghc >= 8.4)
ghc-options: -Wmissing-export-lists
-Wpartial-fields
if impl(ghc >= 8.8)
ghc-options: -Wmissing-deriving-strategies
default-language: Haskell2010
common common-sources
hs-source-dirs: src
other-modules: Config
UserModule
Trace
Format
CallTree
CallTreeBuilder
Profiles
StackCollapse
build-depends: text >= 1.2.3.0,
containers >= 0.6.0.1,
rosezipper ==0.2,
foldl >= 1.4.6 && < 1.5,
transformers ==0.5.6.*,
recursion-schemes >= 5.2 && < 5.3,
safe ==0.3.*,
extra
executable stackcollapse-ghc
import: common-options,
common-sources
hs-source-dirs: app
main-is: Main.hs
ghc-options: -threaded
-O2
-rtsopts
-with-rtsopts=-N
test-suite stackcollapse-ghc-test
import: common-options,
common-sources
type: exitcode-stdio-1.0
hs-source-dirs: test
main-is: Spec.hs
other-modules: Helpers
build-depends: filepath,
hspec-golden >= 0.2.0.0 && < 0.3,
hspec,
utf8-string ^>=1.0.1
ghc-options: -threaded
-rtsopts
-with-rtsopts=-N