]> Cypherpunks repositories - gostls13.git/commitdiff
runtime/pprof: don't accept "," in profile PCs
authorAustin Clements <austin@google.com>
Wed, 19 Apr 2017 20:11:15 +0000 (16:11 -0400)
committerAustin Clements <austin@google.com>
Thu, 20 Apr 2017 19:46:38 +0000 (19:46 +0000)
TestBlockProfile matches samples against a regexp that accepts "," in
profile PCs. I suspect this was just a syntax mistake. Remove "," from
the character class.

Change-Id: Idcfc20ed6900075abae08597ba71db559e89b37b
Reviewed-on: https://go-review.googlesource.com/41111
Run-TryBot: Austin Clements <austin@google.com>
Reviewed-by: Peter Weinberger <pjw@google.com>
src/runtime/pprof/pprof_test.go

index 906eae9bf51629ca3bbc71826c38b79da3d98df5..b4696762aa524c900be569d82210693a9f26dce1 100644 (file)
@@ -364,45 +364,45 @@ func TestBlockProfile(t *testing.T) {
        tests := [...]TestCase{
                {"chan recv", blockChanRecv, `
 [0-9]+ [0-9]+ @( 0x[[:xdigit:]]+)+
-#      0x[0-9,a-f]+    runtime\.chanrecv1\+0x[0-9,a-f]+        .*/src/runtime/chan.go:[0-9]+
-#      0x[0-9,a-f]+    runtime/pprof\.blockChanRecv\+0x[0-9,a-f]+      .*/src/runtime/pprof/pprof_test.go:[0-9]+
-#      0x[0-9,a-f]+    runtime/pprof\.TestBlockProfile\+0x[0-9,a-f]+   .*/src/runtime/pprof/pprof_test.go:[0-9]+
+#      0x[0-9a-f]+     runtime\.chanrecv1\+0x[0-9a-f]+ .*/src/runtime/chan.go:[0-9]+
+#      0x[0-9a-f]+     runtime/pprof\.blockChanRecv\+0x[0-9a-f]+       .*/src/runtime/pprof/pprof_test.go:[0-9]+
+#      0x[0-9a-f]+     runtime/pprof\.TestBlockProfile\+0x[0-9a-f]+    .*/src/runtime/pprof/pprof_test.go:[0-9]+
 `},
                {"chan send", blockChanSend, `
 [0-9]+ [0-9]+ @( 0x[[:xdigit:]]+)+
-#      0x[0-9,a-f]+    runtime\.chansend1\+0x[0-9,a-f]+        .*/src/runtime/chan.go:[0-9]+
-#      0x[0-9,a-f]+    runtime/pprof\.blockChanSend\+0x[0-9,a-f]+      .*/src/runtime/pprof/pprof_test.go:[0-9]+
-#      0x[0-9,a-f]+    runtime/pprof\.TestBlockProfile\+0x[0-9,a-f]+   .*/src/runtime/pprof/pprof_test.go:[0-9]+
+#      0x[0-9a-f]+     runtime\.chansend1\+0x[0-9a-f]+ .*/src/runtime/chan.go:[0-9]+
+#      0x[0-9a-f]+     runtime/pprof\.blockChanSend\+0x[0-9a-f]+       .*/src/runtime/pprof/pprof_test.go:[0-9]+
+#      0x[0-9a-f]+     runtime/pprof\.TestBlockProfile\+0x[0-9a-f]+    .*/src/runtime/pprof/pprof_test.go:[0-9]+
 `},
                {"chan close", blockChanClose, `
 [0-9]+ [0-9]+ @( 0x[[:xdigit:]]+)+
-#      0x[0-9,a-f]+    runtime\.chanrecv1\+0x[0-9,a-f]+        .*/src/runtime/chan.go:[0-9]+
-#      0x[0-9,a-f]+    runtime/pprof\.blockChanClose\+0x[0-9,a-f]+     .*/src/runtime/pprof/pprof_test.go:[0-9]+
-#      0x[0-9,a-f]+    runtime/pprof\.TestBlockProfile\+0x[0-9,a-f]+   .*/src/runtime/pprof/pprof_test.go:[0-9]+
+#      0x[0-9a-f]+     runtime\.chanrecv1\+0x[0-9a-f]+ .*/src/runtime/chan.go:[0-9]+
+#      0x[0-9a-f]+     runtime/pprof\.blockChanClose\+0x[0-9a-f]+      .*/src/runtime/pprof/pprof_test.go:[0-9]+
+#      0x[0-9a-f]+     runtime/pprof\.TestBlockProfile\+0x[0-9a-f]+    .*/src/runtime/pprof/pprof_test.go:[0-9]+
 `},
                {"select recv async", blockSelectRecvAsync, `
 [0-9]+ [0-9]+ @( 0x[[:xdigit:]]+)+
-#      0x[0-9,a-f]+    runtime\.selectgo\+0x[0-9,a-f]+ .*/src/runtime/select.go:[0-9]+
-#      0x[0-9,a-f]+    runtime/pprof\.blockSelectRecvAsync\+0x[0-9,a-f]+       .*/src/runtime/pprof/pprof_test.go:[0-9]+
-#      0x[0-9,a-f]+    runtime/pprof\.TestBlockProfile\+0x[0-9,a-f]+   .*/src/runtime/pprof/pprof_test.go:[0-9]+
+#      0x[0-9a-f]+     runtime\.selectgo\+0x[0-9a-f]+  .*/src/runtime/select.go:[0-9]+
+#      0x[0-9a-f]+     runtime/pprof\.blockSelectRecvAsync\+0x[0-9a-f]+        .*/src/runtime/pprof/pprof_test.go:[0-9]+
+#      0x[0-9a-f]+     runtime/pprof\.TestBlockProfile\+0x[0-9a-f]+    .*/src/runtime/pprof/pprof_test.go:[0-9]+
 `},
                {"select send sync", blockSelectSendSync, `
 [0-9]+ [0-9]+ @( 0x[[:xdigit:]]+)+
-#      0x[0-9,a-f]+    runtime\.selectgo\+0x[0-9,a-f]+ .*/src/runtime/select.go:[0-9]+
-#      0x[0-9,a-f]+    runtime/pprof\.blockSelectSendSync\+0x[0-9,a-f]+        .*/src/runtime/pprof/pprof_test.go:[0-9]+
-#      0x[0-9,a-f]+    runtime/pprof\.TestBlockProfile\+0x[0-9,a-f]+   .*/src/runtime/pprof/pprof_test.go:[0-9]+
+#      0x[0-9a-f]+     runtime\.selectgo\+0x[0-9a-f]+  .*/src/runtime/select.go:[0-9]+
+#      0x[0-9a-f]+     runtime/pprof\.blockSelectSendSync\+0x[0-9a-f]+ .*/src/runtime/pprof/pprof_test.go:[0-9]+
+#      0x[0-9a-f]+     runtime/pprof\.TestBlockProfile\+0x[0-9a-f]+    .*/src/runtime/pprof/pprof_test.go:[0-9]+
 `},
                {"mutex", blockMutex, `
 [0-9]+ [0-9]+ @( 0x[[:xdigit:]]+)+
-#      0x[0-9,a-f]+    sync\.\(\*Mutex\)\.Lock\+0x[0-9,a-f]+   .*/src/sync/mutex\.go:[0-9]+
-#      0x[0-9,a-f]+    runtime/pprof\.blockMutex\+0x[0-9,a-f]+ .*/src/runtime/pprof/pprof_test.go:[0-9]+
-#      0x[0-9,a-f]+    runtime/pprof\.TestBlockProfile\+0x[0-9,a-f]+   .*/src/runtime/pprof/pprof_test.go:[0-9]+
+#      0x[0-9a-f]+     sync\.\(\*Mutex\)\.Lock\+0x[0-9a-f]+    .*/src/sync/mutex\.go:[0-9]+
+#      0x[0-9a-f]+     runtime/pprof\.blockMutex\+0x[0-9a-f]+  .*/src/runtime/pprof/pprof_test.go:[0-9]+
+#      0x[0-9a-f]+     runtime/pprof\.TestBlockProfile\+0x[0-9a-f]+    .*/src/runtime/pprof/pprof_test.go:[0-9]+
 `},
                {"cond", blockCond, `
 [0-9]+ [0-9]+ @( 0x[[:xdigit:]]+)+
-#      0x[0-9,a-f]+    sync\.\(\*Cond\)\.Wait\+0x[0-9,a-f]+    .*/src/sync/cond\.go:[0-9]+
-#      0x[0-9,a-f]+    runtime/pprof\.blockCond\+0x[0-9,a-f]+  .*/src/runtime/pprof/pprof_test.go:[0-9]+
-#      0x[0-9,a-f]+    runtime/pprof\.TestBlockProfile\+0x[0-9,a-f]+   .*/src/runtime/pprof/pprof_test.go:[0-9]+
+#      0x[0-9a-f]+     sync\.\(\*Cond\)\.Wait\+0x[0-9a-f]+     .*/src/sync/cond\.go:[0-9]+
+#      0x[0-9a-f]+     runtime/pprof\.blockCond\+0x[0-9a-f]+   .*/src/runtime/pprof/pprof_test.go:[0-9]+
+#      0x[0-9a-f]+     runtime/pprof\.TestBlockProfile\+0x[0-9a-f]+    .*/src/runtime/pprof/pprof_test.go:[0-9]+
 `},
        }