Bug 1085727 (part 3) - Print dmd.py's invocation at the top of its output. r=mccr8.
☠☠ backed out by 31bb4f83a725 ☠ ☠
authorNicholas Nethercote <nnethercote@mozilla.com>
Mon, 20 Oct 2014 17:45:58 -0700
changeset 212057 1bb832d0c539504880135e1f8c6c9c86ebd27dd0
parent 212056 2cfce41bed5ca701a67df28f3da8c58bdcd355b4
child 212058 ea733dbd670ddb1f63b9fa056947db1fed70e049
push id27697
push usercbook@mozilla.com
push dateFri, 24 Oct 2014 13:48:53 +0000
treeherdermozilla-central@de805196bbc4 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmccr8
bugs1085727
milestone36.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1085727 (part 3) - Print dmd.py's invocation at the top of its output. r=mccr8.
memory/replace/dmd/dmd.py
memory/replace/dmd/test/full-heap-empty-expected.txt
memory/replace/dmd/test/full-heap-sampled-expected.txt
memory/replace/dmd/test/full-heap-unsampled1-expected.txt
memory/replace/dmd/test/full-heap-unsampled2-expected.txt
memory/replace/dmd/test/full-reports-empty-expected.txt
memory/replace/dmd/test/full-reports-sampled-expected.txt
memory/replace/dmd/test/full-reports-unsampled1-expected.txt
memory/replace/dmd/test/full-reports-unsampled2-expected.txt
memory/replace/dmd/test/script-diff-basic-expected.txt
memory/replace/dmd/test/script-diff-options-expected.txt
memory/replace/dmd/test/script-ignore-alloc-fns-expected.txt
memory/replace/dmd/test/script-max-frames-1-expected.txt
memory/replace/dmd/test/script-max-frames-3-expected.txt
memory/replace/dmd/test/script-max-frames-8-expected.txt
memory/replace/dmd/test/script-sort-by-req-expected.txt
memory/replace/dmd/test/script-sort-by-slop-expected.txt
memory/replace/dmd/test/script-sort-by-usable-expected.txt
--- a/memory/replace/dmd/dmd.py
+++ b/memory/replace/dmd/dmd.py
@@ -607,18 +607,22 @@ def printDigest(args, digest):
 
 
     def printInvocation(n, dmdEnvVar, sampleBelowSize):
         out('Invocation{:} {{'.format(n))
         out('  $DMD = \'' + dmdEnvVar + '\'')
         out('  Sample-below size = ' + str(sampleBelowSize))
         out('}\n')
 
+    # Print command line. Strip dirs so the output is deterministic, which is
+    # needed for testing.
+    out(separator, end='')
+    out('# ' + ' '.join(map(os.path.basename, sys.argv)) + '\n')
+
     # Print invocation(s).
-    out(separator)
     if type(dmdEnvVar) is not tuple:
         printInvocation('', dmdEnvVar, sampleBelowSize)
     else:
         printInvocation(' 1', dmdEnvVar[0], sampleBelowSize[0])
         printInvocation(' 2', dmdEnvVar[1], sampleBelowSize[1])
 
     # Print records.
     if args.ignore_reports:
--- a/memory/replace/dmd/test/full-heap-empty-expected.txt
+++ b/memory/replace/dmd/test/full-heap-empty-expected.txt
@@ -1,9 +1,10 @@
 #-----------------------------------------------------------------
+# dmd.py --filter-stacks-for-testing -o full-heap-empty-actual.txt --ignore-reports full-empty.json
 
 Invocation {
   $DMD = '1'
   Sample-below size = 1
 }
 
 #-----------------------------------------------------------------
 
--- a/memory/replace/dmd/test/full-heap-sampled-expected.txt
+++ b/memory/replace/dmd/test/full-heap-sampled-expected.txt
@@ -1,9 +1,10 @@
 #-----------------------------------------------------------------
+# dmd.py --filter-stacks-for-testing -o full-heap-sampled-actual.txt --ignore-reports full-sampled.json
 
 Invocation {
   $DMD = '1'
   Sample-below size = 128
 }
 
 #-----------------------------------------------------------------
 
--- a/memory/replace/dmd/test/full-heap-unsampled1-expected.txt
+++ b/memory/replace/dmd/test/full-heap-unsampled1-expected.txt
@@ -1,9 +1,10 @@
 #-----------------------------------------------------------------
+# dmd.py --filter-stacks-for-testing -o full-heap-unsampled1-actual.txt --ignore-reports full-unsampled1.json
 
 Invocation {
   $DMD = '1'
   Sample-below size = 1
 }
 
 #-----------------------------------------------------------------
 
--- a/memory/replace/dmd/test/full-heap-unsampled2-expected.txt
+++ b/memory/replace/dmd/test/full-heap-unsampled2-expected.txt
@@ -1,9 +1,10 @@
 #-----------------------------------------------------------------
+# dmd.py --filter-stacks-for-testing -o full-heap-unsampled2-actual.txt --ignore-reports full-unsampled2.json
 
 Invocation {
   $DMD = '1'
   Sample-below size = 1
 }
 
 #-----------------------------------------------------------------
 
--- a/memory/replace/dmd/test/full-reports-empty-expected.txt
+++ b/memory/replace/dmd/test/full-reports-empty-expected.txt
@@ -1,9 +1,10 @@
 #-----------------------------------------------------------------
+# dmd.py --filter-stacks-for-testing -o full-reports-empty-actual.txt full-empty.json
 
 Invocation {
   $DMD = '1'
   Sample-below size = 1
 }
 
 #-----------------------------------------------------------------
 
--- a/memory/replace/dmd/test/full-reports-sampled-expected.txt
+++ b/memory/replace/dmd/test/full-reports-sampled-expected.txt
@@ -1,9 +1,10 @@
 #-----------------------------------------------------------------
+# dmd.py --filter-stacks-for-testing -o full-reports-sampled-actual.txt full-sampled.json
 
 Invocation {
   $DMD = '1'
   Sample-below size = 128
 }
 
 #-----------------------------------------------------------------
 
--- a/memory/replace/dmd/test/full-reports-unsampled1-expected.txt
+++ b/memory/replace/dmd/test/full-reports-unsampled1-expected.txt
@@ -1,9 +1,10 @@
 #-----------------------------------------------------------------
+# dmd.py --filter-stacks-for-testing -o full-reports-unsampled1-actual.txt full-unsampled1.json
 
 Invocation {
   $DMD = '1'
   Sample-below size = 1
 }
 
 #-----------------------------------------------------------------
 
--- a/memory/replace/dmd/test/full-reports-unsampled2-expected.txt
+++ b/memory/replace/dmd/test/full-reports-unsampled2-expected.txt
@@ -1,9 +1,10 @@
 #-----------------------------------------------------------------
+# dmd.py --filter-stacks-for-testing -o full-reports-unsampled2-actual.txt full-unsampled2.json
 
 Invocation {
   $DMD = '1'
   Sample-below size = 1
 }
 
 #-----------------------------------------------------------------
 
--- a/memory/replace/dmd/test/script-diff-basic-expected.txt
+++ b/memory/replace/dmd/test/script-diff-basic-expected.txt
@@ -1,9 +1,10 @@
 #-----------------------------------------------------------------
+# dmd.py --filter-stacks-for-testing -o script-diff-basic-actual.txt script-diff1.json script-diff2.json
 
 Invocation 1 {
   $DMD = '--sample-below=127'
   Sample-below size = 127
 }
 
 Invocation 2 {
   $DMD = '--sample-below=63'
--- a/memory/replace/dmd/test/script-diff-options-expected.txt
+++ b/memory/replace/dmd/test/script-diff-options-expected.txt
@@ -1,9 +1,10 @@
 #-----------------------------------------------------------------
+# dmd.py --filter-stacks-for-testing -o script-diff-options-actual.txt --ignore-reports script-diff1.json script-diff2.json
 
 Invocation 1 {
   $DMD = '--sample-below=127'
   Sample-below size = 127
 }
 
 Invocation 2 {
   $DMD = '--sample-below=63'
--- a/memory/replace/dmd/test/script-ignore-alloc-fns-expected.txt
+++ b/memory/replace/dmd/test/script-ignore-alloc-fns-expected.txt
@@ -1,9 +1,10 @@
 #-----------------------------------------------------------------
+# dmd.py --filter-stacks-for-testing -o script-ignore-alloc-fns-actual.txt --ignore-reports --ignore-alloc-fns script-ignore-alloc-fns.json
 
 Invocation {
   $DMD = '1'
   Sample-below size = 2500
 }
 
 #-----------------------------------------------------------------
 
--- a/memory/replace/dmd/test/script-max-frames-1-expected.txt
+++ b/memory/replace/dmd/test/script-max-frames-1-expected.txt
@@ -1,9 +1,10 @@
 #-----------------------------------------------------------------
+# dmd.py --filter-stacks-for-testing -o script-max-frames-1-actual.txt --ignore-reports --max-frames=1 script-max-frames.json
 
 Invocation {
   $DMD = '1'
   Sample-below size = 1
 }
 
 #-----------------------------------------------------------------
 
--- a/memory/replace/dmd/test/script-max-frames-3-expected.txt
+++ b/memory/replace/dmd/test/script-max-frames-3-expected.txt
@@ -1,9 +1,10 @@
 #-----------------------------------------------------------------
+# dmd.py --filter-stacks-for-testing -o script-max-frames-3-actual.txt --ignore-reports --max-frames=3 --no-fix-stacks script-max-frames.json
 
 Invocation {
   $DMD = '1'
   Sample-below size = 1
 }
 
 #-----------------------------------------------------------------
 
--- a/memory/replace/dmd/test/script-max-frames-8-expected.txt
+++ b/memory/replace/dmd/test/script-max-frames-8-expected.txt
@@ -1,9 +1,10 @@
 #-----------------------------------------------------------------
+# dmd.py --filter-stacks-for-testing -o script-max-frames-8-actual.txt --ignore-reports --max-frames=8 script-max-frames.json
 
 Invocation {
   $DMD = '1'
   Sample-below size = 1
 }
 
 #-----------------------------------------------------------------
 
--- a/memory/replace/dmd/test/script-sort-by-req-expected.txt
+++ b/memory/replace/dmd/test/script-sort-by-req-expected.txt
@@ -1,9 +1,10 @@
 #-----------------------------------------------------------------
+# dmd.py --filter-stacks-for-testing -o script-sort-by-req-actual.txt --ignore-reports --sort-by=req --no-fix-stacks script-sort-by.json.gz
 
 Invocation {
   $DMD = '1'
   Sample-below size = 1
 }
 
 #-----------------------------------------------------------------
 
--- a/memory/replace/dmd/test/script-sort-by-slop-expected.txt
+++ b/memory/replace/dmd/test/script-sort-by-slop-expected.txt
@@ -1,9 +1,10 @@
 #-----------------------------------------------------------------
+# dmd.py --filter-stacks-for-testing -o script-sort-by-slop-actual.txt --ignore-reports --sort-by=slop script-sort-by.json.gz
 
 Invocation {
   $DMD = '1'
   Sample-below size = 1
 }
 
 #-----------------------------------------------------------------
 
--- a/memory/replace/dmd/test/script-sort-by-usable-expected.txt
+++ b/memory/replace/dmd/test/script-sort-by-usable-expected.txt
@@ -1,9 +1,10 @@
 #-----------------------------------------------------------------
+# dmd.py --filter-stacks-for-testing -o script-sort-by-usable-actual.txt --ignore-reports --sort-by=usable script-sort-by.json.gz
 
 Invocation {
   $DMD = '1'
   Sample-below size = 1
 }
 
 #-----------------------------------------------------------------