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, Nov 30, 12:03 AM
Unknown Object (File)
Sat, Nov 23, 8:41 AM
Unknown Object (File)
Fri, Nov 22, 12:33 AM
Unknown Object (File)
Wed, Nov 13, 8:23 PM
Unknown Object (File)
Tue, Nov 12, 1:35 AM
Unknown Object (File)
Oct 13 2024, 2:40 AM
Unknown Object (File)
Oct 13 2024, 2:11 AM
Unknown Object (File)
Oct 13 2024, 2:11 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 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.