]> git.ipfire.org Git - thirdparty/valgrind.git/commitdiff
Document self-hosting.
authorNicholas Nethercote <njn@valgrind.org>
Mon, 10 Oct 2005 11:36:55 +0000 (11:36 +0000)
committerNicholas Nethercote <njn@valgrind.org>
Mon, 10 Oct 2005 11:36:55 +0000 (11:36 +0000)
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4896

README_DEVELOPERS

index f7cb502ee70523510b5d97abb9e9db58e3cbd0a3..60ee523a7980bd065a68e7f8cf2f8c6dd6e32cad 100644 (file)
@@ -50,3 +50,26 @@ you want and do this in gdb:
 
   jump *$eip
 
+
+Self-hosting
+~~~~~~~~~~~~
+To run Valgrind under Valgrind:
+
+(1) Check out 2 trees, "inner" and "outer".  "inner" runs the app
+    directly and is what you will be profiling.  "outer" does the
+    profiling.
+
+(2) Configure inner with --enable-inner and build/install as
+    usual.
+
+(3) Configure outer normally and build/install as usual.
+
+(4) Choose a very simple program (date) and try
+
+    outer/.../bin/valgrind --weird-hacks=enable-outer   \
+       --tool=cachegrind -v inner/.../bin/valgrind --tool=none -v prog
+
+It's fragile, confusing and slow, but it does work well enough for
+you to get some useful performance data.  At the time of writing
+the allocator is not annotated with client requests so Memcheck is
+not as useful as it could be.