#include "modprobe.h"
#include "kern-modules.h"
+#include "lttng-sessiond.h"
#define LTTNG_MOD_REQUIRED 1
#define LTTNG_MOD_OPTIONAL 0
{ "lttng-probe-ext3" },
{ "lttng-probe-ext4" },
{ "lttng-probe-gpio" },
+ { "lttng-probe-i2c" },
{ "lttng-probe-irq" },
{ "lttng-probe-jbd" },
{ "lttng-probe-jbd2" },
{ "lttng-probe-napi" },
{ "lttng-probe-net" },
{ "lttng-probe-power" },
+ { "lttng-probe-preemptirq" },
{ "lttng-probe-printk" },
{ "lttng-probe-random" },
{ "lttng-probe-rcu" },
}
} else {
DBG("Modprobe successfully %s", modules[i].name);
+ modules[i].loaded = true;
}
kmod_module_unref(mod);
for (i = entries - 1; i >= 0; i--) {
struct kmod_module *mod = NULL;
+ if (!modules[i].loaded) {
+ continue;
+ }
+
ret = kmod_module_new_from_name(ctx, modules[i].name, &mod);
if (ret < 0) {
PERROR("Failed to create kmod module for %s", modules[i].name);
}
} else {
DBG("Modprobe successfully %s", modules[i].name);
+ modules[i].loaded = true;
}
}
char modprobe[256];
for (i = entries - 1; i >= 0; i--) {
+ if (!modules[i].loaded) {
+ continue;
+ }
ret = snprintf(modprobe, sizeof(modprobe),
"/sbin/modprobe -r -q %s",
modules[i].name);
* Base probes: either from command line option, environment
* variable or default list.
*/
- if (kmod_probes_list) {
- list = kmod_probes_list;
- } else {
- list = utils_get_kmod_probes_list();
- }
-
+ list = config.kmod_probes_list.value;
if (list) {
/* User-specified probes. */
ret = append_list_to_probes(list);
/*
* Extra modules? Append them to current probes list.
*/
- if (kmod_extra_probes_list) {
- list = kmod_extra_probes_list;
- } else {
- list = utils_get_extra_kmod_probes_list();
- }
-
+ list = config.kmod_extra_probes_list.value;
if (list) {
ret = append_list_to_probes(list);
if (ret) {