This problem occured because the "syscall" event was not added to the
event list since his kernel FD is not valid (fd=0). However, this fd is
only usefull if we want to add context or disable events. Those two
operations are not supported for now.
So, we can safely add the event to the list and add a hardcoded name in
the lttng cli list command.
Signed-off-by: David Goulet <dgoulet@efficios.com>
}
/*
- * LTTNG_KERNEL_SYSCALL event creation will return 0 on success. However
- * this FD must not be added to the event list.
+ * LTTNG_KERNEL_SYSCALL event creation will return 0 on success.
*/
if (ret == 0 && event->event->instrumentation == LTTNG_KERNEL_SYSCALL) {
DBG2("Kernel event syscall creation success");
- goto end;
+ goto add_list;
}
event->fd = ret;
perror("fcntl session fd");
}
+add_list:
/* Add event to event list */
cds_list_add(&event->list, &channel->events_list.head);
channel->event_count++;
DBG("Event %s created (fd: %d)", ev->name, event->fd);
-end:
return 0;
free_event:
MSG("%ssymbol: \"%s\"", indent8, event->attr.ftrace.symbol_name);
break;
case LTTNG_EVENT_SYSCALL:
- MSG("%s (type: syscall)%s", indent6,
+ MSG("%ssyscalls (type: syscall)%s", indent6,
enabled_string(event->enabled));
break;
case LTTNG_EVENT_NOOP: