Page MenuHomeFreeBSD

hwpmc_arm64: plug memory leak
ClosedPublic

Authored by mhorne on Aug 1 2023, 4:22 PM.
Tags
None
Referenced Files
F111142144: D41268.id125422.diff
Fri, Feb 28, 12:06 AM
Unknown Object (File)
Thu, Feb 20, 5:55 PM
Unknown Object (File)
Fri, Feb 14, 1:58 PM
Unknown Object (File)
Tue, Feb 4, 5:36 PM
Unknown Object (File)
Tue, Feb 4, 2:50 AM
Unknown Object (File)
Sat, Feb 1, 3:16 PM
Unknown Object (File)
Thu, Jan 30, 10:55 AM
Unknown Object (File)
Jan 27 2025, 4:52 AM
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 Passed
Unit
No Test Coverage
Build Status
Buildable 52926
Build 49817: arc lint + arc unit

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.