trace-cmd: Load libtraceevent plugins from build folder, if exists.
When a development version of trace-cmd is built and run on the machine,
by default it loads only installed plugins, from system directories.
Thus, the development plugins will not be loaded. To simplify the development
process, a new logic is added:
At plugins load time, check the location of trace-cmd application and look
for "plugins" directory around it. If found, load plugins from it. Those
plugins will be loaded last, so in case of duplication the "development"
plugins win.
A two new APIs are introduced to libtraceevent, in order to accomplish this
logic:
tep_load_plugins_dir() - loads tep plugins from a specific directory.
tep_plugins_append() - Append two plugin lists.
Link: http://lore.kernel.org/linux-trace-devel/20191007114947.17104-3-tz.stoyanov@gmail.com
Signed-off-by: Tzvetomir Stoyanov (VMware) <tz.stoyanov@gmail.com>
Signed-off-by: Steven Rostedt (VMware) <rostedt@goodmis.org>
5 files changed