nexmon – Blame information for rev 1
?pathlinks?
Rev | Author | Line No. | Line |
---|---|---|---|
1 | office | 1 | global gquarks |
2 | |||
3 | /* This is needed to keep track of gquark for use in other probes.*/ |
||
4 | probe process("@ABS_GLIB_RUNTIME_LIBDIR@/libglib-2.0.so.0.@LT_CURRENT@.@LT_REVISION@").mark("quark__new") |
||
5 | { |
||
6 | gquarks[pid(), $arg2] = user_string($arg1) |
||
7 | } |
||
8 | |||
9 | /** |
||
10 | * probe glib.quark_new - Called when a #GQuark is initially created |
||
11 | * @quark: integer value for the quark |
||
12 | * @str: string form of the quark |
||
13 | */ |
||
14 | probe glib.quark_new = process("@ABS_GLIB_RUNTIME_LIBDIR@/libglib-2.0.so.0.@LT_CURRENT@.@LT_REVISION@").mark("quark__new") |
||
15 | { |
||
16 | str = user_string ($arg1); |
||
17 | quark = $arg2; |
||
18 | probestr = sprintf("glib.quark_new(%s) -> %d", str, quark); |
||
19 | } |
||
20 | |||
21 | /** |
||
22 | * probe glib.mem_alloc - Called when a malloc block is initially requested |
||
23 | * @mem: Raw memory pointer returned |
||
24 | * @n_bytes: number of bytes |
||
25 | * @zeroed: Boolean value, %TRUE if this block was filled with NUL bytes |
||
26 | * @failable: Boolean value, %TRUE if program execution can continue on allocation failure |
||
27 | */ |
||
28 | probe glib.mem_alloc = process("@ABS_GLIB_RUNTIME_LIBDIR@/libglib-2.0.so.0.@LT_CURRENT@.@LT_REVISION@").mark("mem__alloc") |
||
29 | { |
||
30 | mem = $arg1; |
||
31 | n_bytes = $arg2; |
||
32 | zeroed = $arg3; |
||
33 | failable = $arg4; |
||
34 | probestr = sprintf("glib.mem_alloc(n_bytes=%d) -> %p", n_bytes, mem); |
||
35 | } |
||
36 | |||
37 | /** |
||
38 | * probe glib.mem_free - Called when a malloc block freed |
||
39 | */ |
||
40 | probe glib.mem_free = process("@ABS_GLIB_RUNTIME_LIBDIR@/libglib-2.0.so.0.@LT_CURRENT@.@LT_REVISION@").mark("mem__free") |
||
41 | { |
||
42 | mem = $arg1; /* ARG: @mem: Raw memory pointer */ |
||
43 | probestr = sprintf("glib.mem_free(mem=%p)", mem); |
||
44 | } |
||
45 | |||
46 | /** |
||
47 | * probe glib.mem_realloc - Called when a malloc block is resized |
||
48 | * @mem: Raw memory pointer returned |
||
49 | * @old_mem: Original memory pointer |
||
50 | * @n_bytes: number of bytes |
||
51 | * @failable: Boolean value, %TRUE if program execution can continue on allocation failure |
||
52 | */ |
||
53 | probe glib.mem_realloc = process("@ABS_GLIB_RUNTIME_LIBDIR@/libglib-2.0.so.0.@LT_CURRENT@.@LT_REVISION@").mark("mem__realloc") |
||
54 | { |
||
55 | mem = $arg1; |
||
56 | old_mem = $arg2; |
||
57 | n_bytes = $arg3; |
||
58 | failable = $arg4; |
||
59 | probestr = sprintf("glib.mem_realloc(old_mem=%p, n_bytes=%d) -> %p", old_mem, n_bytes, mem); |
||
60 | } |
||
61 | |||
62 | /** |
||
63 | * probe glib.slice_alloc - Called when g_slice_alloc() is used |
||
64 | * @mem: Raw memory pointer returned |
||
65 | * @n_bytes: number of bytes |
||
66 | */ |
||
67 | probe glib.slice_alloc = process("@ABS_GLIB_RUNTIME_LIBDIR@/libglib-2.0.so.0.@LT_CURRENT@.@LT_REVISION@").mark("slice__alloc") |
||
68 | { |
||
69 | mem = $arg1; |
||
70 | n_bytes = $arg2; |
||
71 | probestr = sprintf("glib.slice_alloc(n_bytes=%d) -> %p", n_bytes, mem); |
||
72 | } |
||
73 | |||
74 | /** |
||
75 | * probe glib.slice_free - Called when memory slice is freed |
||
76 | * @mem: Raw memory pointer returned |
||
77 | * @n_bytes: Number of bytes |
||
78 | */ |
||
79 | probe glib.slice_free = process("@ABS_GLIB_RUNTIME_LIBDIR@/libglib-2.0.so.0.@LT_CURRENT@.@LT_REVISION@").mark("slice__free") |
||
80 | { |
||
81 | mem = $arg1; |
||
82 | n_bytes = $arg2; |
||
83 | probestr = sprintf("glib.slice_free(n_bytes=%d) -> %p", n_bytes, mem); |
||
84 | } |
||
85 | |||
86 | /** |
||
87 | * * probe glib.main_before_dispatch - Called before dispatching a GSource |
||
88 | * * @source: name of the source |
||
89 | * * @callback: address of the callback |
||
90 | * */ |
||
91 | probe glib.main_before_dispatch = process("@ABS_GLIB_RUNTIME_LIBDIR@/libglib-2.0.so.0.@LT_CURRENT@.@LT_REVISION@").mark("main__before_dispatch") |
||
92 | { |
||
93 | source = user_string2($arg1, "unnamed"); |
||
94 | probestr = sprintf("glib.main_before_dispatch(source=%s)", source); |
||
95 | } |
||
96 | |||
97 | /** |
||
98 | * * probe glib.main_after_dispatch - Called after dispatching a GSource |
||
99 | * * @source: name of the source |
||
100 | * * @callback: address of the callback |
||
101 | * */ |
||
102 | probe glib.main_after_dispatch = process("@ABS_GLIB_RUNTIME_LIBDIR@/libglib-2.0.so.0.@LT_CURRENT@.@LT_REVISION@").mark("main__after_dispatch") |
||
103 | { |
||
104 | source = user_string2($arg1, "unnamed"); |
||
105 | probestr = sprintf("glib.main_after_dispatch(source=%s)", source); |
||
106 | } |