out:
tracepoint(mutex, lock_exit, this, name);
}
+
+void Mutex::Unlock() {
+ _pre_unlock();
+ if (lockdep && g_lockdep) _will_unlock();
+ int r = pthread_mutex_unlock(&_m);
+ assert(r == 0);
+ tracepoint(mutex, unlock, this, name);
+}
assert(nlock == 0);
}
}
- void Unlock() {
- _pre_unlock();
- if (lockdep && g_lockdep) _will_unlock();
- int r = pthread_mutex_unlock(&_m);
- assert(r == 0);
- }
+ void Unlock();
friend class Cond;
mutex.tp.h
libtracepoints_la_LIBADD = -llttng-ust -ldl
-libtracepoints_la_CPPFLAGS = -DTRACEPOINT_DEFINE -DTRACEPOINT_PROBE_DYNAMIC_LINKAGE
+libtracepoints_la_CPPFLAGS = -DTRACEPOINT_PROBE_DYNAMIC_LINKAGE
libtracepoints_la_LDFLAGS =
noinst_LTLIBRARIES = libtracepoints.la
ctf_string(name, name)
)
)
+
+TRACEPOINT_EVENT(mutex, unlock,
+ TP_ARGS(
+ const void *, addr,
+ const char *, name),
+ TP_FIELDS(
+ ctf_integer_hex(unsigned long, addr, addr)
+ ctf_string(name, name)
+ )
+)
)
)
+TRACEPOINT_EVENT(mutex, unlock,
+ TP_ARGS(
+ const void *, addr,
+ const char *, name),
+ TP_FIELDS(
+ ctf_integer_hex(unsigned long, addr, addr)
+ ctf_string(name, name)
+ )
+)
+
#endif /* MUTEX_TP_H */
#include <lttng/tracepoint-event.h>