Page MenuHomeFreeBSD

hwpmc_arm64: plug memory leak
ClosedPublic

Authored by mhorne on Aug 1 2023, 4:22 PM.
Tags
None
Referenced Files
Unknown Object (File)
Sat, May 11, 6:35 AM
Unknown Object (File)
Thu, May 2, 4:28 AM
Unknown Object (File)
Fri, Apr 26, 11:27 AM
Unknown Object (File)
Fri, Apr 26, 11:07 AM
Unknown Object (File)
Fri, Apr 26, 11:07 AM
Unknown Object (File)
Fri, Apr 26, 11:07 AM
Unknown Object (File)
Fri, Apr 26, 6:05 AM
Unknown Object (File)
Tue, Apr 23, 11:34 PM
Subscribers

Details

Summary

Free allocated per-CPU structures in the pcpu_fini and finalize methods.

While here, add debug trace entries to these methods.

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

mhorne requested review of this revision.Aug 1 2023, 4:22 PM
sys/dev/hwpmc/hwpmc_arm64.c
453

FYI this just makes it consistent with the trace entry I am adding. There is no need to encode cpu in the message, as every ktr record contains this value, and it is always true that cpu == curcpu for this function.

sys/dev/hwpmc/hwpmc_arm64.c
496–498

I think this would be safer if we moved it after disabling the PMC.

mhorne marked an inline comment as done.

Adjust order of operations.

This revision is now accepted and ready to land.Aug 1 2023, 7:50 PM
This revision was automatically updated to reflect the committed changes.