Bug 1094552 (part 4) - Rename AnalyzeReports() as Analyze(). r=mccr8.

Because DMD is no longer just about measuring memory reports coverage, but is
also used for more general heap profiling.

--HG--
extra : rebase_source : 82b4579de240037f96cf6618b15870925adc431b
Bug 1094552 (part 5) - DMD: choose the profiling mode at start-up. r=mccr8.

This patch moves profiling mode selection from post-processing (in dmd.py) to
DMD start-up. This will make it easier to add new kinds of profiling, such as
cumulative heap profiling.

Specifically:

- There's a new --mode option. |LiveWithReports| is the default, as it is
  currently.

- dmd.py's --ignore-reports option is gone.

- There's a new |mode| field in the JSON output.

- Reports-related operations are now no-ops if DMD isn't in LiveWithReports
  mode.

- Diffs are only allowed for output files that have the same mode.

- A new function ResetEverything() replaces the SetSampleBelowSize() and
  ClearBlocks(), which were used by the test to change DMD options.

- The tests in SmokeDMD.cpp are split up so they can be run multiple times, in
  different modes. The exact combinations of tests and modes has been changed a
  bit.

--HG--
rename : memory/replace/dmd/test/full-reports-empty-expected.txt => memory/replace/dmd/test/full-empty-dark-matter-expected.txt
rename : memory/replace/dmd/test/full-heap-empty-expected.txt => memory/replace/dmd/test/full-empty-live-expected.txt
rename : memory/replace/dmd/test/full-heap-sampled-expected.txt => memory/replace/dmd/test/full-sampled-live-expected.txt
rename : memory/replace/dmd/test/full-reports-unsampled1-expected.txt => memory/replace/dmd/test/full-unsampled1-dark-matter-expected.txt
rename : memory/replace/dmd/test/full-heap-unsampled1-expected.txt => memory/replace/dmd/test/full-unsampled1-live-expected.txt
rename : memory/replace/dmd/test/full-reports-unsampled2-expected.txt => memory/replace/dmd/test/full-unsampled2-dark-matter-expected.txt
rename : memory/replace/dmd/test/script-diff-basic-expected.txt => memory/replace/dmd/test/script-diff-live-expected.txt
rename : memory/replace/dmd/test/script-diff1.json => memory/replace/dmd/test/script-diff-live1.json
rename : memory/replace/dmd/test/script-diff2.json => memory/replace/dmd/test/script-diff-live2.json
extra : rebase_source : bf32cc4e0d82aa1a20ceb55e8ea259850b49cc06
Bug 1094552 (part 6) - DMD: add support for cumulative heap profiling. r=mccr8.

By adding a new "cumulative" mode.

--HG--
extra : rebase_source : 5c851b7c594a134fae48393ff0becfd057715041