Skip to content

Commit

Permalink
fixup! Add pprofLabelForThreadNames config
Browse files Browse the repository at this point in the history
  • Loading branch information
stefanhaller committed Nov 23, 2023
1 parent ca4204b commit 49a0898
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions service/dap/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -1823,7 +1823,7 @@ func (s *Session) onThreadsRequest(request *dap.ThreadsRequest) {
thread = fmt.Sprintf(" (Thread %d)", g.Thread.ThreadID())
}
var labels strings.Builder
appendLabelsForKeys := func(keys []string) {
writeLabelsForKeys := func(keys []string) {
for _, k := range keys {
labelValue := g.Labels()[k]
if labelValue != "" {
Expand All @@ -1842,7 +1842,7 @@ func (s *Session) onThreadsRequest(request *dap.ThreadsRequest) {
keys = append(keys, k)
}
sort.Strings(keys)
appendLabelsForKeys(keys)
writeLabelsForKeys(keys)
} else {
labelValue := g.Labels()[labelKey]
if labelValue != "" {
Expand All @@ -1851,7 +1851,7 @@ func (s *Session) onThreadsRequest(request *dap.ThreadsRequest) {
}
}
} else {
appendLabelsForKeys(s.args.ShowPprofLabels)
writeLabelsForKeys(s.args.ShowPprofLabels)
}
// File name and line number are communicated via `stackTrace`
// so no need to include them here.
Expand Down

0 comments on commit 49a0898

Please sign in to comment.