X-Git-Url: http://git.lttng.org./?a=blobdiff_plain;f=src%2Fbin%2Flttng%2Fcommands%2Fadd_context.c;h=d034d0b86d1e13f94b5a58c2cc7911a54b48e78c;hb=b20544380e8a0a99ac092e46192b437f62008c4a;hp=fad85b50aa5c263fa108f0faae44fa9936e4ed20;hpb=7c612c2e69f7b4ebf77fd369126befb71e561a8f;p=lttng-tools.git diff --git a/src/bin/lttng/commands/add_context.c b/src/bin/lttng/commands/add_context.c index fad85b50a..d034d0b86 100644 --- a/src/bin/lttng/commands/add_context.c +++ b/src/bin/lttng/commands/add_context.c @@ -322,6 +322,9 @@ static void usage(FILE *ofp) fprintf(ofp, " TYPE can be one of the strings below:\n"); print_ctx_type(ofp); fprintf(ofp, "\n"); + fprintf(ofp, "Note that the vpid, vppid and vtid context types represent the virtual process id,\n" + "virtual parent process id and virtual thread id as seen from the current execution context\n" + "as opposed to the pid, ppid and tid which are kernel internal data structures.\n\n"); fprintf(ofp, "Example:\n"); fprintf(ofp, "This command will add the context information 'prio' and two perf\n" "counters (hardware branch misses and cache misses), to all channels\n" @@ -474,13 +477,13 @@ int cmd_add_context(int argc, const char **argv) } type->opt = &ctx_opts[index]; - if (type->opt->ctx_type == -1) { + if (type->opt->symbol == NULL) { ERR("Unknown context type %s", opt_type); free(type); ret = CMD_ERROR; goto end; } else { - cds_list_add(&type->list, &ctx_type_list.head); + cds_list_add_tail(&type->list, &ctx_type_list.head); } break; case OPT_USERSPACE: