+
+#else /* #if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,35)) */
+
+LTTNG_TRACEPOINT_EVENT(lock_release,
+
+ TP_PROTO(struct lockdep_map *lock, int nested, unsigned long ip),
+
+ TP_ARGS(lock, nested, ip),
+
+ TP_FIELDS(
+ ctf_string(name, lock->name)
+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,34))
+ ctf_integer_hex(void *, lockdep_addr, lock)
+#endif
+ )
+)
+
+#ifdef CONFIG_LOCK_STAT
+
+LTTNG_TRACEPOINT_EVENT(lock_contended,
+
+ TP_PROTO(struct lockdep_map *lock, unsigned long ip),
+
+ TP_ARGS(lock, ip),
+
+ TP_FIELDS(
+ ctf_string(name, lock->name)
+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,34))
+ ctf_integer_hex(void *, lockdep_addr, lock)
+#endif
+ )
+)
+
+LTTNG_TRACEPOINT_EVENT(lock_acquired,
+
+ TP_PROTO(struct lockdep_map *lock, unsigned long ip, s64 waittime),
+
+ TP_ARGS(lock, ip, waittime),
+
+ TP_FIELDS(
+ ctf_string(name, lock->name)
+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,34))
+ ctf_integer(s64, wait_nsec, wait_nsec)
+ ctf_integer_hex(void *, lockdep_addr, lock)
+#else
+ ctf_integer(unsigned long, wait_usec, (unsigned long) waittime)
+ ctf_integer(unsigned long, wait_nsec_rem, do_div(waittime, NSEC_PER_USEC))
+#endif
+ )
+)
+
+#endif
+
+#endif /* #if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,35)) */
+