#include <config.h>
#include "poll-loop.h"
-#include <assert.h>
#include <errno.h>
#include <inttypes.h>
#include <poll.h>
static void
log_wakeup(const char *where, const struct pollfd *pollfd, int timeout)
{
+ static struct vlog_rate_limit trace_rl = VLOG_RATE_LIMIT_INIT(1, 1);
static struct vlog_rate_limit rl = VLOG_RATE_LIMIT_INIT(10, 10);
enum vlog_level level;
int cpu_usage;
}
if (cpu_usage >= 0) {
ds_put_format(&s, " (%d%% CPU usage)", cpu_usage);
+
+ if (!vlog_should_drop(THIS_MODULE, level, &trace_rl)) {
+ ds_put_char(&s, '\n');
+ format_backtraces(&s, 2);
+ }
}
VLOG(level, "%s", ds_cstr(&s));
ds_destroy(&s);
new_waiter(int fd, short int events, const char *where)
{
struct poll_waiter *waiter = xzalloc(sizeof *waiter);
- assert(fd >= 0);
+ ovs_assert(fd >= 0);
waiter->fd = fd;
waiter->events = events;
waiter->where = where;