Red Hat Bugzilla – Bug 57342
Network timing statis now configurable
Last modified: 2007-04-18 12:38:39 EDT
Description of Patch:
At the moment the network timing statistics are not configurable. For some
calls the represent quite an overhead. This patch makes the collection of
the statistics and the functions used to print them out configurable at
compile time. By default they are not compiled. The patch also ammends the
tests so they link with our without the statistical information function
being present. It also makes the tests linkable when the SNMP library is
present which has its own implementation of gettimeofday!
Version-Release number of selected component (if applicable):1.5.2
Created attachment 40290 [details]
Here is the patch
I've applied the patch, thanks! The ChangeLog had a few missing bits, which I've
added. FYI here's the new entry. As I've written here, who supplies
gettimeofday() should be resolved "properly" really, but this will do for now.
Thanks again for the contrib.
2001-12-10 Andrew Lunn <email@example.com>
* cdl/net.cdl: Add configury to eliminate network timing stats.
* src/include/machine/param.h: Timing statistics for things like
memcpy, mbuf_alloc etc now use configury to determine if the
statistics code should be compiled.
* src/ecos/support.c: Ditto.
* tests/nc_test_slave.c: Only print timing stats when they
* tests/tcp_echo.c: Ditto.
* tests/nc_test_master.c: Allow building with SNMP lib which has
its own gettimeofday(). This should be fixed better a different
way but will do for now.
One more thing: I removed the CYGPKG_NET_TIMING component. It didn't appear to
serve any purpose as a distinct option. We can always add it later if we add
more timing related options.
OK. I just cut&paste the CYGPKG_NET_DEBUG from above to make the new entry.
Maybe you should also take that out :-)
Ah, no in that case CYGPKG_NET_DEBUG _*is* used (in src/ecos/support.c)
separately from CYGDBG_NET_DHCP_CHATTER. Sorry :-).