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)
Mon, Jun 16, 12:38 PM
Unknown Object (File)
Sat, Jun 14, 4:07 PM
Unknown Object (File)
Fri, Jun 13, 8:01 PM
Unknown Object (File)
Thu, Jun 12, 2:51 PM
Unknown Object (File)
Mon, Jun 2, 7:36 PM
Unknown Object (File)
Tue, May 20, 10:14 PM
Unknown Object (File)
Apr 28 2025, 10:22 PM
Unknown Object (File)
Apr 28 2025, 10:22 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