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.

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
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.