diff mbox series

[v2,9/9] kernel-shark: Hide all plugin internals

Message ID 20210428134730.187533-10-y.karadz@gmail.com (mailing list archive)
State Accepted
Commit 83491cc7d4604a960e75289e2c53a6419fcd1743
Headers show
Series (Not so) Minor fixes toward KS 2.0 | expand

Commit Message

Yordan Karadzhov April 28, 2021, 1:47 p.m. UTC
Nothing except the plugin's interface must be visible outside.

Signed-off-by: Yordan Karadzhov (VMware) <y.karadz@gmail.com>
---
 src/plugins/MissedEvents.cpp | 2 +-
 src/plugins/SchedEvents.cpp  | 5 +++--
 src/plugins/sched_events.c   | 4 ++--
 3 files changed, 6 insertions(+), 5 deletions(-)
diff mbox series

Patch

diff --git a/src/plugins/MissedEvents.cpp b/src/plugins/MissedEvents.cpp
index cf0ed34..fdd47c8 100644
--- a/src/plugins/MissedEvents.cpp
+++ b/src/plugins/MissedEvents.cpp
@@ -89,7 +89,7 @@  static PlotObject *makeShape(std::vector<const Graph *> graph,
  * @param val: Process or CPU Id value.
  * @param draw_action: Draw action identifier.
  */
-void draw_missed_events(kshark_cpp_argv *argv_c,
+__hidden void draw_missed_events(kshark_cpp_argv *argv_c,
 			int sd, int val, int draw_action)
 {
 	KsCppArgV *argvCpp = KS_ARGV_TO_CPP(argv_c);
diff --git a/src/plugins/SchedEvents.cpp b/src/plugins/SchedEvents.cpp
index a81182e..b73e45f 100644
--- a/src/plugins/SchedEvents.cpp
+++ b/src/plugins/SchedEvents.cpp
@@ -30,7 +30,7 @@  static KsMainWindow *ks_ptr;
  * @brief Provide the plugin with a pointer to the KsMainWindow object (the GUI
  * itself) such that the plugin can manipulate the GUI.
  */
-void *plugin_set_gui_ptr(void *gui_ptr)
+__hidden void *plugin_set_gui_ptr(void *gui_ptr)
 {
 	ks_ptr = static_cast<KsMainWindow *>(gui_ptr);
 	return nullptr;
@@ -152,7 +152,8 @@  static void secondPass(plugin_sched_context *plugin_ctx)
  * @param pid: Process Id.
  * @param draw_action: Draw action identifier.
  */
-void plugin_draw(kshark_cpp_argv *argv_c, int sd, int pid, int draw_action)
+__hidden void plugin_draw(kshark_cpp_argv *argv_c,
+			  int sd, int pid, int draw_action)
 {
 	plugin_sched_context *plugin_ctx;
 
diff --git a/src/plugins/sched_events.c b/src/plugins/sched_events.c
index 64dff8d..659ecc3 100644
--- a/src/plugins/sched_events.c
+++ b/src/plugins/sched_events.c
@@ -47,7 +47,7 @@  static void plugin_sched_set_pid(ks_num_field_t *field,
  *
  * @param field: Input location for the data field.
  */
-int plugin_sched_get_pid(ks_num_field_t field)
+__hidden int plugin_sched_get_pid(ks_num_field_t field)
 {
 	return field & PID_MASK;
 }
@@ -67,7 +67,7 @@  static void plugin_sched_set_prev_state(ks_num_field_t *field,
  *
  * @param field: Input location for the data field.
  */
-int plugin_sched_get_prev_state(ks_num_field_t field)
+__hidden int plugin_sched_get_prev_state(ks_num_field_t field)
 {
 	tep_num_field_t mask = PREV_STATE_MASK << PREV_STATE_SHIFT;
 	return (field & mask) >> PREV_STATE_SHIFT;