4 * Babeltrace Trace Converter
6 * Copyright 2010-2011 EfficiOS Inc. and Linux Foundation
8 * Author: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
10 * Permission is hereby granted, free of charge, to any person obtaining a copy
11 * of this software and associated documentation files (the "Software"), to deal
12 * in the Software without restriction, including without limitation the rights
13 * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
14 * copies of the Software, and to permit persons to whom the Software is
15 * furnished to do so, subject to the following conditions:
17 * The above copyright notice and this permission notice shall be included in
18 * all copies or substantial portions of the Software.
20 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
21 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
22 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
23 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
24 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
25 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
29 #include <babeltrace/babeltrace.h>
30 #include <babeltrace/plugin/plugin.h>
31 #include <babeltrace/common-internal.h>
32 #include <babeltrace/component/component.h>
33 #include <babeltrace/component/component-source.h>
34 #include <babeltrace/component/component-sink.h>
35 #include <babeltrace/component/component-filter.h>
36 #include <babeltrace/component/component-class.h>
37 #include <babeltrace/component/notification/iterator.h>
38 #include <babeltrace/ref.h>
39 #include <babeltrace/values.h>
41 #include <babeltrace/ctf-ir/metadata.h> /* for clocks */
46 #include "babeltrace-cfg.h"
47 #include "default-cfg.h"
49 GPtrArray
*loaded_plugins
;
52 void init_loaded_plugins_array(void)
54 loaded_plugins
= g_ptr_array_new_full(8, bt_put
);
58 void fini_loaded_plugins_array(void)
60 g_ptr_array_free(loaded_plugins
, TRUE
);
64 struct bt_plugin
*find_plugin(const char *name
)
67 struct bt_plugin
*plugin
= NULL
;
69 for (i
= 0; i
< loaded_plugins
->len
; i
++) {
70 plugin
= g_ptr_array_index(loaded_plugins
, i
);
72 if (strcmp(name
, bt_plugin_get_name(plugin
)) == 0) {
79 return bt_get(plugin
);
83 struct bt_component_class
*find_component_class(const char *plugin_name
,
84 const char *comp_class_name
,
85 enum bt_component_class_type comp_class_type
)
87 struct bt_component_class
*comp_class
= NULL
;
88 struct bt_plugin
*plugin
= find_plugin(plugin_name
);
94 comp_class
= bt_plugin_get_component_class_by_name_and_type(plugin
,
95 comp_class_name
, comp_class_type
);
102 void print_indent(size_t indent
)
106 for (i
= 0; i
< indent
; i
++) {
112 void print_value(struct bt_value
*, size_t);
115 bool print_map_value(const char *key
, struct bt_value
*object
, void *data
)
117 size_t *indent
= data
;
119 print_indent(*indent
);
122 if (bt_value_is_array(object
) &&
123 bt_value_array_is_empty(object
)) {
128 if (bt_value_is_map(object
) &&
129 bt_value_map_is_empty(object
)) {
134 if (bt_value_is_array(object
) ||
135 bt_value_is_map(object
)) {
139 print_value(object
, *indent
+ 2);
144 void print_value(struct bt_value
*value
, size_t indent
)
157 switch (bt_value_get_type(value
)) {
158 case BT_VALUE_TYPE_NULL
:
161 case BT_VALUE_TYPE_BOOL
:
162 bt_value_bool_get(value
, &bool_val
);
163 printf("%s\n", bool_val
? "yes" : "no");
165 case BT_VALUE_TYPE_INTEGER
:
166 bt_value_integer_get(value
, &int_val
);
167 printf("%" PRId64
"\n", int_val
);
169 case BT_VALUE_TYPE_FLOAT
:
170 bt_value_float_get(value
, &dbl_val
);
171 printf("%lf\n", dbl_val
);
173 case BT_VALUE_TYPE_STRING
:
174 bt_value_string_get(value
, &str_val
);
175 printf("%s\n", str_val
);
177 case BT_VALUE_TYPE_ARRAY
:
178 size
= bt_value_array_size(value
);
182 print_indent(indent
);
187 for (i
= 0; i
< size
; i
++) {
188 struct bt_value
*element
=
189 bt_value_array_get(value
, i
);
192 print_indent(indent
);
195 if (bt_value_is_array(element
) &&
196 bt_value_array_is_empty(element
)) {
201 if (bt_value_is_map(element
) &&
202 bt_value_map_is_empty(element
)) {
207 if (bt_value_is_array(element
) ||
208 bt_value_is_map(element
)) {
212 print_value(element
, indent
+ 2);
216 case BT_VALUE_TYPE_MAP
:
217 if (bt_value_map_is_empty(value
)) {
218 print_indent(indent
);
223 bt_value_map_foreach(value
, print_map_value
, &indent
);
231 void print_bt_config_component(struct bt_config_component
*bt_config_component
)
233 printf(" %s.%s:\n", bt_config_component
->plugin_name
->str
,
234 bt_config_component
->component_name
->str
);
236 if (bt_config_component
->instance_name
->len
> 0) {
237 printf(" Name: %s\n",
238 bt_config_component
->instance_name
->str
);
241 printf(" Parameters:\n");
242 print_value(bt_config_component
->params
, 8);
246 void print_bt_config_components(GPtrArray
*array
)
250 for (i
= 0; i
< array
->len
; i
++) {
251 struct bt_config_component
*cfg_component
=
252 bt_config_get_component(array
, i
);
253 print_bt_config_component(cfg_component
);
254 BT_PUT(cfg_component
);
259 void print_plugin_paths(struct bt_value
*plugin_paths
)
261 printf(" Plugin paths:\n");
262 print_value(plugin_paths
, 4);
266 void print_cfg_convert(struct bt_config
*cfg
)
268 printf(" Force correlate: %s\n",
269 cfg
->cmd_data
.convert
.force_correlate
? "yes" : "no");
270 print_plugin_paths(cfg
->cmd_data
.convert
.plugin_paths
);
271 printf(" Source component instances:\n");
272 print_bt_config_components(cfg
->cmd_data
.convert
.sources
);
273 printf(" Sink component instances:\n");
274 print_bt_config_components(cfg
->cmd_data
.convert
.sinks
);
278 void print_cfg_list_plugins(struct bt_config
*cfg
)
280 print_plugin_paths(cfg
->cmd_data
.list_plugins
.plugin_paths
);
284 void print_cfg(struct bt_config
*cfg
)
286 if (!babeltrace_verbose
) {
290 printf("Configuration:\n");
291 printf(" Debug mode: %s\n", cfg
->debug
? "yes" : "no");
292 printf(" Verbose mode: %s\n", cfg
->verbose
? "yes" : "no");
294 switch (cfg
->command
) {
295 case BT_CONFIG_COMMAND_CONVERT
:
296 print_cfg_convert(cfg
);
298 case BT_CONFIG_COMMAND_LIST_PLUGINS
:
299 print_cfg_list_plugins(cfg
);
307 struct bt_component
*create_trimmer(struct bt_config_component
*source_cfg
)
309 struct bt_component
*trimmer
= NULL
;
310 struct bt_component_class
*trimmer_class
= NULL
;
311 struct bt_value
*trimmer_params
= NULL
;
312 struct bt_value
*value
;
314 trimmer_params
= bt_value_map_create();
315 if (!trimmer_params
) {
319 value
= bt_value_map_get(source_cfg
->params
, "begin");
321 enum bt_value_status ret
;
323 ret
= bt_value_map_insert(trimmer_params
, "begin",
330 value
= bt_value_map_get(source_cfg
->params
, "end");
332 enum bt_value_status ret
;
334 ret
= bt_value_map_insert(trimmer_params
, "end",
341 value
= bt_value_map_get(source_cfg
->params
, "clock-gmt");
343 enum bt_value_status ret
;
345 ret
= bt_value_map_insert(trimmer_params
, "clock-gmt",
353 trimmer_class
= find_component_class("utils", "trimmer",
354 BT_COMPONENT_CLASS_TYPE_FILTER
);
355 if (!trimmer_class
) {
356 fprintf(stderr
, "Could not find trimmer component class. Aborting...\n");
359 trimmer
= bt_component_create(trimmer_class
, "source_trimmer",
365 bt_put(trimmer_params
);
366 bt_put(trimmer_class
);
371 int connect_source_sink(struct bt_component
*source
,
372 struct bt_config_component
*source_cfg
,
373 struct bt_component
*sink
)
376 enum bt_component_status sink_status
;
377 struct bt_component
*trimmer
= NULL
;
378 struct bt_notification_iterator
*source_it
= NULL
;
379 struct bt_notification_iterator
*to_sink_it
= NULL
;
381 source_it
= bt_component_source_create_notification_iterator(source
);
383 fprintf(stderr
, "Failed to instantiate source iterator. Aborting...\n");
388 if (bt_value_map_has_key(source_cfg
->params
, "begin")
389 || bt_value_map_has_key(source_cfg
->params
, "end")) {
390 /* A trimmer must be inserted in the graph. */
391 enum bt_component_status trimmer_status
;
393 trimmer
= create_trimmer(source_cfg
);
395 fprintf(stderr
, "Failed to create trimmer component. Aborting...\n");
400 trimmer_status
= bt_component_filter_add_iterator(trimmer
,
403 if (trimmer_status
!= BT_COMPONENT_STATUS_OK
) {
404 fprintf(stderr
, "Failed to connect source to trimmer. Aborting...\n");
409 to_sink_it
= bt_component_filter_create_notification_iterator(trimmer
);
411 fprintf(stderr
, "Failed to instantiate trimmer iterator. Aborting...\n");
416 BT_MOVE(to_sink_it
, source_it
);
419 sink_status
= bt_component_sink_add_iterator(sink
, to_sink_it
);
420 if (sink_status
!= BT_COMPONENT_STATUS_OK
) {
421 fprintf(stderr
, "Failed to connect to sink component. Aborting...\n");
433 void add_to_loaded_plugins(struct bt_plugin
**plugins
)
436 struct bt_plugin
*plugin
= *plugins
;
437 /* Check if it's already loaded (from another path). */
438 struct bt_plugin
*loaded_plugin
=
439 find_plugin(bt_plugin_get_name(plugin
));
442 printf_verbose("Not loading plugin `%s`: already loaded from `%s`\n",
443 bt_plugin_get_path(plugin
),
444 bt_plugin_get_path(loaded_plugin
));
445 BT_PUT(loaded_plugin
);
448 /* Transfer ownership to global array. */
449 g_ptr_array_add(loaded_plugins
, plugin
);
456 int load_dynamic_plugins(struct bt_value
*plugin_paths
)
458 int nr_paths
, i
, ret
= 0;
460 nr_paths
= bt_value_array_size(plugin_paths
);
466 for (i
= 0; i
< nr_paths
; i
++) {
467 struct bt_value
*plugin_path_value
= NULL
;
468 const char *plugin_path
;
469 struct bt_plugin
**plugins
;
471 plugin_path_value
= bt_value_array_get(plugin_paths
, i
);
472 if (bt_value_string_get(plugin_path_value
,
474 BT_PUT(plugin_path_value
);
478 plugins
= bt_plugin_create_all_from_dir(plugin_path
, false);
480 printf_debug("Unable to dynamically load plugins from path %s.\n",
482 BT_PUT(plugin_path_value
);
486 add_to_loaded_plugins(plugins
);
489 BT_PUT(plugin_path_value
);
496 int load_static_plugins(void)
499 struct bt_plugin
**plugins
;
501 plugins
= bt_plugin_create_all_from_static();
503 printf_debug("Unable to load static plugins.\n");
508 add_to_loaded_plugins(plugins
);
515 const char *component_type_str(enum bt_component_class_type type
)
518 case BT_COMPONENT_CLASS_TYPE_SOURCE
:
520 case BT_COMPONENT_CLASS_TYPE_SINK
:
522 case BT_COMPONENT_CLASS_TYPE_FILTER
:
524 case BT_COMPONENT_CLASS_TYPE_UNKNOWN
:
530 static int load_all_plugins(struct bt_value
*plugin_paths
)
534 if (load_dynamic_plugins(plugin_paths
)) {
535 fprintf(stderr
, "Failed to load dynamic plugins.\n");
540 if (load_static_plugins()) {
541 fprintf(stderr
, "Failed to load static plugins.\n");
550 static void print_plugin_info(struct bt_plugin
*plugin
)
552 unsigned int major
, minor
, patch
;
554 enum bt_plugin_status version_status
;
555 const char *plugin_name
;
559 const char *plugin_description
;
561 plugin_name
= bt_plugin_get_name(plugin
);
562 path
= bt_plugin_get_path(plugin
);
563 author
= bt_plugin_get_author(plugin
);
564 license
= bt_plugin_get_license(plugin
);
565 plugin_description
= bt_plugin_get_description(plugin
);
566 version_status
= bt_plugin_get_version(plugin
, &major
, &minor
,
568 printf("%s%s%s%s:\n", bt_common_color_bold(),
569 bt_common_color_fg_blue(), plugin_name
,
570 bt_common_color_reset());
571 printf(" %sPath%s: %s\n", bt_common_color_bold(),
572 bt_common_color_reset(), path
? path
: "(None)");
574 if (version_status
== BT_PLUGIN_STATUS_OK
) {
575 printf(" %sVersion%s: %u.%u.%u",
576 bt_common_color_bold(), bt_common_color_reset(),
577 major
, minor
, patch
);
586 printf(" %sDescription%s: %s\n", bt_common_color_bold(),
587 bt_common_color_reset(),
588 plugin_description
? plugin_description
: "(None)");
589 printf(" %sAuthor%s: %s\n", bt_common_color_bold(),
590 bt_common_color_reset(), author
? author
: "(Unknown)");
591 printf(" %sLicense%s: %s\n", bt_common_color_bold(),
592 bt_common_color_reset(),
593 license
? license
: "(Unknown)");
596 static void print_plugin_comp_cls_opt(FILE *fh
, const char *plugin_name
,
597 const char *comp_cls_name
, enum bt_component_class_type type
)
599 fprintf(fh
, "%s%s--%s%s %s%s%s.%s%s%s",
600 bt_common_color_bold(),
601 bt_common_color_fg_cyan(),
602 component_type_str(type
),
603 bt_common_color_fg_default(),
604 bt_common_color_fg_blue(),
606 bt_common_color_fg_default(),
607 bt_common_color_fg_yellow(),
609 bt_common_color_reset());
612 static int cmd_help(struct bt_config
*cfg
)
615 struct bt_plugin
*plugin
= NULL
;
618 ret
= load_all_plugins(cfg
->cmd_data
.list_plugins
.plugin_paths
);
623 plugin
= find_plugin(cfg
->cmd_data
.help
.plugin_name
->str
);
625 fprintf(stderr
, "%s%sCannot find plugin %s%s%s\n",
626 bt_common_color_bold(), bt_common_color_fg_red(),
627 bt_common_color_fg_blue(),
628 cfg
->cmd_data
.help
.plugin_name
->str
,
629 bt_common_color_reset());
634 print_plugin_info(plugin
);
635 printf(" %sComponent classes%s: %d\n",
636 bt_common_color_bold(),
637 bt_common_color_reset(),
638 bt_plugin_get_component_class_count(plugin
));
641 if (cfg
->cmd_data
.help
.comp_cls_type
!=
642 BT_COMPONENT_CLASS_TYPE_UNKNOWN
) {
643 struct bt_component_class
*needed_comp_cls
=
644 find_component_class(
645 cfg
->cmd_data
.help
.plugin_name
->str
,
646 cfg
->cmd_data
.help
.component_name
->str
,
647 cfg
->cmd_data
.help
.comp_cls_type
);
649 if (!needed_comp_cls
) {
650 fprintf(stderr
, "\n%s%sCannot find component class %s",
651 bt_common_color_bold(),
652 bt_common_color_fg_red(),
653 bt_common_color_reset());
654 print_plugin_comp_cls_opt(stderr
,
655 cfg
->cmd_data
.help
.plugin_name
->str
,
656 cfg
->cmd_data
.help
.component_name
->str
,
657 cfg
->cmd_data
.help
.comp_cls_type
);
658 fprintf(stderr
, "\n");
663 bt_put(needed_comp_cls
);
666 for (i
= 0; i
< bt_plugin_get_component_class_count(plugin
); i
++) {
667 struct bt_component_class
*comp_cls
=
668 bt_plugin_get_component_class(plugin
, i
);
669 const char *comp_class_name
=
670 bt_component_class_get_name(comp_cls
);
671 const char *comp_class_description
=
672 bt_component_class_get_description(comp_cls
);
673 const char *comp_class_help
=
674 bt_component_class_get_help(comp_cls
);
675 enum bt_component_class_type type
=
676 bt_component_class_get_type(comp_cls
);
680 if (cfg
->cmd_data
.help
.comp_cls_type
!=
681 BT_COMPONENT_CLASS_TYPE_UNKNOWN
) {
682 if (strcmp(cfg
->cmd_data
.help
.component_name
->str
,
683 comp_class_name
) != 0 &&
685 cfg
->cmd_data
.help
.comp_cls_type
) {
692 print_plugin_comp_cls_opt(stdout
,
693 cfg
->cmd_data
.help
.plugin_name
->str
,
697 printf(" %sDescription%s: %s\n", bt_common_color_bold(),
698 bt_common_color_reset(),
699 comp_class_description
? comp_class_description
: "(None)");
701 if (comp_class_help
) {
702 printf("\n%s\n", comp_class_help
);
713 static int cmd_list_plugins(struct bt_config
*cfg
)
716 int plugins_count
, component_classes_count
= 0, i
;
718 ret
= load_all_plugins(cfg
->cmd_data
.list_plugins
.plugin_paths
);
723 printf("From the following plugin paths:\n\n");
724 print_value(cfg
->cmd_data
.list_plugins
.plugin_paths
, 2);
726 plugins_count
= loaded_plugins
->len
;
727 if (plugins_count
== 0) {
728 fprintf(stderr
, "%s%sNo plugins found.%s\n",
729 bt_common_color_bold(), bt_common_color_fg_red(),
730 bt_common_color_reset());
731 fprintf(stderr
, "\n");
732 fprintf(stderr
, "Please make sure your plugin search path is set correctly. You can use\n");
733 fprintf(stderr
, "the --plugin-path command-line option or the BABELTRACE_PLUGIN_PATH\n");
734 fprintf(stderr
, "environment variable.\n");
739 for (i
= 0; i
< plugins_count
; i
++) {
740 struct bt_plugin
*plugin
= g_ptr_array_index(loaded_plugins
, i
);
742 component_classes_count
+= bt_plugin_get_component_class_count(plugin
);
745 printf("Found %s%d%s component classes in %s%d%s plugins.\n",
746 bt_common_color_bold(),
747 component_classes_count
,
748 bt_common_color_reset(),
749 bt_common_color_bold(),
751 bt_common_color_reset());
753 for (i
= 0; i
< plugins_count
; i
++) {
755 struct bt_plugin
*plugin
= g_ptr_array_index(loaded_plugins
, i
);
757 component_classes_count
=
758 bt_plugin_get_component_class_count(plugin
);
760 print_plugin_info(plugin
);
762 if (component_classes_count
== 0) {
763 printf(" %sComponent classes%s: (None)\n",
764 bt_common_color_bold(),
765 bt_common_color_reset());
767 printf(" %sComponent classes%s:\n",
768 bt_common_color_bold(),
769 bt_common_color_reset());
772 for (j
= 0; j
< component_classes_count
; j
++) {
773 struct bt_component_class
*comp_class
=
774 bt_plugin_get_component_class(plugin
, j
);
775 const char *comp_class_name
=
776 bt_component_class_get_name(comp_class
);
777 const char *comp_class_description
=
778 bt_component_class_get_description(comp_class
);
779 enum bt_component_class_type type
=
780 bt_component_class_get_type(comp_class
);
783 print_plugin_comp_cls_opt(stdout
,
784 bt_plugin_get_name(plugin
), comp_class_name
,
787 if (comp_class_description
) {
788 printf(": %s", comp_class_description
);
800 static int cmd_convert(struct bt_config
*cfg
)
803 struct bt_component_class
*source_class
= NULL
;
804 struct bt_component_class
*sink_class
= NULL
;
805 struct bt_component
*source
= NULL
, *sink
= NULL
;
806 struct bt_value
*source_params
= NULL
, *sink_params
= NULL
;
807 enum bt_component_status sink_status
;
808 struct bt_config_component
*source_cfg
= NULL
, *sink_cfg
= NULL
;
810 /* TODO handle more than 1 source and 1 sink. */
811 if (cfg
->cmd_data
.convert
.sources
->len
!= 1 ||
812 cfg
->cmd_data
.convert
.sinks
->len
!= 1) {
817 ret
= load_all_plugins(cfg
->cmd_data
.convert
.plugin_paths
);
822 source_cfg
= bt_config_get_component(cfg
->cmd_data
.convert
.sources
, 0);
823 source_params
= bt_get(source_cfg
->params
);
824 source_class
= find_component_class(source_cfg
->plugin_name
->str
,
825 source_cfg
->component_name
->str
,
826 BT_COMPONENT_CLASS_TYPE_SOURCE
);
828 fprintf(stderr
, "Could not find %s.%s source component class. Aborting...\n",
829 source_cfg
->plugin_name
->str
,
830 source_cfg
->component_name
->str
);
835 sink_cfg
= bt_config_get_component(cfg
->cmd_data
.convert
.sinks
, 0);
836 sink_params
= bt_get(sink_cfg
->params
);
837 sink_class
= find_component_class(sink_cfg
->plugin_name
->str
,
838 sink_cfg
->component_name
->str
,
839 BT_COMPONENT_CLASS_TYPE_SINK
);
841 fprintf(stderr
, "Could not find %s.%s output component class. Aborting...\n",
842 sink_cfg
->plugin_name
->str
,
843 sink_cfg
->component_name
->str
);
848 source
= bt_component_create(source_class
, "source", source_params
);
850 fprintf(stderr
, "Failed to instantiate selected source component. Aborting...\n");
855 sink
= bt_component_create(sink_class
, "sink", sink_params
);
857 fprintf(stderr
, "Failed to instantiate selected output component. Aborting...\n");
862 ret
= connect_source_sink(source
, source_cfg
, sink
);
869 sink_status
= bt_component_sink_consume(sink
);
870 switch (sink_status
) {
871 case BT_COMPONENT_STATUS_AGAIN
:
872 /* Wait for an arbitraty 500 ms. */
875 case BT_COMPONENT_STATUS_OK
:
877 case BT_COMPONENT_STATUS_END
:
880 fprintf(stderr
, "Sink component returned an error, aborting...\n");
888 BT_PUT(source_class
);
891 BT_PUT(source_params
);
898 static void warn_command_name_and_directory_clash(struct bt_config
*cfg
)
900 if (!cfg
->command_name
) {
904 if (g_file_test(cfg
->command_name
,
905 G_FILE_TEST_EXISTS
| G_FILE_TEST_IS_DIR
)) {
906 fprintf(stderr
, "\nNOTE: The `%s` command was executed. If you meant to convert a\n",
908 fprintf(stderr
, "trace located in the local `%s` directory, please use:\n",
910 fprintf(stderr
, "\n");
911 fprintf(stderr
, " babeltrace convert %s [OPTIONS]\n",
916 int main(int argc
, const char **argv
)
920 struct bt_config
*cfg
;
922 init_loaded_plugins_array();
923 cfg
= bt_config_from_args_with_defaults(argc
, argv
, &retcode
);
926 /* Quit without errors; typically usage/version */
936 fprintf(stderr
, "Failed to create Babeltrace configuration\n");
940 babeltrace_debug
= cfg
->debug
;
941 babeltrace_verbose
= cfg
->verbose
;
944 switch (cfg
->command
) {
945 case BT_CONFIG_COMMAND_CONVERT
:
946 ret
= cmd_convert(cfg
);
948 case BT_CONFIG_COMMAND_LIST_PLUGINS
:
949 ret
= cmd_list_plugins(cfg
);
951 case BT_CONFIG_COMMAND_HELP
:
958 warn_command_name_and_directory_clash(cfg
);
959 retcode
= ret
? 1 : 0;
963 fini_loaded_plugins_array();