Add block layer trace event support
authorMathieu Desnoyers <mathieu.desnoyers@polymtl.ca>
Mon, 20 Dec 2010 06:39:19 +0000 (01:39 -0500)
committerMathieu Desnoyers <mathieu.desnoyers@polymtl.ca>
Mon, 20 Dec 2010 06:39:19 +0000 (01:39 -0500)
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
probes/Makefile
probes/lttng-events-reset.h
probes/lttng-events.h
probes/lttng-probe-block.c [new file with mode: 0644]

index 29e114c8994b92c17d51b543b4cdef7061c4ea1c..7bc3a51cd4373902195e0ec4cccaf7b1c2a6a8e3 100644 (file)
@@ -11,6 +11,7 @@ obj-m += lttng-types.o
 obj-m += lttng-probe-sched.o
 obj-m += lttng-probe-kvm.o
 obj-m += lttng-probe-irq.o
+obj-m += lttng-probe-block.o
 
 endif
 
index 2dac9e614dbec70a8495861a90756a386696ebb9..c272aea9d7898930cea6ace809fe53cebeae0ece 100644 (file)
@@ -12,6 +12,9 @@
 #undef __dynamic_array
 #define __dynamic_array(_type, _item, _length)
 
+#undef __dynamic_array
+#define __dynamic_array_len(_type, _item, _length)
+
 #undef __string
 #define __string(_item, _src)
 
index c5eeac28cbf8aea5fba345dbabcc3c73195cd2e3..c6eb2a68697b8507198b69f6391926151e401bbe 100644 (file)
@@ -20,6 +20,8 @@
        lib_ring_buffer_align_ctx(config, &ctx, sizeof(*(src)));        \
        lib_ring_buffer_write(config, &ctx, &src, len);
 
+/* TODO: tp_memcpy_dyn */
+
 /* TODO */
 #undef tp_strcpy
 #define tp_strcpy(dest, src)           __assign_str(dest, src);
@@ -148,12 +150,12 @@ struct lttng_event_desc {
 
 #include "lttng-events-reset.h"        /* Reset all macros within TRACE_EVENT */
 
-#undef DECLARE_EVENT_CLASS
-#define DECLARE_EVENT_CLASS(_name, _proto, _args, _tstruct, _assign, _print) \
-               {                                                            \
-                       .fields = __event_fields___##_name,                  \
-                       .name = #_name,                                      \
-                       .nr_fields = ARRAY_SIZE(__event_fields___##_name),   \
+#undef DEFINE_EVENT
+#define DEFINE_EVENT(_template, _name, _proto, _args)                         \
+               {                                                              \
+                       .fields = __event_fields___##_template,                \
+                       .name = #_name,                                        \
+                       .nr_fields = ARRAY_SIZE(__event_fields___##_template), \
                },
 
 #define TP_ID1(_token, _system)        _token##_system
diff --git a/probes/lttng-probe-block.c b/probes/lttng-probe-block.c
new file mode 100644 (file)
index 0000000..7bd5eaf
--- /dev/null
@@ -0,0 +1,23 @@
+/*
+ * probes/lttng-probe-block.c
+ *
+ * Copyright 2010 (c) - Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
+ *
+ * LTTng block probes.
+ */
+
+#include <linux/module.h>
+#include <linux/blktrace_api.h>
+
+/*
+ * Create LTTng tracepoint probes.
+ */
+#define LTTNG_PACKAGE_BUILD
+#define CREATE_TRACE_POINTS
+#undef CONFIG_EVENT_TRACING    /* Don't create Ftrace probes */
+
+#include <trace/events/block.h>
+
+MODULE_LICENSE("GPL and additional rights");
+MODULE_AUTHOR("Mathieu Desnoyers <mathieu.desnoyers@efficios.com>");
+MODULE_DESCRIPTION("LTTng block probes");
This page took 0.028288 seconds and 4 git commands to generate.