Bug 1273324 - Fix dmd test on mozilla-beta. r=njn a=testonly
authorEric Rahm <erahm@mozilla.com>
Fri, 20 May 2016 10:29:36 -0700
changeset 326334 bb07b5227ff1683f14ae78cdd630164969335608
parent 326333 44e878aba14a9fc466e4e86e739ff513bae375b5
child 326335 fdb6793f1e4a6b6bb6851adc2c322f1e552e64f2
push id1128
push userjlund@mozilla.com
push dateWed, 01 Jun 2016 01:31:59 +0000
treeherdermozilla-release@fe0d30de989d [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersnjn, testonly
bugs1273324
milestone47.0
Bug 1273324 - Fix dmd test on mozilla-beta. r=njn a=testonly
memory/replace/dmd/test/SmokeDMD.cpp
--- a/memory/replace/dmd/test/SmokeDMD.cpp
+++ b/memory/replace/dmd/test/SmokeDMD.cpp
@@ -289,38 +289,39 @@ TestSampled(const char* aTestName, const
   s = (char*) malloc(128);
   UseItOrLoseIt(s, aSeven);
 
   // This exceeds the sample size, and so is reported exactly.
   s = (char*) malloc(160);
   UseItOrLoseIt(s, aSeven);
 
   // These together constitute exactly one sample.
+  // TODO(ER): Isn't this two samples?
   for (int i = 0; i < aSeven + 9; i++) {
     s = (char*) malloc(16);
     UseItOrLoseIt(s, aSeven);
   }
 
-  // These fall 8 bytes short of a full sample.
-  for (int i = 0; i < aSeven + 8; i++) {
-    s = (char*) malloc(8);
+  // These fall 16 bytes short of a full sample.
+  for (int i = 0; i < aSeven; i++) {
+    s = (char*) malloc(16);
     UseItOrLoseIt(s, aSeven);
   }
 
   // This exceeds the sample size, and so is recorded exactly.
   s = (char*) malloc(256);
   UseItOrLoseIt(s, aSeven);
 
-  // This gets more than to a full sample from the |i < aSeven + 8| loop above.
+  // This gets more than to a full sample from the |i < aSeven| loop above.
   s = (char*) malloc(96);
   UseItOrLoseIt(s, aSeven);
 
   // This gets to another full sample.
-  for (int i = 0; i < aSeven - 2; i++) {
-    s = (char*) malloc(8);
+  for (int i = 0; i < aSeven - 4; i++) {
+    s = (char*) malloc(16);
     UseItOrLoseIt(s, aSeven);
   }
 
   // This allocates 16, 32, ..., 128 bytes, which results in a heap block
   // record that contains a mix of sample and non-sampled blocks, and so should
   // be printed with '~' signs.
   for (int i = 1; i <= aSeven + 1; i++) {
     s = (char*) malloc(i * 16);