[2/2] KernelShark2.0: Use libtracefs APIs to access tracefs
diff mbox series

Message ID 20200306092902.48786-3-tz.stoyanov@gmail.com
State New
Headers show
Series
  • KernelShark2.0: Use libtracefs APIs to access tracefs
Related show

Commit Message

Tzvetomir Stoyanov (VMware) March 6, 2020, 9:29 a.m. UTC
From: Tzvetomir (VMware)  Stoyanov <tz.stoyanov@gmail.com>

KernelShark uses trace-cmd APIs to access tracefs. Now those
APIs are moved to libtracefs:
 tracecmd_get_tracing_dir() -> tracefs_get_tracing_dir()
 tracecmd_local_events() -> tracefs_local_events()
 tracecmd_local_plugins() -> tracefs_tracers()

Signed-off-by: Tzvetomir (VMware)  Stoyanov <tz.stoyanov@gmail.com>
---
 src/libkshark-tepdata.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

Patch
diff mbox series

diff --git a/src/libkshark-tepdata.c b/src/libkshark-tepdata.c
index ed61f76..8678e12 100644
--- a/src/libkshark-tepdata.c
+++ b/src/libkshark-tepdata.c
@@ -19,6 +19,7 @@ 
 
 // trace-cmd
 #include "trace-cmd/trace-cmd.h"
+#include "tracefs/tracefs.h"
 
 // KernelShark
 #include "libkshark-plugin.h"
@@ -1066,7 +1067,7 @@  int kshark_tep_init_local(struct kshark_data_stream *stream)
 	if (!tep_handle)
 		return -EFAULT;
 
-	tep_handle->tep = tracecmd_local_events(tracecmd_get_tracing_dir());
+	tep_handle->tep = tracefs_local_events(tracefs_get_tracing_dir());
 	if (!tep_handle->tep)
 		goto fail;
 
@@ -1233,5 +1234,5 @@  int kshark_tep_get_event_fields(struct kshark_data_stream *stream,
 /** Get an array of available tracer plugins. */
 char **kshark_tracecmd_local_plugins()
 {
-	return tracecmd_local_plugins(tracecmd_get_tracing_dir());
+	return tracefs_tracers(tracefs_get_tracing_dir());
 }