*/
static void usage(FILE *ofp)
{
- fprintf(ofp, "usage: lttng list [OPTIONS] [SESSION [<OPTIONS>]]\n");
+ fprintf(ofp, "usage: lttng list [OPTIONS] [SESSION [SESSION OPTIONS]]\n");
fprintf(ofp, "\n");
fprintf(ofp, "With no arguments, list available tracing session(s)\n");
fprintf(ofp, "\n");
cmdline = get_cmdline_by_pid(cur_pid);
MSG("\nPID: %d - Name: %s", cur_pid, cmdline);
free(cmdline);
+ /* Wipe current event since we are about to print a new PID. */
+ memset(&cur_event, 0, sizeof(cur_event));
}
if (strcmp(cur_event.name, event_field_list[i].event.name) != 0) {
print_events(&event_field_list[i].event);
goto end;
}
- if (opt_kernel) {
+ if (opt_kernel || opt_userspace) {
/* Channel listing */
ret = list_channels(opt_channel);
if (ret < 0) {