README.md in stackprof-0.2.15 vs README.md in stackprof-0.2.16

- old
+ new

@@ -107,12 +107,12 @@ ## Sampling four sampling modes are supported: - - :wall (using `ITIMER_REAL` and `SIGALRM`) - - :cpu (using `ITIMER_PROF` and `SIGPROF`) [default mode] + - :wall (using `ITIMER_REAL` and `SIGALRM`) [default mode] + - :cpu (using `ITIMER_PROF` and `SIGPROF`) - :object (using `RUBY_INTERNAL_EVENT_NEWOBJ`) - :custom (user-defined via `StackProf.sample`) samplers have a tuneable interval which can be used to reduce overhead or increase granularity: @@ -139,10 +139,16 @@ StackProf.run(mode: :object, out: 'tmp/stackprof.dump', interval: 1) do #... end ``` +by default, samples taken during garbage collection will show as garbage collection frames +including both mark and sweep phases. for longer traces, these can leave gaps in a flamegraph +that are hard to follow and can be disabled by setting the `ignore_gc` option to true. +garbage collection time will still be present in the profile but not explicitly marked with +its own frame. + samples are taken using a combination of three new C-APIs in ruby 2.1: - signal handlers enqueue a sampling job using `rb_postponed_job_register_one`. this ensures callstack samples can be taken safely, in case the VM is garbage collecting or in some other inconsistent state during the interruption. @@ -326,9 +332,10 @@ Option | Meaning ------- | --------- `mode` | mode of sampling: `:cpu`, `:wall`, `:object`, or `:custom` [c.f.](#sampling) `out` | the target file, which will be overwritten `interval` | mode-relative sample rate [c.f.](#sampling) +`ignore_gc` | Ignore garbage collection frames `aggregate` | defaults: `true` - if `false` disables [aggregation](#aggregation) `raw` | defaults `false` - if `true` collects the extra data required by the `--flamegraph` and `--stackcollapse` report types `metadata` | defaults to `{}`. Must be a `Hash`. metadata associated with this profile `save_every`| (rack middleware only) write the target file after this many requests