Add support for coverage counters.
authorBen Pfaff <blp@nicira.com>
Tue, 5 May 2009 17:23:02 +0000 (10:23 -0700)
committerBen Pfaff <blp@nicira.com>
Tue, 5 May 2009 17:23:02 +0000 (10:23 -0700)
commit26066d656b15d2713172c810be6ff2aeb7a08034
tree42ade30c760e2906ae260415a6f92879b0df745b
parentbf2ebb02b79918d1fc15bdcbfa81b13e8077c7cd
Add support for coverage counters.

This commit implements a simple form of coverage instrumentation.  Points
in source code that are of interest must be explicitly annotated with
COVERAGE_INC.  The coverage counters may be logged at any time with
coverage_log().

This form of coverage instrumentation is intended to be so lightweight that
it can be enabled in production builds.  It is obviously not a substitute
for traditional coverage instrumentation with e.g. "gcov", but it is still
a useful debugging tool.
25 files changed:
lib/.gitignore
lib/automake.mk
lib/coverage-counters.h [new file with mode: 0644]
lib/coverage-scan.pl [new file with mode: 0755]
lib/coverage.c [new file with mode: 0644]
lib/coverage.h [new file with mode: 0644]
lib/dpif.c
lib/flow.c
lib/hmap.c
lib/mac-learning.c
lib/netdev.c
lib/netlink.c
lib/odp-util.c
lib/poll-loop.c
lib/process.c
lib/rconn.c
lib/timeval.c
lib/unixctl.c
lib/util.c
lib/vconn.c
lib/vlog-modules.def
secchan/ofproto.c
secchan/pktbuf.c
vswitchd/bridge.c
vswitchd/mgmt.c