Skip to content

Commit

Permalink
Fix nil span check
Browse files Browse the repository at this point in the history
  • Loading branch information
gjulianm committed Oct 16, 2024
1 parent 3f37339 commit 119e009
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions pkg/gpu/stream.go
Original file line number Diff line number Diff line change
Expand Up @@ -227,6 +227,7 @@ func (sh *StreamHandler) getCurrentData(now uint64) *model.StreamData {
span := sh.getCurrentKernelSpan(now)
if span != nil {
data.Spans = append(data.Spans, span)
data.Allocations = append(data.Allocations, getAssociatedAllocations(span)...)
}

for _, alloc := range sh.memAllocEvents {
Expand All @@ -238,8 +239,6 @@ func (sh *StreamHandler) getCurrentData(now uint64) *model.StreamData {
})
}

data.Allocations = append(data.Allocations, getAssociatedAllocations(data.Spans[0])...)

return data
}

Expand Down

0 comments on commit 119e009

Please sign in to comment.