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)
Sat, Sep 7, 2:07 AM
Unknown Object (File)
Thu, Sep 5, 6:10 AM
Unknown Object (File)
Sun, Sep 1, 2:42 AM
Unknown Object (File)
Sun, Sep 1, 2:42 AM
Unknown Object (File)
Sun, Sep 1, 2:37 AM
Unknown Object (File)
Mon, Aug 19, 3:16 PM
Unknown Object (File)
Mon, Aug 19, 1:56 PM
Unknown Object (File)
Thu, Aug 15, 6:07 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