Skip to contentSkip to conversation

tools/xcutils: Free xlt loggers after use

PATCH In review Andrew Cooper 3 participants 6 messages Mar 10, 2014 – Mar 11, 2014

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 tools/xcutils: Free xlt loggers after use

While not much of a functional change, this prevents irritating warnings from valgrind when trying to analyse xc_domain_{save,restore}() themselves.

CC Ian Campbell <[email protected]>
CC Ian Jackson <[email protected]>
---
 tools/xcutils/xc_restore.c |    1 +
 tools/xcutils/xc_save.c    |    1 +
 2 files changed, 2 insertions(+)
tools/xcutils/xc_restore.c +1 -0
index 4ea261b..616bd42 100644
@@ -67,6 +67,7 @@ main(int argc, char **argv)
     }
 
     xc_interface_close(xch);
+    xtl_logger_destroy(l);
 
     return ret;
 }
tools/xcutils/xc_save.c +1 -0
index e34bd2c..45ad0ce 100644
@@ -222,6 +222,7 @@ main(int argc, char **argv)
         xc_evtchn_close(si.xce);
 
     xc_interface_close(si.xch);
+    xtl_logger_destroy(l);
 
     return ret;
 }
Signature · 1 line
1.7.10.4
Acked-by on v1 1/1
#1 lore raw

Andrew Cooper writes ("[PATCH] tools/xcutils: Free xlt loggers after use"):

Quoted 5 lines

While not much of a functional change, this prevents irritating warnings from valgrind when trying to analyse xc_domain_{save,restore}() themselves.

(and fixed the subject line typo in the actual commit)

Ian.

#2 lore raw
Quoted 4 lines · Ian Jackson

Andrew Cooper writes ("[PATCH] tools/xcutils: Free xlt loggers after use"):

Quoted 3 lines

While not much of a functional change, this prevents irritating warnings from valgrind when trying to analyse xc_domain_{save,restore}() themselves.

Quoted 8 lines
Quoted 2 lines

(and fixed the subject line typo in the actual commit)

Ian.

Ah thanks - I hadn't noticed the typo.

That must be record timing from writing the patch to getting committed - about 15 mins :)

~Andrew

#3 lore raw
In reply to Andrew Cooper
Quoted 2 lines · Andrew Cooper

While not much of a functional change, this prevents irritating warnings from valgrind when trying to analyse xc_domain_{save,restore}() themselves.

Are you trying to valgrind xend or something? (I thought these were exclusively used by xend).

Quoted 3 lines
 tools/xcutils/xc_restore.c |    1 +
 tools/xcutils/xc_save.c    |    1 +
 2 files changed, 2 insertions(+)

Ian.

#4 lore raw
Quoted 11 lines · Ian Campbell
Quoted 2 lines · Andrew Cooper

While not much of a functional change, this prevents irritating warnings from valgrind when trying to analyse xc_domain_{save,restore}() themselves.

Are you trying to valgrind xend or something? (I thought these were exclusively used by xend).

Quoted 3 lines
 tools/xcutils/xc_restore.c |    1 +
 tools/xcutils/xc_save.c    |    1 +
 2 files changed, 2 insertions(+)

Ian.

I am developing the migration stream v2, and using xc_save/restore as thin wrappers around xc_domain_save/restore(), where I can dump the intermediate stream to a file and verify it for correctness.

~Andrew

#5 lore raw
Quoted 9 lines · Andrew Cooper
Quoted 8 lines · Ian Campbell
Quoted 2 lines · Andrew Cooper

While not much of a functional change, this prevents irritating warnings from valgrind when trying to analyse xc_domain_{save,restore}() themselves.

Are you trying to valgrind xend or something? (I thought these were exclusively used by xend).

Quoted 3 lines
 tools/xcutils/xc_restore.c |    1 +
 tools/xcutils/xc_save.c    |    1 +
 2 files changed, 2 insertions(+)
Quoted 7 lines
Quoted 3 lines

Ian.

I am developing the migration stream v2, and using xc_save/restore as thin wrappers around xc_domain_save/restore(), where I can dump the intermediate stream to a file and verify it for correctness.

Ah, useful!

I suspect you could also achieve this by providing xl migrate with a custom -s command which involved a tee as well as a ssh, but you may as well stick with what you've got.

Ian.