{
struct lttng_kernel_calibrate kcalibrate;
- kcalibrate.type = calibrate->type;
+ switch (calibrate->type) {
+ case LTTNG_CALIBRATE_FUNCTION:
+ default:
+ /* Default and only possible calibrate option. */
+ kcalibrate.type = LTTNG_KERNEL_CALIBRATE_KRETPROBE;
+ break;
+ }
+
ret = kernel_calibrate(kernel_tracer_fd, &kcalibrate);
if (ret < 0) {
ret = LTTNG_ERR_KERN_ENABLE_FAIL;
{
struct lttng_ust_calibrate ucalibrate;
- ucalibrate.type = calibrate->type;
+ switch (calibrate->type) {
+ case LTTNG_CALIBRATE_FUNCTION:
+ default:
+ /* Default and only possible calibrate option. */
+ ucalibrate.type = LTTNG_UST_CALIBRATE_TRACEPOINT;
+ break;
+ }
+
ret = ust_app_calibrate_glb(&ucalibrate);
if (ret < 0) {
ret = LTTNG_ERR_UST_CALIBRATE_FAIL;
}
memcpy(tmp_event[count].field_name, uiter.field_name, LTTNG_UST_SYM_NAME_LEN);
- tmp_event[count].type = uiter.type;
+ /* Mapping between these enums matches 1 to 1. */
+ tmp_event[count].type = (enum lttng_event_field_type) uiter.type;
tmp_event[count].nowrite = uiter.nowrite;
memcpy(tmp_event[count].event.name, uiter.event_name, LTTNG_UST_SYM_NAME_LEN);
tmp_event[count].event.loglevel = uiter.loglevel;
- tmp_event[count].event.type = LTTNG_UST_TRACEPOINT;
+ tmp_event[count].event.type = LTTNG_EVENT_TRACEPOINT;
tmp_event[count].event.pid = app->pid;
tmp_event[count].event.enabled = -1;
count++;