improve time jump logging
authorChristian Ambach <christian.ambach@de.ibm.com>
Tue, 8 Dec 2009 18:08:37 +0000 (19:08 +0100)
committerRonnie Sahlberg <ronniesahlberg@gmail.com>
Wed, 9 Dec 2009 20:31:04 +0000 (07:31 +1100)
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>
lib/events/events_epoll.c
lib/events/events_select.c
lib/events/events_standard.c

index 0dfdb79517a6955dbd7d79710aa59239f1664ff2..99fa36c96e9431500d3aa0af1c436a15744bc667 100644 (file)
@@ -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;
index 404cd8c370adb6903789d60ddc4c94645f6fa219..faccc6d21a0944bf49a4574085b258955e82c27f 100644 (file)
@@ -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;
index 9ee2328225d2d4aea7e7e5005cb8857c119aa572..fe128cac2a93ab667dc3ed1339d785b0925d0e67 100644 (file)
@@ -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;