Commit 5cd6ab5b authored by Vladimir Stefanovic's avatar Vladimir Stefanovic Committed by Brad Fitzpatrick

runtime/pprof/internal/protopprof: fix TestTranslateCPUProfileWithSamples test for mips

Change-Id: I01168a7530e18dd1098d467d0c8a330f727ba91f
Reviewed-on: https://go-review.googlesource.com/33281Reviewed-by: 's avatarBrad Fitzpatrick <bradfitz@golang.org>
Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
parent 05dc6b26
......@@ -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)) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment