fields[0].type.atype = atype_integer;
fields[0].type.u.basic.integer.size = sizeof(unsigned long) * CHAR_BIT;
fields[0].type.u.basic.integer.alignment = lttng_alignof(unsigned long) * CHAR_BIT;
- fields[0].type.u.basic.integer.signedness = is_signed_type(unsigned long);
+ fields[0].type.u.basic.integer.signedness = lttng_is_signed_type(unsigned long);
fields[0].type.u.basic.integer.reverse_byte_order = 0;
fields[0].type.u.basic.integer.base = 16;
fields[0].type.u.basic.integer.encoding = lttng_encode_none;
fields[1].type.atype = atype_integer;
fields[1].type.u.basic.integer.size = sizeof(unsigned long) * CHAR_BIT;
fields[1].type.u.basic.integer.alignment = lttng_alignof(unsigned long) * CHAR_BIT;
- fields[1].type.u.basic.integer.signedness = is_signed_type(unsigned long);
+ fields[1].type.u.basic.integer.signedness = lttng_is_signed_type(unsigned long);
fields[1].type.u.basic.integer.reverse_byte_order = 0;
fields[1].type.u.basic.integer.base = 16;
fields[1].type.u.basic.integer.encoding = lttng_encode_none;
}
EXPORT_SYMBOL_GPL(lttng_kretprobes_destroy_private);
+int lttng_kretprobes_event_enable_state(struct lttng_event *event,
+ int enable)
+{
+ struct lttng_event *event_return;
+ struct lttng_krp *lttng_krp;
+
+ if (event->instrumentation != LTTNG_KERNEL_KRETPROBE) {
+ return -EINVAL;
+ }
+ if (event->enabled == enable) {
+ return -EBUSY;
+ }
+ lttng_krp = event->u.kretprobe.lttng_krp;
+ event_return = lttng_krp->event[EVENT_RETURN];
+ ACCESS_ONCE(event->enabled) = enable;
+ ACCESS_ONCE(event_return->enabled) = enable;
+ return 0;
+}
+EXPORT_SYMBOL_GPL(lttng_kretprobes_event_enable_state);
+
MODULE_LICENSE("GPL and additional rights");
MODULE_AUTHOR("Mathieu Desnoyers");
MODULE_DESCRIPTION("Linux Trace Toolkit Kretprobes Support");
+MODULE_VERSION(__stringify(LTTNG_MODULES_MAJOR_VERSION) "."
+ __stringify(LTTNG_MODULES_MINOR_VERSION) "."
+ __stringify(LTTNG_MODULES_PATCHLEVEL_VERSION)
+ LTTNG_MODULES_EXTRAVERSION);