diff options
Diffstat (limited to 'src/cmd/vendor/github.com/google/pprof/internal/driver/fetch.go')
| -rw-r--r-- | src/cmd/vendor/github.com/google/pprof/internal/driver/fetch.go | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/src/cmd/vendor/github.com/google/pprof/internal/driver/fetch.go b/src/cmd/vendor/github.com/google/pprof/internal/driver/fetch.go index a94ddf6adb..969c1dac11 100644 --- a/src/cmd/vendor/github.com/google/pprof/internal/driver/fetch.go +++ b/src/cmd/vendor/github.com/google/pprof/internal/driver/fetch.go @@ -174,10 +174,7 @@ func chunkedGrab(sources []profileSource, fetch plugin.Fetcher, obj plugin.ObjTo var count int for start := 0; start < len(sources); start += chunkSize { - end := start + chunkSize - if end > len(sources) { - end = len(sources) - } + end := min(start+chunkSize, len(sources)) chunkP, chunkMsrc, chunkSave, chunkCount, chunkErr := concurrentGrab(sources[start:end], fetch, obj, ui, tr) switch { case chunkErr != nil: |
