This is the mail archive of the systemtap@sourceware.org mailing list for the systemtap project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

warning/error message mixed with trace data


Hi,

Today I tried the latest CVS and found the error/warning messages logged by _stp_warn() and _stp_error() are now mixed with the normal trace data. But I expected those these error/warn message won't disturb the trace data, or else some post-processing tools, such as lket-b2a will not be able to recognize and process trace data.

Here is a patch, it will make _stp_warn()/_stp_error() to behave as before. please take a review:

Index: runtime/io.c
===================================================================
RCS file: /cvs/systemtap/src/runtime/io.c,v
retrieving revision 1.24
diff -u -r1.24 io.c
--- runtime/io.c        15 Jan 2006 17:26:19 -0000      1.24
+++ runtime/io.c        26 Sep 2006 08:55:49 -0000
@@ -59,8 +59,10 @@
 #ifdef STP_RELAYFS
                if (type != DBUG)
                        _stp_write(STP_OOB_DATA, buf, start + num + 1);
-               _stp_string_cat_cstr(_stp_stdout,buf);
-               _stp_print_flush();
+               else {
+                       _stp_string_cat_cstr(_stp_stdout,buf);
+                       _stp_print_flush();
+               }
 #else
                if (type != DBUG)
                        _stp_write(STP_OOB_DATA, buf, start + num + 1);
~

- Guanglei


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]