]> git.ipfire.org Git - thirdparty/valgrind.git/commitdiff
Add time stamps to XML START/FINISH indications.
authorJulian Seward <jseward@acm.org>
Tue, 19 Jul 2005 12:17:51 +0000 (12:17 +0000)
committerJulian Seward <jseward@acm.org>
Tue, 19 Jul 2005 12:17:51 +0000 (12:17 +0000)
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4182

README_XML_OUTPUT.txt
coregrind/m_main.c

index 3ad26967ca3de46f453c71637f1fe1b68a014a68..b6852c855f4df04b6fcb3be441648931d3e82259 100644 (file)
@@ -151,14 +151,18 @@ following in sequence:
 
 * The following, indicating that the program has now started:
 
-     <status>RUNNING</status>
+     <status> <what>RUNNING</what> 
+              <when>human-readable-time-string</when> 
+     </status>
 
 * Zero or more of (either ERROR or ERRORCOUNTS).
 
 * The following, indicating that the program has now finished, and
   that the wrapup (leak checking) is happening.
 
-     <status>FINISHED</status>
+     <status> <what>FINISHED</what> 
+              <when>human-readable-time-string</when> 
+     </status>
 
 * SUPPCOUNTS, indicating how many times each suppression was used.
 
index da97ed5501db60e687720b28e06e91fc2ed304f0..99e12370ca063b88512f74686d1d4de0e35b638d 100644 (file)
@@ -2785,7 +2785,10 @@ int main(int argc, char **argv, char **envp)
    VGP_POPCC(VgpStartup);
 
    if (VG_(clo_xml)) {
-      VG_(message)(Vg_UserMsg, "<status>RUNNING</status>");
+      HChar buf[50];
+      VG_(ctime)(buf);
+      VG_(message)(Vg_UserMsg, "<status> <what>RUNNING</what> "
+                               "<when>%s</when> </status>", buf);
       VG_(message)(Vg_UserMsg, "");
    }
 
@@ -2880,11 +2883,14 @@ void VG_(shutdown_actions_NORETURN) ( ThreadId tid,
       VG_(message)(Vg_UserMsg, "");
 
    if (VG_(clo_xml)) {
+      HChar buf[50];
       if (VG_(needs).core_errors || VG_(needs).tool_errors) {
          VG_(show_error_counts_as_XML)();
          VG_(message)(Vg_UserMsg, "");
       }
-      VG_(message)(Vg_UserMsg, "<status>FINISHED</status>");
+      VG_(ctime)(buf);
+      VG_(message)(Vg_UserMsg, "<status> <what>FINISHED</what> "
+                               "<when>%s</when> </status>", buf);
       VG_(message)(Vg_UserMsg, "");
    }