]> git.ipfire.org Git - thirdparty/tvheadend.git/commitdiff
gtimer check: little cleanup (show the previous caller id)
authorJaroslav Kysela <perex@perex.cz>
Fri, 24 Apr 2015 15:12:16 +0000 (17:12 +0200)
committerJaroslav Kysela <perex@perex.cz>
Fri, 24 Apr 2015 15:12:16 +0000 (17:12 +0200)
src/main.c

index 2cdfecc06ffdc0d39217f7b790d24f4f40dd4a9f..b7135fe8fea77170226770bf14ee187de694d398 100644 (file)
@@ -488,6 +488,8 @@ mainloop(void)
   struct timespec ts;
 #if ENABLE_GTIMER_CHECK
   int64_t mtm;
+  const char *id;
+  const char *fcn;
 #endif
 
   while(tvheadend_running) {
@@ -524,6 +526,8 @@ mainloop(void)
 
 #if ENABLE_GTIMER_CHECK
       mtm = getmonoclock();
+      id = gti->gti_id;
+      fcn = gti->gti_fcn;
 #endif
       cb = gti->gti_callback;
 
@@ -533,7 +537,7 @@ mainloop(void)
       cb(gti->gti_opaque);
 
 #if ENABLE_GTIMER_CHECK
-      tvhtrace("gtimer", "%s:%s duration %"PRId64"ns", gti->gti_id, gti->gti_fcn, getmonoclock() - mtm);
+      tvhtrace("gtimer", "%s:%s duration %"PRId64"ns", id, fcn, getmonoclock() - mtm);
 #endif
     }