[libvirt] [PATCH 11/13] src/storage/parthelper.c: Init ftrace backend in program 'libvirt_parthelper'

yangzy.fnst at cn.fujitsu.com yangzy.fnst at cn.fujitsu.com
Mon Mar 10 08:17:22 UTC 2014


From: Xinghai Yu <yuxinghai at cn.fujitsu.com>

Signed-off-by: Xinghai Yu <yuxinghai at cn.fujitsu.com>
---
 src/storage/parthelper.c | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/src/storage/parthelper.c b/src/storage/parthelper.c
index c04f1bd..e9b56fe 100644
--- a/src/storage/parthelper.c
+++ b/src/storage/parthelper.c
@@ -47,6 +47,10 @@
 #include "configmake.h"
 #include "virstring.h"
 
+#ifdef WITH_FTRACE_PROBES
+# include "ftrace.h"
+#endif
+
 /* we don't need to include the full internal.h just for this */
 #define STREQ(a,b) (strcmp(a,b) == 0)
 
@@ -85,6 +89,11 @@ int main(int argc, char **argv)
         return 1;
     }
 
+#ifdef WITH_FTRACE_PROBES
+    if(!trace_backend_init())
+        exit(EXIT_FAILURE);
+#endif
+
     path = argv[1];
     if (virIsDevMapperDevice(path)) {
         partsep = "p";
-- 
1.8.3.1




More information about the libvir-list mailing list