File tree Expand file tree Collapse file tree 2 files changed +3
-2
lines changed
pkg/server/goroutinedumper Expand file tree Collapse file tree 2 files changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -9,6 +9,7 @@ go_library(
99 "//pkg/server/dumpstore" ,
1010 "//pkg/settings" ,
1111 "//pkg/settings/cluster" ,
12+ "//pkg/util/allstacks" ,
1213 "//pkg/util/log" ,
1314 "//pkg/util/timeutil" ,
1415 "@com_github_cockroachdb_errors//:errors" ,
Original file line number Diff line number Diff line change @@ -10,13 +10,13 @@ import (
1010 "context"
1111 "fmt"
1212 "os"
13- "runtime/pprof"
1413 "strings"
1514 "time"
1615
1716 "github.com/cockroachdb/cockroach/pkg/server/dumpstore"
1817 "github.com/cockroachdb/cockroach/pkg/settings"
1918 "github.com/cockroachdb/cockroach/pkg/settings/cluster"
19+ "github.com/cockroachdb/cockroach/pkg/util/allstacks"
2020 "github.com/cockroachdb/cockroach/pkg/util/log"
2121 "github.com/cockroachdb/cockroach/pkg/util/timeutil"
2222 "github.com/cockroachdb/errors"
@@ -162,7 +162,7 @@ func takeGoroutineDump(path string) error {
162162 }
163163 defer f .Close ()
164164 w := gzip .NewWriter (f )
165- if err = pprof . Lookup ( "goroutine" ). WriteTo ( w , 2 ); err != nil {
165+ if _ , err := w . Write ( allstacks . Get () ); err != nil {
166166 return errors .Wrapf (err , "error writing goroutine dump to %s" , path )
167167 }
168168 // Flush and write the gzip header. It doesn't close the underlying writer.
You can’t perform that action at this time.
0 commit comments