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
F98620252: D12151.diff
Fri, Oct 4, 2:25 AM
F98582798: D12151.diff
Thu, Oct 3, 10:46 PM
Unknown Object (File)
Thu, Oct 3, 12:00 AM
Unknown Object (File)
Wed, Oct 2, 6:29 PM
Unknown Object (File)
Tue, Oct 1, 4:31 AM
Unknown Object (File)
Sat, Sep 28, 10:50 PM
Unknown Object (File)
Sat, Sep 28, 1:29 AM
Unknown Object (File)
Thu, Sep 26, 1:56 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 Skipped
Unit
Tests Skipped