Re: [PATCH 7/7] kernel-shark-qt: Add a plugin for sched events.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 





On 30.08.2018 05:43, Steven Rostedt wrote:
  set(PLUGIN_LIST "")
+ADD_PLUGIN(NAME sched_events
+           SOURCE sched_events.c SchedEvents.cpp)
Do all plugins need to be added like this? Is there a way to make a
default rule for a "plugin" directory, that we add source files of this
type and have them created automatically just by adding in the source
files?

+
+# list(APPEND PLUGIN_LIST "sched_events default") # This plugin will be loaded by default
+list(APPEND PLUGIN_LIST "sched_events") # This plugin isn't loaded by default
+

Yes, in order to add a plugin you have to do two things. First you have call the ADD_PLUGIN function. Second, you have to add the plugin to the list of plugin names, specifying if the plugin will be loaded by default.

It is possible to make it working just by adding the source files but I am not a big fan of this approach. If we go this way we have to enforce very strict rules for naming the files. Note that this plugin is build form one .c file and one .cpp file, however the plugin for renamed threads will have only one .c file. And in the future we may have plugins having .py files.

Thanks!
Yordan


+install(TARGETS sched_events
+        LIBRARY DESTINATION/usr/local/lib/kshark/)
+




[Index of Archives]     [Linux USB Development]     [Linux USB Development]     [Linux Audio Users]     [Yosemite Hiking]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux