Skip to content

Commit 3568682

Browse files
committed
pkg/profiler/cpu: Fix noop due to value struct
This caused any process to only report on a single thread per profile cycle, which resulted in incorrect profiling data.
1 parent ae49f6e commit 3568682

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

pkg/profiler/cpu/cpu.go

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -629,7 +629,11 @@ func (p *CPU) Run(ctx context.Context) error {
629629
}
630630
continue
631631
}
632-
data.RawSamples = append(data.RawSamples, perThreadRawData.RawSamples...)
632+
633+
groupedRawData[pid] = profile.ProcessRawData{
634+
PID: perThreadRawData.PID,
635+
RawSamples: append(data.RawSamples, perThreadRawData.RawSamples...),
636+
}
633637
}
634638

635639
processLastErrors := map[int]error{}

0 commit comments

Comments
 (0)