At this stage, only "entryexit = 0" is supported. No behavior change
except for validating that ENTRY and EXIT are unsupported (-EINVAL).
It is possible to extend struct lttng_kernel_kretprobe because it is
always used within struct lttng_kernel_event which contains enough
zero-initialized padding due to char padding[LTTNG_KERNEL_EVENT_PADDING2].
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Change-Id: I96d86eebff66da4af186ef51c2ff13e2ed84a510
char padding[LTTNG_KERNEL_CHANNEL_PADDING];
} __attribute__((packed));
+enum lttng_kernel_kretprobe_entryexit {
+ LTTNG_KERNEL_KRETPROBE_ENTRYEXIT = 0,
+ LTTNG_KERNEL_KRETPROBE_ENTRY = 1,
+ LTTNG_KERNEL_KRETPROBE_EXIT = 2,
+};
+
struct lttng_kernel_kretprobe {
uint64_t addr;
uint64_t offset;
char symbol_name[LTTNG_KERNEL_SYM_NAME_LEN];
+ uint8_t entryexit; /* enum lttng_kernel_kretprobe_entryexit */
} __attribute__((packed));
/*
}
break;
+ case LTTNG_KERNEL_KRETPROBE:
+ switch (event_param->u.kretprobe.entryexit) {
+ case LTTNG_KERNEL_SYSCALL_ENTRYEXIT:
+ break;
+ case LTTNG_KERNEL_SYSCALL_ENTRY: /* Fall-through */
+ case LTTNG_KERNEL_SYSCALL_EXIT: /* Fall-through */
+ default:
+ return -EINVAL;
+ }
+ break;
+
case LTTNG_KERNEL_TRACEPOINT: /* Fall-through */
case LTTNG_KERNEL_KPROBE: /* Fall-through */
- case LTTNG_KERNEL_KRETPROBE: /* Fall-through */
case LTTNG_KERNEL_UPROBE:
break;