X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=lib%2Ftimeval.c;h=3cca338fbac72d813a85dc83fe0ac705bd05fb75;hb=c0e5f6cabeeb8153144fead66c1f37a5014d9060;hp=61f2227f093b7230d111b1a9ba21368a6b4d00bd;hpb=34e63086edddcae06d7c1a4fa84fec0861e50758;p=openvswitch diff --git a/lib/timeval.c b/lib/timeval.c index 61f2227f..3cca338f 100644 --- a/lib/timeval.c +++ b/lib/timeval.c @@ -63,6 +63,8 @@ time_init(void) return; } + coverage_init(); + inited = true; gettimeofday(&now, NULL); tick = false; @@ -292,7 +294,12 @@ log_poll_interval(long long int last_wakeup, const struct rusage *last_rusage) rusage.ru_nvcsw - last_rusage->ru_nvcsw, rusage.ru_nivcsw - last_rusage->ru_nivcsw); } - coverage_log(VLL_WARN); + + /* Care should be taken in the value chosen for logging. Depending + * on the configuration, syslog can write changes synchronously, + * which can cause the coverage messages to take longer to log + * than the processing delay that triggered it. */ + coverage_log(VLL_INFO, true); } /* Update exponentially weighted moving average. With these parameters, a