Bug 57342

Summary: Network timing statis now configurable
Product: [Retired] eCos Reporter: Andrew Lunn <andrew.lunn>
Component: Patches and contributionsAssignee: ecc-bugs-int
Status: CLOSED CURRENTRELEASE QA Contact: ecc-bugs-int
Severity: medium Docs Contact:
Priority: medium    
Version: 1.5.2CC: jlarmour
Target Milestone: ---   
Target Release: ---   
Hardware: i386   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2001-12-10 17:27:10 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
Here is the patch none

Description Andrew Lunn 2001-12-10 17:26:25 UTC
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

Comment 1 Andrew Lunn 2001-12-10 17:27:02 UTC
Created attachment 40290 [details]
Here is the patch

Comment 2 Jonathan Larmour 2001-12-12 01:09:55 UTC
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 <andrew.lunn>

	* 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
	are enabled. 
	* 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.
	


Comment 3 Jonathan Larmour 2001-12-12 01:12:25 UTC
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.


Comment 4 Andrew Lunn 2001-12-12 08:26:59 UTC
OK. I just cut&paste the CYGPKG_NET_DEBUG from above to make the new entry.
Maybe you should also take that out :-)

Comment 5 Jonathan Larmour 2001-12-12 16:42:20 UTC
Ah, no in that case CYGPKG_NET_DEBUG _*is* used (in src/ecos/support.c)
separately from CYGDBG_NET_DHCP_CHATTER. Sorry :-).