summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar Joey Hess <joey@kitenet.net>2014-01-05 19:53:41 -0400
committerGravatar Joey Hess <joey@kitenet.net>2014-01-05 19:53:41 -0400
commit5d305f1337e88ae7a07f54adc06c4a9d1d39f872 (patch)
tree9a64386435cbb3c15d7b54439e92cfd4980d4f44
parent1187ce4341f22cb8a8a1ce4c758652e50fe66c55 (diff)
add notes on full profiling
-rw-r--r--doc/ekg.mdwn17
1 files changed, 17 insertions, 0 deletions
diff --git a/doc/ekg.mdwn b/doc/ekg.mdwn
index 3bbea8614..508fd2e92 100644
--- a/doc/ekg.mdwn
+++ b/doc/ekg.mdwn
@@ -12,3 +12,20 @@ Note that since only one process can open port 4242 at a time, running
more than one git-annex process with EKG support at the same time can
result in some "resource busy (Address already in use)" messages -- but
git-annex will continue to work.
+
+----
+
+## full profiling
+
+For the really tricky memory leaks, here's how to make a profiling build of
+git-annex.
+
+1. `cabal configure` with only the flags you really need
+2. `cabal build --ghc-options="-prof -auto-all -caf-all"`
+ This will probably fail due to some missing profiling libraries.
+ You have to get the profiling versions of all needed haskell libraries
+ installed somehow.
+3. Run git-annex with the special flags `+RTS -hc -p`
+4. Reproduce the memory leak problem.
+5. If the assistant was run, stop it.
+6. `hp2ps -e8in -c git-annex.hp` to generate a .ps graph of memory usage.