]> Cypherpunks repositories - gostls13.git/commitdiff
runtime/pprof/internal/protopprof: fix TestTranslateCPUProfileWithSamples test for...
authorVladimir Stefanovic <vladimir.stefanovic@imgtec.com>
Thu, 17 Nov 2016 19:06:27 +0000 (20:06 +0100)
committerBrad Fitzpatrick <bradfitz@golang.org>
Thu, 17 Nov 2016 19:58:45 +0000 (19:58 +0000)
Change-Id: I01168a7530e18dd1098d467d0c8a330f727ba91f
Reviewed-on: https://go-review.googlesource.com/33281
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>

src/runtime/pprof/internal/protopprof/protopprof_test.go

index ad8b04bd376d3f5398f19b8101254d9d2029ad86..f1937b5bd06ca647571a3437fb33ecd99936cf72 100644 (file)
@@ -43,10 +43,10 @@ func createProfileWithTwoSamples(t *testing.T, periodMs uintptr, count1 uintptr,
        // Mock the sample header produced by cpu profiler. Write a sample
        // period of 2000 microseconds, followed by no samples.
        buf := new(bytes.Buffer)
-       words := []uint64{0, 3, 0, uint64(periodMs), 0, uint64(count1), 2,
-               uint64(address1), uint64(address1 + 2),
-               uint64(count2), 2, uint64(address2), uint64(address2 + 2),
-               0, uint64(1), 0}
+       words := []uintptr{0, 3, 0, uintptr(periodMs), 0, uintptr(count1), 2,
+               uintptr(address1), uintptr(address1 + 2),
+               uintptr(count2), 2, uintptr(address2), uintptr(address2 + 2),
+               0, 1, 0}
        for _, n := range words {
                var err error
                switch unsafe.Sizeof(int(0)) {