[libvirt] [PATCH 07/13] src/libvirt.c: Init ftrace backend in libvirt library so that programs containing it can use ftrace

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/libvirt.c | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/src/libvirt.c b/src/libvirt.c
index a385935..5d519d4 100644
--- a/src/libvirt.c
+++ b/src/libvirt.c
@@ -69,6 +69,10 @@
 #include "virutil.h"
 #include "virtypedparam.h"
 
+#if defined(WITH_TRACE_PROBES) && defined(WITH_FTRACE_PROBES)
+# include "ftrace.h"
+#endif
+
 #ifdef WITH_TEST
 # include "test/test_driver.h"
 #endif
@@ -376,6 +380,11 @@ virGlobalInit(void)
     }
 #endif
 
+#if defined(WITH_TRACE_PROBES) && defined(WITH_FTRACE_PROBES)
+    if(!trace_backend_init())
+        goto error;
+#endif
+
 #ifdef WITH_GNUTLS_GCRYPT
     /*
      * This sequence of API calls it copied exactly from
-- 
1.8.3.1




More information about the libvir-list mailing list