Page MenuHomeFreeBSD

usr.bin/netstat: don't call kresolve_list() if using live kernel
ClosedPublic

Authored by nikita_elyzion.net on Aug 29 2017, 1:42 PM.
Tags
None
Referenced Files
Unknown Object (File)
Wed, Apr 2, 8:10 AM
Unknown Object (File)
Wed, Mar 26, 2:50 AM
Unknown Object (File)
Sun, Mar 16, 4:15 AM
Unknown Object (File)
Thu, Mar 13, 6:06 AM
Unknown Object (File)
Mar 4 2025, 5:48 PM
Unknown Object (File)
Feb 24 2025, 6:21 AM
Unknown Object (File)
Feb 23 2025, 6:25 PM
Unknown Object (File)
Feb 6 2025, 4:28 PM
Subscribers

Details

Summary

kresolve_list() is doing 372 kldsym() calls in my tests for a simple netstat.
Calling it only for non-live image improves the running time and CPU usage when collecting stats for the running kernel.

Note: I tested it only on stable/11

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Not Applicable
Unit
Tests Not Applicable