Commit bba0316e authored by Simon Peyton Jones's avatar Simon Peyton Jones Committed by Ben Gamari

Edit Debugging/TickyTicky

parent 340b6cbb
......@@ -5,18 +5,22 @@ Ticky-ticky profiling adds counters to every STG function. It's very low-level,
- Add the `-ticky` flag when compiling a Haskell module to enable "ticky-ticky" profiling of that module. This makes GHC emit performance-counting instructions in every STG function.
- Add `-ticky` to the command line when linking, so that you link against a version of the runtime system that allows you to display the results.
- Add `-debug` to the command line when linking, so that you link against a version of the runtime system that allows you to display the results. \[Adding `-ticky` should work too, but it doesn't yet; see [\#3439](https://gitlab.haskell.org//ghc/ghc/issues/3439).\]
- Add `+RTS -rfoo.ticky` to the run-time command line, to put the ticky-ticky profile in the file `foo.ticky`.
It's very low level stuff. You need to use `-ddump-simpl -ddump-prep` when compiling the source files to see the functions that correspond to the performance counter report.
You need to use `-ddump-simpl -ddump-prep` when compiling the source files to see the functions that correspond to the performance counter report.
You can mix modules compiled with `-ticky` and modules compiled without.
It's very low level stuff, but in exchange:
- It's guaranteed that adding `-ticky` doesn't affect optimisation or transformation. It just adds the overhead of performance counters to the final code.
To really see everything you need to compile all the libraries with `-ticky`. To do that in a standard build tree, here are some flag settings in `build.mk` that work:
- You can mix modules compiled with `-ticky` and modules compiled without.
To *really* see everything you need to compile all the libraries with `-ticky`. To do that in a standard build tree, here are some flag settings in `build.mk` that work:
```wiki
# Build all libraries with -ticky
......@@ -27,13 +31,4 @@ GhcRTSWays += t
# Currently ticky is incompatible with threading
GhcThreaded = NO
# When linking stage2 you need -ticky, else you get unresolved symols
GhcStage2HcOpts += -ticky
# Ditto Haddock
utils/haddock_dist_EXTRA_HC_OPTS += -ticky
```
But see [\#3439](https://gitlab.haskell.org//ghc/ghc/issues/3439), which would allow you to drop the last two.
```
\ No newline at end of file
......@@ -6,15 +6,18 @@ Ticky-ticky profiling adds counters to every STG function. It's very low-level,
* Add the `-ticky` flag when compiling a Haskell module to enable "ticky-ticky" profiling of that module. This makes GHC emit performance-counting instructions in every STG function.
* Add `-ticky` to the command line when linking, so that you link against a version of the runtime system that allows you to display the results.
* Add `-debug` to the command line when linking, so that you link against a version of the runtime system that allows you to display the results. [Adding `-ticky` should work too, but it doesn't yet; see #3439.]
* Add `+RTS -rfoo.ticky` to the run-time command line, to put the ticky-ticky profile in the file `foo.ticky`.
It's very low level stuff. You need to use `-ddump-simpl -ddump-prep` when compiling the source files to see the functions that correspond to the performance counter report.
You need to use `-ddump-simpl -ddump-prep` when compiling the source files to see the functions that correspond to the performance counter report.
You can mix modules compiled with `-ticky` and modules compiled without.
It's very low level stuff, but in exchange:
* It's guaranteed that adding `-ticky` doesn't affect optimisation or transformation. It just adds the overhead of performance counters to the final code.
To really see everything you need to compile all the libraries with `-ticky`. To do that in a standard build tree, here are some flag settings in `build.mk` that work:
* You can mix modules compiled with `-ticky` and modules compiled without.
To ''really'' see everything you need to compile all the libraries with `-ticky`. To do that in a standard build tree, here are some flag settings in `build.mk` that work:
{{{
# Build all libraries with -ticky
GhcLibOpts += -ticky
......@@ -24,11 +27,4 @@ GhcRTSWays += t
# Currently ticky is incompatible with threading
GhcThreaded = NO
# When linking stage2 you need -ticky, else you get unresolved symols
GhcStage2HcOpts += -ticky
# Ditto Haddock
utils/haddock_dist_EXTRA_HC_OPTS += -ticky
}}}
But see #3439, which would allow you to drop the last two.
\ No newline at end of file
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment