Skip to content

Commit

Permalink
koordlet: fix cpi compute with CpuCyclesProfiler (#1482)
Browse files Browse the repository at this point in the history
Signed-off-by: bowen-intel <bowen.song@intel.com>
  • Loading branch information
bowen-intel committed Jul 31, 2023
1 parent 281a5e0 commit 05b892f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pkg/koordlet/util/perf/perf_linux.go
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ func NewPerfCollector(cgroupFile *os.File, cpus []int) (*PerfCollector, error) {
cpuHwProfilersMap: map[int]*perf.HardwareProfiler{},
}
for _, cpu := range cpus {
cpiProfiler, err := perf.NewHardwareProfiler(int(cgroupFile.Fd()), cpu, perf.RefCpuCyclesProfiler|perf.CpuInstrProfiler, unix.PERF_FLAG_PID_CGROUP)
cpiProfiler, err := perf.NewHardwareProfiler(int(cgroupFile.Fd()), cpu, perf.CpuCyclesProfiler|perf.CpuInstrProfiler, unix.PERF_FLAG_PID_CGROUP)
if err != nil && !cpiProfiler.HasProfilers() {
return nil, err
}
Expand Down

0 comments on commit 05b892f

Please sign in to comment.