- /* Kernel tracer action */
- if (opt_kernel) {
- switch (opt_event_type) {
- case LTTNG_EVENT_TRACEPOINT:
- DBG("Calibrating kernel tracepoints");
- break;
- case LTTNG_EVENT_PROBE:
- DBG("Calibrating kernel probes");
- break;
- case LTTNG_EVENT_FUNCTION:
- DBG("Calibrating kernel functions");
- calibrate.type = LTTNG_CALIBRATE_FUNCTION;
- ret = lttng_calibrate(handle, &calibrate);
- break;
- case LTTNG_EVENT_FUNCTION_ENTRY:
- DBG("Calibrating kernel function entry");
- break;
- case LTTNG_EVENT_SYSCALL:
- DBG("Calibrating kernel syscall");
- break;
- default:
- ret = CMD_NOT_IMPLEMENTED;
- goto end;
- }
- } else if (opt_userspace) { /* User-space tracer action */
- /*
- * TODO: Waiting on lttng UST 2.0
- */
- if (opt_pid_all) {
- } else if (opt_pid != 0) {
+ switch (opt_event_type) {
+ case LTTNG_EVENT_TRACEPOINT:
+ DBG("Calibrating kernel tracepoints");
+ break;
+ case LTTNG_EVENT_PROBE:
+ DBG("Calibrating kernel probes");
+ break;
+ case LTTNG_EVENT_FUNCTION:
+ DBG("Calibrating kernel functions");
+ calibrate.type = LTTNG_CALIBRATE_FUNCTION;
+ ret = lttng_calibrate(handle, &calibrate);
+ if (ret < 0) {
+ ret = CMD_ERROR;
+ goto error;