aboutsummaryrefslogtreecommitdiff
path: root/lib/poll-loop.c
diff options
context:
space:
mode:
authorBen Pfaff <blp@nicira.com>2010-11-01 14:14:27 -0700
committerBen Pfaff <blp@nicira.com>2010-11-30 10:30:30 -0800
commitd76f09ea77e03ee5a3a7bb67bcab1ac4bb54172b (patch)
tree51f5b6b4090380591410d830e6fa57d02185e629 /lib/poll-loop.c
parentf4e2e60be455af4d5bd294cfe19a7cb4ea13a9ff (diff)
coverage: Make the coverage counters catalog program-specific.
Until now, the collection of coverage counters supported by a given OVS program was not specific to that program. That means that, for example, even though ovs-dpctl does not have anything to do with mac_learning, it still has a coverage counter for it. This is confusing, at best. This commit fixes the problem on some systems, in particular on ones that use GCC and the GNU linker. It uses the feature of the GNU linker described in its manual as: If an orphaned section's name is representable as a C identifier then the linker will automatically see PROVIDE two symbols: __start_SECNAME and __end_SECNAME, where SECNAME is the name of the section. These indicate the start address and end address of the orphaned section respectively. Systems that don't support these features retain the earlier behavior. This commit also fixes the annoyance that files that include coverage counters must be listed on COVERAGE_FILES in lib/automake.mk. This commit also fixes the annoyance that modifying any source file that includes a coverage counter caused all programs that link against libopenvswitch.a to relink, even programs that the source file was not linked into. For example, modifying ofproto/ofproto.c (which includes coverage counters) caused tests/test-aes128 to relink, even though test-aes128 does not link again ofproto.o.
Diffstat (limited to 'lib/poll-loop.c')
-rw-r--r--lib/poll-loop.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/poll-loop.c b/lib/poll-loop.c
index 653fdd92..e47cccc3 100644
--- a/lib/poll-loop.c
+++ b/lib/poll-loop.c
@@ -32,6 +32,9 @@
VLOG_DEFINE_THIS_MODULE(poll_loop);
+COVERAGE_DEFINE(poll_fd_wait);
+COVERAGE_DEFINE(poll_zero_timeout);
+
/* An event that will wake the following call to poll_block(). */
struct poll_waiter {
/* Set when the waiter is created. */