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)
Sun, Oct 13, 2:40 AM
Unknown Object (File)
Sun, Oct 13, 2:11 AM
Unknown Object (File)
Sun, Oct 13, 2:11 AM
Unknown Object (File)
Sun, Oct 13, 2:10 AM
Unknown Object (File)
Oct 1 2024, 5:01 PM
Unknown Object (File)
Sep 24 2024, 7:09 PM
Unknown Object (File)
Sep 24 2024, 5:21 AM
Unknown Object (File)
Sep 23 2024, 6:36 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 Passed
Unit
No Test Coverage
Build Status
Buildable 52941
Build 49832: 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.