Skip to contentSkip to conversation

kernelshark: Rename tracefs_get_tracing_dir() to the new tracefs_tracing_dir()

PATCH In review Steven Rostedt 2 participants 2 messages Dec 21, 2020 – Jan 4, 2021

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 kernelshark: Rename tracefs_get_tracing_dir() to the new tracefs_tracing_dir()

From: "Steven Rostedt (VMware)" <[email protected]>

libtracefs is renaming tracefs_get_tracing_dir() to tracefs_tracing_dir() as there is no "tracefs_put_tracing_dir()" for this function. Since libtracefs has not been officially released, it is fine to break API, as it is with kernelshark v2.0 has not yet been official released that uses the old API.

---
 src/KsCaptureDialog.cpp | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
src/KsCaptureDialog.cpp +2 -2
index 63fd5d6..7253ab6 100644
@@ -26,7 +26,7 @@ extern "C" {
 
 static inline tep_handle *local_events()
 {
-	return tracefs_local_events(tracefs_get_tracing_dir());
+	return tracefs_local_events(tracefs_tracing_dir());
 }
 
 /**
@@ -204,7 +204,7 @@ QStringList KsCaptureControl::_getPlugins()
 	QStringList pluginList;
 	char **all_plugins;
 
-	all_plugins = tracefs_tracers(tracefs_get_tracing_dir());
+	all_plugins = tracefs_tracers(tracefs_tracing_dir());
 
 	if (!all_plugins)
 		return pluginList;
Signature · 1 line
2.25.4
Reviewed-by on v1 1/1
#1 lore raw
Quoted 27 lines · Steven Rostedt

From: "Steven Rostedt (VMware)" <[email protected]>

libtracefs is renaming tracefs_get_tracing_dir() to tracefs_tracing_dir() as there is no "tracefs_put_tracing_dir()" for this function. Since libtracefs has not been officially released, it is fine to break API, as it is with kernelshark v2.0 has not yet been official released that uses the old API.

---
  src/KsCaptureDialog.cpp | 4 ++--
  1 file changed, 2 insertions(+), 2 deletions(-)
src/KsCaptureDialog.cpp +1 -1
index 63fd5d6..7253ab6 100644
@@ -26,7 +26,7 @@ extern "C" {
 
  static inline tep_handle *local_events()
  {
-	return tracefs_local_events(tracefs_get_tracing_dir());
+	return tracefs_local_events(tracefs_tracing_dir());
  }
 
  /**

src/KsCaptureDialog.cpp QStringList KsCaptureControl::_getPlugins() · line 210

Quoted 8 lines
src/KsCaptureDialog.cpp +1 -1
@@ -204,7 +204,7 @@ QStringList KsCaptureControl::_getPlugins()
  	QStringList pluginList;
  	char **all_plugins;
 
-	all_plugins = tracefs_tracers(tracefs_get_tracing_dir());
+	all_plugins = tracefs_tracers(tracefs_tracing_dir());
 
  	if (!all_plugins)
  		return pluginList;

Thanks Steven!
I applied this one on my side before all KS 2.0 patches.