Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Increase the readability of perf event logs. #2689

Merged
merged 1 commit into from
Nov 9, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions manager/manager.go
Original file line number Diff line number Diff line change
Expand Up @@ -932,7 +932,7 @@ func (m *manager) createContainerLocked(containerName string, watchSource watche
perfCgroupPath := path.Join(fs2.UnifiedMountpoint, containerName)
cont.perfCollector, err = m.perfManager.GetCollector(perfCgroupPath)
if err != nil {
klog.V(4).Infof("perf_event metrics will not be available for container %s: %s", containerName, err)
klog.Errorf("Perf event metrics will not be available for container %q: %v", containerName, err)
}
} else {
devicesCgroupPath, err := handler.GetCgroupPath("devices")
Expand All @@ -950,7 +950,7 @@ func (m *manager) createContainerLocked(containerName string, watchSource watche
} else {
cont.perfCollector, err = m.perfManager.GetCollector(perfCgroupPath)
if err != nil {
klog.V(4).Infof("perf_event metrics will not be available for container %s: %s", containerName, err)
klog.Errorf("Perf event metrics will not be available for container %q: %v", containerName, err)
}
}
}
Expand Down
3 changes: 1 addition & 2 deletions perf/uncore_libpfm.go
Original file line number Diff line number Diff line change
Expand Up @@ -151,8 +151,7 @@ func NewUncoreCollector(cgroupPath string, events PerfEvents, cpuToSocket map[in

err := collector.setup(events, systemDevicesPath)
if err != nil {
formatedError := fmt.Errorf("unable to setup uncore perf event collector: %v", err)
klog.V(5).Infof("Perf uncore metrics will not be available: %s", formatedError)
klog.Errorf("Perf uncore metrics will not be available: unable to setup uncore perf event collector: %v", err)
return &stats.NoopCollector{}
}

Expand Down