aboutsummaryrefslogtreecommitdiff
path: root/lib/coverage.h
AgeCommit message (Collapse)Author
2013-10-01coverage: Reimplement the "ovs-appctl coverage/show" command.Alex Wang
This commit changes the "ovs-appctl coverage/show" command to show the the averaged per-second rates for the last few seconds, the last minute and the last hour, and the total counts of all of the coverage counters. Signed-off-by: Alex Wang <alexw@nicira.com> Signed-off-by: Ethan Jackson <ethan@nicira.com> Acked-by: Ethan Jackson <ethan@nicira.com>
2013-08-20coverage: Make thread-safe.Ben Pfaff
This makes each of the coverage counters per-thread. It abandons the idea of trying to keep track of the number of hits in the "current" poll loop, since there are many poll loops running, each in its own thread, as well as the idea of numbering epochs for the same reason. Instead, we just keep track of overall totals for the process for each coverage counter, accumulating per-thread counts into the global total each time a thread's main loop passes through poll_block(). Signed-off-by: Ben Pfaff <blp@nicira.com>
2012-05-02Global replace of Nicira Networks.Raju Subramanian
Replaced all instances of Nicira Networks(, Inc) to Nicira, Inc. Feature #10593 Signed-off-by: Raju Subramanian <rsubramanian@nicira.com> Signed-off-by: Ben Pfaff <blp@nicira.com>
2012-04-26coverage: Make ovs-appctl command more useful and less alarming.Ben Pfaff
I've had a few complaints that ovs-vswitchd logs its coverage counters at WARN level, but this is mainly wrong: ovs-vswitchd only logs coverage counters at WARN level when the "coverage/log" command is used through ovs-appctl. This was even documented. The reason to log at such a high level was to make it fairly certain that these messages specifically requested by the admin would not be filtered out before making it to the log. But it's even better if the admin just gets the coverage counters as a reply to the ovs-appctl command. So that is what this commit does. This commit also improves the documentation of the ovs-appctl command. Signed-off-by: Ben Pfaff <blp@nicira.com>
2011-05-16Suppress sparse warnings for global variables initialized in headers.Ben Pfaff
sparse warns if a non-static variable with external linkage has an initializer at first declaration, because it suspects that it should be static instead. Generally it's correct, but not in these cases, so add a redundant declaration to suppress the warning. The suppress warnings look like: ../ofproto/connmgr.c:40:1: warning: symbol 'VLM_connmgr' was not declared. Should it be static? ../ofproto/collectors.c:31:1: warning: symbol 'vlog_module_ptr_collectors' was not declared. Should it be static? ../ofproto/connmgr.c:43:1: warning: symbol 'counter_ofconn_stuck' was not declared. Should it be static?
2010-11-30coverage: Make the coverage counters catalog program-specific.Ben Pfaff
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.
2009-07-10Provide ability to retrieve coverage informationJustin Pettit
Previously, there was no way to induce coverage information to be displayed; it would only print when the system noticed unusual delays between polling intervals. Now, production of coverage logs can be forced with "coverage/log" command in ovs-appctl. Coverage counters may be reset with "coverage/clear".
2009-06-15Update primary code license to Apache 2.0.Ben Pfaff
2009-07-08Import from old repository commit 61ef2b42a9c4ba8e1600f15bb0236765edc2ad45.v0.90.0Ben Pfaff