#include "wrapper/ringbuffer/vfs.h"
#include "ltt-debugfs-abi.h"
#include "ltt-events.h"
+#include "ltt-tracer.h"
/*
* This is LTTng's own personal way to create a system call as an external
return ret;
}
+static
+long lttng_abi_tracer_version(struct file *file,
+ struct lttng_kernel_tracer_version __user *uversion_param)
+{
+ struct lttng_kernel_tracer_version v;
+
+ v.version = LTTNG_VERSION;
+ v.patchlevel = LTTNG_PATCHLEVEL;
+ v.sublevel = LTTNG_SUBLEVEL;
+
+ if (copy_to_user(uversion_param, &v, sizeof(v)))
+ return -EFAULT;
+ return 0;
+}
+
/**
* lttng_ioctl - lttng syscall through ioctl
*
switch (cmd) {
case LTTNG_KERNEL_SESSION:
return lttng_abi_create_session();
+ case LTTNG_KERNEL_TRACER_VERSION:
+ return lttng_abi_tracer_version(file,
+ (struct lttng_kernel_tracer_version __user *) arg);
default:
return -ENOIOCTLCMD;
}
struct lttng_kernel_channel {
int overwrite; /* 1: overwrite, 0: discard */
- u64 subbuf_size;
- u64 num_subbuf;
+ uint64_t subbuf_size;
+ uint64_t num_subbuf;
unsigned int switch_timer_interval;
unsigned int read_timer_interval;
};
* Either addr is used, or symbol_name and offset.
*/
struct lttng_kernel_kprobe {
- u64 addr;
+ uint64_t addr;
- u64 offset;
+ uint64_t offset;
char symbol_name[];
};
+struct lttng_kernel_tracer_version {
+ uint32_t version;
+ uint32_t patchlevel;
+ uint32_t sublevel;
+};
+
#define LTTNG_KERNEL_SESSION _IO(0xF6, 0x40)
#define LTTNG_KERNEL_SESSION_START _IO(0xF6, 0x41)
#define LTTNG_KERNEL_SESSION_STOP _IO(0xF6, 0x42)
#define LTTNG_KERNEL_KPROBE \
_IOW(0xF6, 0x47, struct lttng_kernel_kprobe)
#define LTTNG_KERNEL_TRACER_VERSION \
- _IOW(0xF6, 0x48, struct lttng_kernel_tracer_version)
+ _IOR(0xF6, 0x48, struct lttng_kernel_tracer_version)
#endif /* _LTT_DEBUGFS_ABI_H */