about summary refs log tree commit homepage
path: root/README
diff options
context:
space:
mode:
Diffstat (limited to 'README')
-rw-r--r--README30
1 files changed, 23 insertions, 7 deletions
diff --git a/README b/README
index c6d45d0..ed4ea08 100644
--- a/README
+++ b/README
@@ -4,20 +4,35 @@ Wraps all malloc, calloc, and realloc calls to trace the Ruby source
 location of such calls and bytes allocated at each callsite.  This
 functionality may change incompatibly or be expanded in the future.
 
-This is useful for finding malloc hotspots in Ruby code.  It does
-not track allocation lifetimes, or frees, however.
+This is useful for finding malloc hotspots in Ruby code.  It
+does not track allocation lifetimes, or frees, however.  It
+works best for allocations under GVL, but tries to track numeric
+caller addresses for allocations made without GVL.
 
-Only supports Ruby trunk (2.6.0dev+) a few platforms:
+It requires a concurrent lock-free hash table from the
+Userspace RCU project: https://liburcu.org/
+
+Only supports Ruby trunk (2.6.0dev+) on a few platforms:
 
 * GNU/Linux
 * FreeBSD 11
 
+== Install
+
+        # FreeBSD: pkg install liburcu
+
+        # Debian-based systems: apt-get liburcu-dev
+
+        # Install mwrap via RubyGems.org
+        gem install mwrap
+
 == Usage
 
-It works as an LD_PRELOAD and supplies a mwrap RubyGem executable to
+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:
@@ -25,14 +40,15 @@ You may also set dump_path to append to a log file:
         MWRAP=dump_path:/path/to/log mwrap RUBY_COMMAND
 
 You may also `require 'mwrap'' in your Ruby code and use
-Mwrap.dump and Mwrap.clear.
+Mwrap.dump, Mwrap.clear, Mwrap.each, etc.
+
+However, mwrap MUST be loaded via LD_PRELOAD-ed to have any
+effect in tracking mallocs.
 
 == Known problems
 
 * 32-bit machines are prone to overflow (WONTFIX)
 
-* Allocations outside of GVL are not tracked (TODO)
-
 == Mail archives and list:
 
         https://80x24.org/mwrap-public/