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"
} else if (opt_userspace) {
dom.type = LTTNG_DOMAIN_UST;
} else {
- ERR("Please specify a tracer (-k/--kernel or -u/--userspace)");
+ print_missing_domain();
ret = CMD_ERROR;
goto error;
}
goto end;
}
- type = malloc(sizeof(struct ctx_type));
+ type = zmalloc(sizeof(struct ctx_type));
if (type == NULL) {
perror("malloc ctx_type");
ret = CMD_FATAL;
}
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;