Skip to content

Commit 4852908

Browse files
committed
fix: fix type issue
1 parent e0de235 commit 4852908

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

perf/collector_libpfm.go

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -62,16 +62,16 @@ type group struct {
6262

6363
var (
6464
isLibpfmInitialized = false
65-
libpmfMutex = sync.Mutex{}
65+
libpfmMutex = sync.Mutex{}
6666
)
6767

6868
const (
6969
groupLeaderFileDescriptor = -1
7070
)
7171

7272
func init() {
73-
libpmfMutex.Lock()
74-
defer libpmfMutex.Unlock()
73+
libpfmMutex.Lock()
74+
defer libpfmMutex.Unlock()
7575
pErr := C.pfm_initialize()
7676
if pErr != C.PFM_SUCCESS {
7777
klog.Errorf("unable to initialize libpfm: %d", int(pErr))
@@ -411,8 +411,8 @@ func (c *collector) Destroy() {
411411

412412
// Finalize terminates libpfm4 to free resources.
413413
func Finalize() {
414-
libpmfMutex.Lock()
415-
defer libpmfMutex.Unlock()
414+
libpfmMutex.Lock()
415+
defer libpfmMutex.Unlock()
416416

417417
klog.V(1).Info("Attempting to terminate libpfm4")
418418
if !isLibpfmInitialized {

0 commit comments

Comments
 (0)