Debian Codegraph @

tapset/linux/guru-delay.stp

raw
1 // Copyright (C) 2012 Red Hat Inc., Bryn M. Reeves <[email protected]>
2 //
3 // This file is part of systemtap, and is free software. You can
4 // redistribute it and/or modify it under the terms of the GNU General
5 // Public License (GPL); either version 2, or (at your option) any
6 // later version.
7 //
8
9 // <tapsetdescription>
10 // Functions in the guru-delay tapset allow a probe handler to insert
11 // deliberate delays. This is sometimes useful as a fault-injection
12 // aid. Due to its likelihood of interference with the kernel, guru
13 // mode is required, and overload-prevention is suppressed.
14 // </tapsetdescription>
15
16 %{
17 /* guru */
18 #undef STP_OVERLOAD
19 #include <linux/delay.h>
20 %}
21
22
23 /**
24 * sfunction mdelay - millisecond delay
25 * @ms: Number of milliseconds to delay.
26 *
27 * Description: This function inserts a multi-millisecond busy-delay into a probe handler.
28 * It requires guru mode.
29 */
30 function mdelay(ms:long) %{
31 /* guru */
32 mdelay(STAP_ARG_ms);
33 %}
34
35 /**
36 * sfunction udelay - microsecond delay
37 * @us: Number of microseconds to delay.
38 *
39 * Description: This function inserts a multi-microsecond busy-delay into a probe handler.
40 * It requires guru mode.
41 */
42 function udelay(us:long) %{
43 /* guru */
44 udelay(STAP_ARG_us);
45 %}