reduce default verbosity
authorPierre-Marc Fournier <pierre-marc.fournier@polymtl.ca>
Tue, 16 Jun 2009 21:02:35 +0000 (17:02 -0400)
committerPierre-Marc Fournier <pierre-marc.fournier@polymtl.ca>
Tue, 16 Jun 2009 21:02:35 +0000 (17:02 -0400)
libust/serialize.c
share/usterr.h
ustd/localerr.h

index b8df1b3cd3538af4a75cd1bcd6aa955c5c7892f8..c7ba8480e71de59e592bd8eaadb8b38bab62ed4a 100644 (file)
@@ -677,7 +677,7 @@ notrace void ltt_vtrace(const struct marker *mdata, void *probe_data,
                /* Out-of-order commit */
                ltt_commit_slot(channel, &transport_data, buf_offset,
                                data_size, slot_size);
-               printf("just commited event at offset %ld and size %zd\n", buf_offset, slot_size);
+               DBG("just commited event at offset %ld and size %zd\n", buf_offset, slot_size);
        }
 //ust//        __get_cpu_var(ltt_nesting)--;
        ltt_nesting--;
index a2d0431325707ba70426af8a4ab601f64c2333ba..9c4be7ee7aefff3fb58abb851c4f7e07401845b8 100644 (file)
@@ -1,11 +1,16 @@
 #ifndef USTERR_H
 #define USTERR_H
 
-#define DBG(fmt, args...) fprintf(stderr, fmt "\n", ## args); fflush(stderr)
-#define WARN(fmt, args...) fprintf(stderr, "usertrace: WARNING: " fmt "\n", ## args); fflush(stderr)
-#define ERR(fmt, args...) fprintf(stderr, "usertrace: ERROR: " fmt "\n", ## args); fflush(stderr)
-#define BUG(fmt, args...) fprintf(stderr, "usertrace: BUG: " fmt "\n", ## args); fflush(stderr)
-#define PERROR(call) perror("usertrace: ERROR: " call)
+//#define DEBUG
+#ifdef DEBUG
+# define DBG(fmt, args...) do { fprintf(stderr, fmt "\n", ## args); fflush(stderr); } while(0)
+#else
+# define DBG(fmt, args...) do {} while(0)
+#endif
+#define WARN(fmt, args...) fprintf(stderr, "libust: WARNING: " fmt "\n", ## args); fflush(stderr)
+#define ERR(fmt, args...) fprintf(stderr, "libust: ERROR: " fmt "\n", ## args); fflush(stderr)
+#define BUG(fmt, args...) fprintf(stderr, "libust: BUG: " fmt "\n", ## args); fflush(stderr)
+#define PERROR(call) perror("ust: ERROR: " call)
 
 #define BUG_ON(condition) do { if (unlikely(condition)) ERR("condition not respected (BUG)"); } while(0)
 #define WARN_ON(condition) do { if (unlikely(condition)) WARN("condition not respected on line %s:%d", __FILE__, __LINE__); } while(0)
index 803d8c6fe8873a70e55d0d8de3a9856fd903e4f4..d4276eb5aaf7f6f9734052616ad970d8419fe2d7 100644 (file)
@@ -1,6 +1,12 @@
 #include <stdio.h>
 
-#define DBG(fmt, args...) fprintf(stderr, "ustd: " fmt "\n", ## args); fflush(stderr)
+//#define DEBUG
+#ifdef DEBUG
+# define DBG(fmt, args...) fprintf(stderr, "ustd: " fmt "\n", ## args); fflush(stderr)
+#else
+# define DBG(fmt, args...) do {} while(0)
+#endif
+
 #define WARN(fmt, args...) fprintf(stderr, "ustd: WARNING: " fmt "\n", ## args); fflush(stderr)
 #define ERR(fmt, args...) fprintf(stderr, "ustd: ERROR: " fmt "\n", ## args); fflush(stderr)
 #define PERROR(a) perror(a)
This page took 0.025439 seconds and 4 git commands to generate.