Add dup probe to lttng module
[lttng-modules.git] / probes / lockdep-trace.c
CommitLineData
1c8284eb
MD
1/*
2 * ltt/probes/lockdep-trace.c
3 *
4 * lockdep tracepoint probes.
5 *
6 * (C) Copyright 2009 - Mathieu Desnoyers <mathieu.desnoyers@polymtl.ca>
7 * Dual LGPL v2.1/GPL v2 license.
8 */
9
10#include <linux/module.h>
11#include <linux/lockdep.h>
12#include <trace/lockdep.h>
13
14void probe_lockdep_hardirqs_on(void *data, unsigned long retaddr)
15{
16 trace_mark_tp(lockdep, hardirqs_on, lockdep_hardirqs_on,
17 probe_lockdep_hardirqs_on, "retaddr 0x%lX", retaddr);
18}
19
20void probe_lockdep_hardirqs_off(void *data, unsigned long retaddr)
21{
22 trace_mark_tp(lockdep, hardirqs_off, lockdep_hardirqs_off,
23 probe_lockdep_hardirqs_off, "retaddr 0x%lX", retaddr);
24}
25
26void probe_lockdep_softirqs_on(void *data, unsigned long retaddr)
27{
28 trace_mark_tp(lockdep, softirqs_on, lockdep_softirqs_on,
29 probe_lockdep_softirqs_on, "retaddr 0x%lX", retaddr);
30}
31
32void probe_lockdep_softirqs_off(void *data, unsigned long retaddr)
33{
34 trace_mark_tp(lockdep, softirqs_off, lockdep_softirqs_off,
35 probe_lockdep_softirqs_off, "retaddr 0x%lX", retaddr);
36}
37
38void probe_lockdep_lock_acquire(void *data, unsigned long retaddr,
39 unsigned int subclass, struct lockdep_map *lock, int trylock,
40 int read, int hardirqs_off)
41{
42 trace_mark_tp(lockdep, lock_acquire, lockdep_lock_acquire,
43 probe_lockdep_lock_acquire,
44 "retaddr 0x%lX subclass %u lock %p trylock %d read %d "
45 "hardirqs_off %d",
46 retaddr, subclass, lock, trylock, read, hardirqs_off);
47}
48
49void probe_lockdep_lock_release(void *data, unsigned long retaddr,
50 struct lockdep_map *lock, int nested)
51{
52 trace_mark_tp(lockdep, lock_release, lockdep_lock_release,
53 probe_lockdep_lock_release,
54 "retaddr 0x%lX lock %p nested %d",
55 retaddr, lock, nested);
56}
57
58MODULE_LICENSE("GPL and additional rights");
59MODULE_AUTHOR("Mathieu Desnoyers");
60MODULE_DESCRIPTION("lockdep Tracepoint Probes");
This page took 0.08357 seconds and 4 git commands to generate.