* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
-#define _GNU_SOURCE
#define _LGPL_SOURCE
#include <assert.h>
#include <stdio.h>
{ "lttng-probe-v4l2" },
{ "lttng-probe-workqueue" },
{ "lttng-probe-writeback" },
+ { "lttng-probe-x86-irq-vectors" },
+ { "lttng-probe-x86-exceptions" },
};
/* dynamic probe modules list */
static int append_list_to_probes(const char *list)
{
char *next;
- int index = nr_probes, ret;
- char *tmp_list;
+ int ret;
+ char *tmp_list, *cur_list;
assert(list);
- tmp_list = strdup(list);
+ cur_list = tmp_list = strdup(list);
if (!tmp_list) {
PERROR("strdup temp list");
return -ENOMEM;
size_t name_len;
struct kern_modules_param *cur_mod;
- next = strtok(tmp_list, ",");
+ next = strtok(cur_list, ",");
if (!next) {
break;
}
- tmp_list = NULL;
+ cur_list = NULL;
/* filter leading spaces */
while (*next == ' ') {
/* Length 13 is "lttng-probe-" + \0 */
name_len = strlen(next) + 13;
- cur_mod = &probes[index++];
+ cur_mod = &probes[nr_probes];
cur_mod->name = zmalloc(name_len);
if (!cur_mod->name) {
PERROR("malloc probe list");
goto error;
}
- cur_mod++;
nr_probes++;
}