about summary refs log tree commit homepage
diff options
context:
space:
mode:
authorEric Wong <e@80x24.org>2018-07-02 11:54:25 +0000
committerEric Wong <e@80x24.org>2018-07-02 11:56:31 +0000
commitdba85c8bdb6ddbe71dbaacbbf6e9a1fe610704c6 (patch)
treed4ec36747770ad28baafb749d3bb7ca788468a04
parentf28676e18a9ac0b031b0ff8c56105815cf911d12 (diff)
downloadmwrap-dba85c8bdb6ddbe71dbaacbbf6e9a1fe610704c6.tar.gz
-rw-r--r--README18
1 files changed, 9 insertions, 9 deletions
diff --git a/README b/README
index f9409b0..e3bcceb 100644
--- a/README
+++ b/README
@@ -36,17 +36,15 @@ It may work on NetBSD, OpenBSD and DragonFly BSD.
 == Usage
 
 mwrap works as an LD_PRELOAD and supplies a mwrap RubyGem executable to
-improve ease-of-use.  You can set dump_fd: in the MWRAP environment
-variable to dump the results to a certain file descriptor at exit:
-
-        # Dump results to stderr at exit:
-        MWRAP=dump_fd:2 mwrap RUBY_COMMAND
-
-You may also set dump_path to append to a log file:
+improve ease-of-use.  You can set dump_path: in the MWRAP environment
+variable to append the results to a log file:
 
         MWRAP=dump_path:/path/to/log mwrap RUBY_COMMAND
 
-You may also `require 'mwrap'' in your Ruby code and use
+        # And to display the locations with the most allocations:
+        sort -k1,1rn </path/to/log | $PAGER
+
+You may also `require "mwrap"' in your Ruby code and use
 Mwrap.dump, Mwrap.clear, Mwrap.reset, Mwrap.each, etc.
 
 However, mwrap MUST be loaded via LD_PRELOAD to have any
@@ -57,7 +55,9 @@ The output of the mwrap dump is a text file with 3 columns:
         total_bytes        call_count        location
 
 Where location is a Ruby source location (if made under GVL)
-or an address retrieved by backtrace_symbols(3)
+or an address retrieved by backtrace_symbols(3).  It is
+recommended to use the sort(1) command on either of the
+first two columns to find the hottest malloc locations.
 
 == Known problems