mirror of
https://github.com/samba-team/samba.git
synced 2025-01-26 10:04:02 +03:00
improve time jump logging
add the __location__ macro to the logs to get a better idea in which loop the problem occured Signed-off-by: Christian Ambach <christian.ambach@de.ibm.com> (This used to be ctdb commit dccb549fd6a6e338063699544e52f2a1a6a966b5)
This commit is contained in:
parent
839670253a
commit
4269d37ce8
@ -472,11 +472,11 @@ static int epoll_event_loop_wait(struct event_context *ev)
|
||||
new_t=time(NULL);
|
||||
if (t != 0) {
|
||||
if (t > new_t) {
|
||||
DEBUG(0,("ERROR Time skipped backward by %d seconds\n", (int)(t-new_t)));
|
||||
DEBUG(0,(__location__ " ERROR Time skipped backward by %d seconds\n", (int)(t-new_t)));
|
||||
}
|
||||
/* We assume here that we get at least one event every 5 seconds */
|
||||
if (new_t > (t+5)) {
|
||||
DEBUG(0,("ERROR Time jumped forward by %d seconds\n", (int)(new_t-t)));
|
||||
DEBUG(0,(__location__ " ERROR Time jumped forward by %d seconds\n", (int)(new_t-t)));
|
||||
}
|
||||
}
|
||||
t=new_t;
|
||||
|
@ -287,11 +287,11 @@ static int select_event_loop_wait(struct event_context *ev)
|
||||
new_t=time(NULL);
|
||||
if (t != 0) {
|
||||
if (t > new_t) {
|
||||
DEBUG(0,("ERROR Time skipped backward by %d seconds\n", (int)(t-new_t)));
|
||||
DEBUG(0,(__location__ " ERROR Time skipped backward by %d seconds\n", (int)(t-new_t)));
|
||||
}
|
||||
/* We assume here that we get at least one event every 5 seconds */
|
||||
if (new_t > (t+5)) {
|
||||
DEBUG(0,("ERROR Time jumped forward by %d seconds\n", (int)(new_t-t)));
|
||||
DEBUG(0,(__location__ " ERROR Time jumped forward by %d seconds\n", (int)(new_t-t)));
|
||||
}
|
||||
}
|
||||
t=new_t;
|
||||
|
@ -588,11 +588,11 @@ static int std_event_loop_wait(struct event_context *ev)
|
||||
new_t=time(NULL);
|
||||
if (t != 0) {
|
||||
if (t > new_t) {
|
||||
DEBUG(0,("ERROR Time skipped backward by %d seconds\n", (int)(t-new_t)));
|
||||
DEBUG(0,(__location__ " ERROR Time skipped backward by %d seconds\n", (int)(t-new_t)));
|
||||
}
|
||||
/* We assume here that we get at least one event every 5 seconds */
|
||||
if (new_t > (t+5)) {
|
||||
DEBUG(0,("ERROR Time jumped forward by %d seconds\n", (int)(new_t-t)));
|
||||
DEBUG(0,(__location__ " ERROR Time jumped forward by %d seconds\n", (int)(new_t-t)));
|
||||
}
|
||||
}
|
||||
t=new_t;
|
||||
|
Loading…
x
Reference in New Issue
Block a user