mirror of
https://github.com/golang/go
synced 2024-11-12 04:00:23 -07:00
runtime/pprof/internal/protopprof: fix TestTranslateCPUProfileWithSamples test for mips
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>
This commit is contained in:
parent
05dc6b26ca
commit
5cd6ab5b6d
@ -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)) {
|
||||
|
Loading…
Reference in New Issue
Block a user