aboutsummaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2013-08-06 12:00:16 -0400
committerNick Mathewson <nickm@torproject.org>2013-08-06 12:00:28 -0400
commitad49ceba1f56109799adb9232ca0422067d1743d (patch)
tree52527f46529295feb42bbb59cb5f68d122897dd0 /doc
parent920f5aba1aeee312502c8af69cf09aedf5b89e27 (diff)
downloadtor-ad49ceba1f56109799adb9232ca0422067d1743d.tar
tor-ad49ceba1f56109799adb9232ca0422067d1743d.tar.gz
Update coverage instructions
Diffstat (limited to 'doc')
-rw-r--r--doc/HACKING24
1 files changed, 10 insertions, 14 deletions
diff --git a/doc/HACKING b/doc/HACKING
index b7cd8952d..c94f69e35 100644
--- a/doc/HACKING
+++ b/doc/HACKING
@@ -118,25 +118,21 @@ Running gcov for unit test coverage
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-----
- make clean
- make CFLAGS='-g -fprofile-arcs -ftest-coverage'
- ./src/test/test
- gcov -o src/common src/common/*.[ch]
- gcov -o src/or src/or/*.[ch]
- cd ../or; gcov *.[ch]
+ ./configure --enable-coverage
+ make
+ ./src/test/test
+ mkdir coverage-output
+ ./contrib/coverage coverage-output
-----
-Then, look at the .gcov files. '-' before a line means that the
-compiler generated no code for that line. '######' means that the
-line was never reached. Lines with numbers were called that number
-of times.
+(On OSX, you'll need to start with "--enable-coverage CC=clang".)
+
+Then, look at the .gcov files in coverage-output. '-' before a line means
+that the compiler generated no code for that line. '######' means that the
+line was never reached. Lines with numbers were called that number of times.
If that doesn't work:
* Try configuring Tor with --disable-gcc-hardening
- * On recent OSX versions, you might need to add CC=clang to your
- build line, as in:
- make CFLAGS='-g -fprofile-arcs -ftest-coverage' CC=clang
- Their llvm-gcc doesn't work so great for me.
Profiling Tor with oprofile
~~~~~~~~~~~~~~~~~~~~~~~~~~~