summaryrefslogtreecommitdiff
path: root/glib/glib.stp.in
blob: 95d33516ad4a7f6e2167cba7c14a2365b92f994f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
global gquarks

/* This is needed to keep track of gquark for use in other probes.*/
probe process("@ABS_GLIB_RUNTIME_LIBDIR@/libglib-2.0.so.0.@LT_CURRENT@.@LT_REVISION@").mark("quark__new")
{
  gquarks[pid(), $arg2] = user_string($arg1)
}

/**
 * probe glib.quark_new - Called when a #GQuark is initially created
 * @quark: integer value for the quark
 * @str: string form of the quark
 */
probe glib.quark_new = process("@ABS_GLIB_RUNTIME_LIBDIR@/libglib-2.0.so.0.@LT_CURRENT@.@LT_REVISION@").mark("quark__new")
{
  str = user_string ($arg1); 
  quark = $arg2; 
  probestr = sprintf("glib.quark_new(%s) -> %d", str, quark);
}

/**
 * probe glib.mem_alloc - Called when a malloc block is initially requested
 * @mem: Raw memory pointer returned
 * @n_bytes: number of bytes
 * @zeroed: Boolean value, %TRUE if this block was filled with NUL bytes
 * @failable: Boolean value, %TRUE if program execution can continue on allocation failure
 */
probe glib.mem_alloc = process("@ABS_GLIB_RUNTIME_LIBDIR@/libglib-2.0.so.0.@LT_CURRENT@.@LT_REVISION@").mark("mem__alloc")
{
  mem = $arg1; 
  n_bytes = $arg2; 
  zeroed = $arg3; 
  failable = $arg4; 
  probestr = sprintf("glib.mem_alloc(n_bytes=%d) -> %p", n_bytes, mem);
}

/**
 * probe glib.mem_free - Called when a malloc block freed
 */
probe glib.mem_free = process("@ABS_GLIB_RUNTIME_LIBDIR@/libglib-2.0.so.0.@LT_CURRENT@.@LT_REVISION@").mark("mem__free")
{
  mem = $arg1;  /* ARG: @mem: Raw memory pointer */
  probestr = sprintf("glib.mem_free(mem=%p)", mem);
}

/**
 * probe glib.mem_realloc - Called when a malloc block is resized
 * @mem: Raw memory pointer returned
 * @old_mem: Original memory pointer
 * @n_bytes: number of bytes
 * @failable: Boolean value, %TRUE if program execution can continue on allocation failure
 */
probe glib.mem_realloc = process("@ABS_GLIB_RUNTIME_LIBDIR@/libglib-2.0.so.0.@LT_CURRENT@.@LT_REVISION@").mark("mem__realloc")
{
  mem = $arg1; 
  old_mem = $arg2; 
  n_bytes = $arg3;  
  failable = $arg4; 
  probestr = sprintf("glib.mem_realloc(old_mem=%p, n_bytes=%d) -> %p", old_mem, n_bytes, mem);
}

/**
 * probe glib.slice_alloc - Called when g_slice_alloc() is used
 * @mem: Raw memory pointer returned
 * @n_bytes: number of bytes
 */
probe glib.slice_alloc = process("@ABS_GLIB_RUNTIME_LIBDIR@/libglib-2.0.so.0.@LT_CURRENT@.@LT_REVISION@").mark("slice__alloc")
{
  mem = $arg1; 
  n_bytes = $arg2; 
  probestr = sprintf("glib.slice_alloc(n_bytes=%d) -> %p", n_bytes, mem);
}

/**
 * probe glib.slice_free - Called when memory slice is freed
 * @mem: Raw memory pointer returned
 * @n_bytes: Number of bytes
 */
probe glib.slice_free = process("@ABS_GLIB_RUNTIME_LIBDIR@/libglib-2.0.so.0.@LT_CURRENT@.@LT_REVISION@").mark("slice__free")
{
  mem = $arg1; 
  n_bytes = $arg2; 
  probestr = sprintf("glib.slice_free(n_bytes=%d) -> %p", n_bytes, mem);
}