From 4e97adab523667204864f10fef6ad992da49f27e Mon Sep 17 00:00:00 2001 From: Mark Wielaard Date: Fri, 13 Nov 2009 14:42:17 +0100 Subject: Turn ctime.stp documentation into proper Tapset Reference markup. * doc/SystemTap_Tapset_Reference/tapsets.tmpl: Add chapter on ctime.stp. * tapset/ctime.stp: Turn documentation into proper reference markup. --- tapset/ctime.stp | 27 +++++++++++++++------------ 1 file changed, 15 insertions(+), 12 deletions(-) (limited to 'tapset') diff --git a/tapset/ctime.stp b/tapset/ctime.stp index d907c2db..3ecd6ddf 100644 --- a/tapset/ctime.stp +++ b/tapset/ctime.stp @@ -1,7 +1,18 @@ -/* - * ctime() +/* ctime.stp - Convert seconds to human readable date string. * - * Takes an argument of seconds since the epoch as returned by + * This code was adapted from the newlib mktm_r() and asctime_r() + * functions. In newlib, mktm_r.c states that it was adapted from + * tzcode maintained by Arthur David Olson. In newlib, asctime_r.c + * doesn't have any author/copyright information. + * + * Changes copyright (C) 2006, 2008 Red Hat Inc. + */ + +/** + * sfunction ctime - Convert seconds since epoch into human readable date/time string. + * @epochsecs: Number of seconds since epoch (as returned by gettimeofday_s()). + * + * Description: Takes an argument of seconds since the epoch as returned by * gettimeofday_s(). Returns a string of the form * * "Wed Jun 30 21:49:08 1993" @@ -19,7 +30,7 @@ * * The earliest full date given by ctime, corresponding to epochsecs * -2147483648 is "Fri Dec 13 20:45:52 1901". The latest full date - * given by ctime, corresponding to epachsecs 2147483647 is + * given by ctime, corresponding to epochsecs 2147483647 is * "Tue Jan 19 03:14:07 2038". * * The abbreviations for the days of the week are ‘Sun’, ‘Mon’, ‘Tue’, @@ -31,15 +42,7 @@ * character at the end of the string that this function does not. * Also note that since the kernel has no concept of timezones, the * returned time is always in GMT. - * - * This code was adapted from the newlib mktm_r() and asctime_r() - * functions. In newlib, mktm_r.c states that it was adapted from - * tzcode maintained by Arthur David Olson. In newlib, asctime_r.c - * doesn't have any author/copyright information. - * - * Changes copyright (C) 2006, 2008 Red Hat Inc. */ - function ctime:string(epochsecs:long) %{ /* pure */ -- cgit From dc5a95301448c26bc016ebc618a8038e531d85f0 Mon Sep 17 00:00:00 2001 From: Prerna Saxena Date: Mon, 16 Nov 2009 11:25:46 +0530 Subject: add definition of function irqflags_str() --- tapset/aux_syscalls.stp | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) (limited to 'tapset') diff --git a/tapset/aux_syscalls.stp b/tapset/aux_syscalls.stp index 2f19ab16..d5444723 100644 --- a/tapset/aux_syscalls.stp +++ b/tapset/aux_syscalls.stp @@ -1891,3 +1891,30 @@ function _struct_sigaction32_u:string(uaddr:long) } #endif %} + +/* + * Function irqflags_str : + * Returns the symbolic string representation of the IRQ flags. + * + */ + +%{ +#include +static const _stp_val_array const _stp_irq_list[] = { + V(IRQF_DISABLED), + V(IRQF_SAMPLE_RANDOM), + V(IRQF_SHARED), + V(IRQF_PROBE_SHARED), + V(IRQF_TIMER), + V(IRQF_PERCPU), + V(IRQF_NOBALANCING), + V(IRQF_IRQPOLL), + V(IRQF_ONESHOT), + {0, NULL} +}; +%} + +function irqflags_str:string(f:long) +%{ /* pure */ + _stp_lookup_or_str(_stp_irq_list, THIS->f, THIS->__retvalue, MAXSTRINGLEN); +%} -- cgit From 7b76473cbad92366721defee51d93396cb101134 Mon Sep 17 00:00:00 2001 From: Mark Wielaard Date: Mon, 16 Nov 2009 10:33:20 +0100 Subject: Define IRQF_ONESHOT for older kernels. IRQF_ONESHOT was only introduced in 2.6.32. It doesn't hurt defining it if it isn't already there. It will just never show up on older kernels. * tapset/aux_syscalls.stp: Define IRQF_ONESHOT if not already defined. --- tapset/aux_syscalls.stp | 3 +++ 1 file changed, 3 insertions(+) (limited to 'tapset') diff --git a/tapset/aux_syscalls.stp b/tapset/aux_syscalls.stp index d5444723..5435d3aa 100644 --- a/tapset/aux_syscalls.stp +++ b/tapset/aux_syscalls.stp @@ -1900,6 +1900,9 @@ function _struct_sigaction32_u:string(uaddr:long) %{ #include +#ifndef IRQF_ONESHOT +#define IRQF_ONESHOT 0x00002000 +#endif static const _stp_val_array const _stp_irq_list[] = { V(IRQF_DISABLED), V(IRQF_SAMPLE_RANDOM), -- cgit From f9a0679356e44ff13347a4d810017e0a69850e03 Mon Sep 17 00:00:00 2001 From: Mark Wielaard Date: Mon, 16 Nov 2009 11:56:38 +0100 Subject: Add documentation for ansi.stp tapset. * tapset/ansi.stp: Add documentation for every function. * doc/SystemTap_Tapset_Reference/tapsets.tmpl: Add chapter on ansi. --- tapset/ansi.stp | 94 ++++++++++++++++++++++++++++++++++++++++++++++++--------- 1 file changed, 79 insertions(+), 15 deletions(-) (limited to 'tapset') diff --git a/tapset/ansi.stp b/tapset/ansi.stp index 0152fb37..ea5376ae 100644 --- a/tapset/ansi.stp +++ b/tapset/ansi.stp @@ -9,62 +9,126 @@ # Reference: http://en.wikipedia.org/wiki/ANSI_escape_code # +/** + * sfunction ansi_clear_screen - Move cursor to top left and clear screen. + * + * Description: Sends ansi code for moving cursor to top left and then the + * ansi code for clearing the screen from the cursor position to the end. + **/ function ansi_clear_screen() { print("\033[1;1H\033[J") } -# Foreground colors | Background colors -# Black 30 | Black 40 -# Blue 34 | Red 41 -# Green 32 | Green 42 -# Cyan 36 | Yellow 43 -# Red 31 | Blue 44 -# Purple 35 | Magenta 45 -# Brown 33 | Cyan 46 -# Light Gray 37 | White 47 +/** + * sfunction ansi_set_color - Set the ansi Select Graphic Rendition mode. + * @fg: Foreground color to set. + * + * Description: Sends ansi code for Select Graphic Rendition mode for the + * given forground color. Black (30), Blue (34), Green (32), Cyan (36), + * Red (31), Purple (35), Brown (33), Light Gray (37). + */ function ansi_set_color(fg:long) { printf("\033[%dm", fg) } +/** + * sfunction ansi_set_color2 - Set the ansi Select Graphic Rendition mode. + * @fg: Foreground color to set. + * @bg: Background color to set. + * + * Description: Sends ansi code for Select Graphic Rendition mode for the + * given forground color, Black (30), Blue (34), Green (32), Cyan (36), + * Red (31), Purple (35), Brown (33), Light Gray (37) and the given + * background color, Black (40), Red (41), Green (42), Yellow (43), + * Blue (44), Magenta (45), Cyan (46), White (47). + */ function ansi_set_color2(fg:long, bg:long) { printf("\033[%d;%dm", bg, fg) } -# All attributes off 0 -# Intensity: Bold 1 -# Underline: Single 4 -# Blink: Slow 5 -# Blink: Rapid 6 -# Image: Negative 7 +/** + * sfunction ansi_set_color3 - Set the ansi Select Graphic Rendition mode. + * @fg: Foreground color to set. + * @bg: Background color to set. + * @attr: Color attribute to set. + * + * Description: Sends ansi code for Select Graphic Rendition mode for the + * given forground color, Black (30), Blue (34), Green (32), Cyan (36), + * Red (31), Purple (35), Brown (33), Light Gray (37), the given + * background color, Black (40), Red (41), Green (42), Yellow (43), + * Blue (44), Magenta (45), Cyan (46), White (47) and the color attribute + * All attributes off (0), Intensity Bold (1), Underline Single (4), + * Blink Slow (5), Blink Rapid (6), Image Negative (7). + */ function ansi_set_color3(fg:long, bg:long, attr:long) { attr_str = attr ? sprintf(";%dm", attr) : "m" printf("\033[%d;%d%s", bg, fg, attr_str) } +/** + * sfunction ansi_reset_color - Resets Select Graphic Rendition mode. + * + * Description: Sends ansi code to reset foreground, background and color + * attribute to default values. + */ function ansi_reset_color() { ansi_set_color3(0, 0, 0) } +/** + * sfunction ansi_new_line - Move cursor to new line. + * + * Description: Sends ansi code new line. + */ function ansi_new_line() { printf("\12") } +/** + * sfunction ansi_cursor_move - Move cursor to new coordinates. + * @x: Row to move the cursor to. + * @y: Colomn to move the cursor to. + * + * Description: Sends ansi code for positioning the cursor at row x + * and column y. Coordinates start at one, (1,1) is the top-left corner. + */ function ansi_cursor_move(x:long, y:long) { printf("\033[%d;%dH", y, x) } +/** + * sfunction ansi_cursor_hide - Hides the cursor. + * + * Description: Sends ansi code for hiding the cursor. + */ function ansi_cursor_hide() { print("\033[>5I") } +/** + * sfunction ansi_cursor_saves - Saves the cursor position. + * + * Description: Sends ansi code for saving the current cursor position. + */ function ansi_cursor_save() { print("\033[s") } +/** + * sfunction ansi_cursor_saves - Restores a previously saved cursor position. + * + * Description: Sends ansi code for restoring the current cursor position + * previously saved with ansi_cursor_save(). + */ function ansi_cursor_restore() { print("\033[u") } +/** + * sfunction ansi_cursor_show - Shows the cursor. + * + * Description: Sends ansi code for showing the cursor. + */ function ansi_cursor_show() { print("\033[>5h") } -- cgit From 1bc3d8e1a940e67d8e0e3f9a04cfc53d8bced85e Mon Sep 17 00:00:00 2001 From: David Smith Date: Mon, 16 Nov 2009 12:58:46 -0600 Subject: PR 5150 partial fix. Support nfs_write_begin()/nfs_write_end(). * tapset/nfs.stp: Added support for nfs_write_begin()/nfs_write_end(), which replaced nfs_prepare_write()/nfs_commit_write(). --- tapset/nfs.stp | 80 +++++++++++++++++++++++++++++++++++++++++++++++++++++++--- 1 file changed, 76 insertions(+), 4 deletions(-) (limited to 'tapset') diff --git a/tapset/nfs.stp b/tapset/nfs.stp index 6b7d5eeb..7d0ebc35 100644 --- a/tapset/nfs.stp +++ b/tapset/nfs.stp @@ -816,8 +816,8 @@ probe nfs.aop.entries = nfs.aop.readpage, nfs.aop.writepage, nfs.aop.writepages, nfs.aop.release_page ?, - nfs.aop.prepare_write, - nfs.aop.commit_write + nfs.aop.__write_begin_func, + nfs.aop.__write_end_func { } @@ -826,8 +826,8 @@ probe nfs.aop.return = nfs.aop.readpage.return, nfs.aop.writepage.return, nfs.aop.writepages.return, nfs.aop.release_page.return ?, - nfs.aop.prepare_write.return, - nfs.aop.commit_write.return + nfs.aop.__write_begin_func.return, + nfs.aop.__write_end_func.return { } @@ -1064,6 +1064,78 @@ probe nfs.aop.writepages.return = kernel.function ("nfs_writepages").return !, retstr = sprintf("%d", $return) } +# kernel commit 4899f9c852564ce7b6d0ca932ac6674bf471fd28 removed +# nfs_prepare_write()/nfs_commit_write() and created +# nfs_write_begin()/nfs_write_end(). So, we try to find whatever the +# current kernel has. + +probe nfs.aop.__write_begin_func = nfs.aop.write_begin !, + nfs.aop.prepare_write +{ +} +probe nfs.aop.__write_begin_func.return + = nfs.aop.write_begin.return !, + nfs.aop.prepare_write.return +{ +} + +probe nfs.aop.__write_end_func = nfs.aop.write_end !, + nfs.aop.commit_write +{ +} +probe nfs.aop.__write_end_func.return + = nfs.aop.write_end.return !, + nfs.aop.commit_write.return +{ +} + +probe nfs.aop.write_begin = kernel.function ("nfs_write_begin") !, + module("nfs").function("nfs_write_begin") +{ + dev = __file_dev($file) + ino = __file_ino($file) + s_id = __file_id($file) + devname = kernel_string(s_id) + + pos = $pos + count = $len + + name = "nfs.aop.write_begin" + argstr = sprintf("%d", ino) + + units = "bytes" +} +probe nfs.aop.write_begin.return + = kernel.function ("nfs_write_begin").return !, + module("nfs").function ("nfs_write_begin").return +{ + name = "nfs.aop.write_begin.return" + retstr = sprintf("%d", $return) +} + +probe nfs.aop.write_end = kernel.function ("nfs_write_end") !, + module("nfs").function("nfs_write_end") +{ + dev = __file_dev($file) + ino = __file_ino($file) + s_id = __file_id($file) + devname = kernel_string(s_id) + + pos = $pos + count = $len + + name = "nfs.aop.write_end" + argstr = sprintf("%d", ino) + + units = "bytes" +} +probe nfs.aop.write_end.return = kernel.function ("nfs_write_end").return !, + module("nfs").function("nfs_write_end").return +{ + name = "nfs.aop.write_end.return" + retstr = sprintf("%d", $return) +} + /* probe nfs.aop.prepare_write * Fires when do write operation on nfs. * Prepare a page for writing -- cgit From e7c84665f79fd944371c2c49e57189ed1f6cee6d Mon Sep 17 00:00:00 2001 From: David Smith Date: Mon, 16 Nov 2009 15:53:33 -0600 Subject: PR 5150 partial fixes. Added support for nfs_file_fsync. * tapset/nfs.stp(nfs.fop.fsync): Added support for nfs_file_fsync. (nfs.fop.fsync.return): Ditto. (nfs.aop.readpages.return): Fixed 'size' bug. (nfs.aop.write_begin): Renamed to make 'nfs.*.*' probes work correctly. (nfs.aop.write_end): Ditto. (__nfs.aop.write_begin): Ditto. (__nfs.aop.write_end): Ditto. (__nfs.aop.prepare_write): Ditto. (__nfs.aop.commit_write): Ditto. (nfs.fop.aio_read.return): Always sets 'units'. (nfs.fop.aio_write.return): Ditto. (nfs.fop.sendfile.return): Ditto. --- tapset/nfs.stp | 77 ++++++++++++++++++++++++++++++---------------------------- 1 file changed, 40 insertions(+), 37 deletions(-) (limited to 'tapset') diff --git a/tapset/nfs.stp b/tapset/nfs.stp index 7d0ebc35..50bdc087 100644 --- a/tapset/nfs.stp +++ b/tapset/nfs.stp @@ -450,8 +450,8 @@ probe nfs.fop.aio_read.return = kernel.function ("nfs_file_read").return !, if ($return > 0) { size = $return - units = "bytes" } + units = "bytes" } /* probe nfs.fop.aio_write @@ -503,8 +503,8 @@ probe nfs.fop.aio_write.return = kernel.function("nfs_file_write").return !, if ($return > 0) { size = $return - units = "bytes" } + units = "bytes" } /* probe nfs.fop.mmap @@ -669,7 +669,9 @@ probe nfs.fop.release.return = kernel.function("nfs_file_release").return !, * ino : inode number * ndirty : number of dirty pages */ -probe nfs.fop.fsync = kernel.function("nfs_fsync") !, +probe nfs.fop.fsync = kernel.function("nfs_file_fsync") !, + module("nfs").function("nfs_file_fsync") !, + kernel.function("nfs_fsync") !, module("nfs").function("nfs_fsync") { dev = __file_dev($file) @@ -683,7 +685,9 @@ probe nfs.fop.fsync = kernel.function("nfs_fsync") !, argstr = sprintf("%d", ino) } -probe nfs.fop.fsync.return = kernel.function("nfs_fsync").return !, +probe nfs.fop.fsync.return = kernel.function("nfs_file_fsync").return !, + module("nfs").function("nfs_file_fsync").return !, + kernel.function("nfs_fsync").return !, module("nfs").function("nfs_fsync").return { name = "nfs.fop.fsync.return" @@ -782,8 +786,8 @@ probe nfs.fop.sendfile.return = kernel.function("nfs_file_sendfile").return !, if ($return > 0) { size = $return - units = "bytes" } + units = "bytes" } %) @@ -816,8 +820,8 @@ probe nfs.aop.entries = nfs.aop.readpage, nfs.aop.writepage, nfs.aop.writepages, nfs.aop.release_page ?, - nfs.aop.__write_begin_func, - nfs.aop.__write_end_func + nfs.aop.write_begin, + nfs.aop.write_end { } @@ -826,8 +830,8 @@ probe nfs.aop.return = nfs.aop.readpage.return, nfs.aop.writepage.return, nfs.aop.writepages.return, nfs.aop.release_page.return ?, - nfs.aop.__write_begin_func.return, - nfs.aop.__write_end_func.return + nfs.aop.write_begin.return, + nfs.aop.write_end.return { } @@ -922,9 +926,8 @@ probe nfs.aop.readpages.return = kernel.function ("nfs_readpages").return !, name = "nfs.aop.readpages.return" retstr = sprintf("%d", $return) - if ($return > 0 ) - { - size = retstr + if ($return > 0 ) { + size = $return } units = "pages" } @@ -1069,28 +1072,28 @@ probe nfs.aop.writepages.return = kernel.function ("nfs_writepages").return !, # nfs_write_begin()/nfs_write_end(). So, we try to find whatever the # current kernel has. -probe nfs.aop.__write_begin_func = nfs.aop.write_begin !, - nfs.aop.prepare_write +probe nfs.aop.write_begin = __nfs.aop.write_begin !, + __nfs.aop.prepare_write { } -probe nfs.aop.__write_begin_func.return - = nfs.aop.write_begin.return !, - nfs.aop.prepare_write.return +probe nfs.aop.write_begin.return + = __nfs.aop.write_begin.return !, + __nfs.aop.prepare_write.return { } -probe nfs.aop.__write_end_func = nfs.aop.write_end !, - nfs.aop.commit_write +probe nfs.aop.write_end = __nfs.aop.write_end !, + __nfs.aop.commit_write { } -probe nfs.aop.__write_end_func.return - = nfs.aop.write_end.return !, - nfs.aop.commit_write.return +probe nfs.aop.write_end.return + = __nfs.aop.write_end.return !, + __nfs.aop.commit_write.return { } -probe nfs.aop.write_begin = kernel.function ("nfs_write_begin") !, - module("nfs").function("nfs_write_begin") +probe __nfs.aop.write_begin = kernel.function ("nfs_write_begin") !, + module("nfs").function("nfs_write_begin") { dev = __file_dev($file) ino = __file_ino($file) @@ -1105,7 +1108,7 @@ probe nfs.aop.write_begin = kernel.function ("nfs_write_begin") !, units = "bytes" } -probe nfs.aop.write_begin.return +probe __nfs.aop.write_begin.return = kernel.function ("nfs_write_begin").return !, module("nfs").function ("nfs_write_begin").return { @@ -1113,8 +1116,8 @@ probe nfs.aop.write_begin.return retstr = sprintf("%d", $return) } -probe nfs.aop.write_end = kernel.function ("nfs_write_end") !, - module("nfs").function("nfs_write_end") +probe __nfs.aop.write_end = kernel.function ("nfs_write_end") !, + module("nfs").function("nfs_write_end") { dev = __file_dev($file) ino = __file_ino($file) @@ -1129,8 +1132,9 @@ probe nfs.aop.write_end = kernel.function ("nfs_write_end") !, units = "bytes" } -probe nfs.aop.write_end.return = kernel.function ("nfs_write_end").return !, - module("nfs").function("nfs_write_end").return +probe __nfs.aop.write_end.return + = kernel.function ("nfs_write_end").return !, + module("nfs").function("nfs_write_end").return { name = "nfs.aop.write_end.return" retstr = sprintf("%d", $return) @@ -1156,8 +1160,8 @@ probe nfs.aop.write_end.return = kernel.function ("nfs_write_end").return !, * in the page frame * size : write bytes */ -probe nfs.aop.prepare_write = kernel.function ("nfs_prepare_write") !, - module("nfs").function ("nfs_prepare_write") +probe __nfs.aop.prepare_write = kernel.function ("nfs_prepare_write") !, + module("nfs").function ("nfs_prepare_write") { __page = $page dev = __page_dev(__page) @@ -1176,7 +1180,7 @@ probe nfs.aop.prepare_write = kernel.function ("nfs_prepare_write") !, units = "bytes" } -probe nfs.aop.prepare_write.return = +probe __nfs.aop.prepare_write.return = kernel.function ("nfs_prepare_write").return !, module("nfs").function ("nfs_prepare_write").return { @@ -1204,16 +1208,15 @@ probe nfs.aop.prepare_write.return = * in the page frame * size : write bytes */ -probe nfs.aop.commit_write = kernel.function ("nfs_commit_write") !, - module("nfs").function ("nfs_commit_write") +probe __nfs.aop.commit_write = kernel.function ("nfs_commit_write") !, + module("nfs").function ("nfs_commit_write") { - __page = $page + __page = $page dev = __page_dev(__page) ino = __page_ino(__page) offset = $offset to = $to - i_flag = __p2i_flag($page) i_size = __p2i_size($page) @@ -1229,7 +1232,7 @@ probe nfs.aop.commit_write = kernel.function ("nfs_commit_write") !, units = "bytes" } -probe nfs.aop.commit_write.return = +probe __nfs.aop.commit_write.return = kernel.function ("nfs_commit_write").return !, module("nfs").function ("nfs_commit_write").return { -- cgit From 9fdaa114d043b284dd51d545ee2bfaec6d33857b Mon Sep 17 00:00:00 2001 From: David Smith Date: Tue, 17 Nov 2009 12:52:35 -0600 Subject: PR 10974 fix. Fixed aux_syscalls.stp for RHEL5. * tapset/aux_syscalls.stp: Only define entries for IRQF_NOBALANCING/IRQF_IRQPOLL if they exist. --- tapset/aux_syscalls.stp | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'tapset') diff --git a/tapset/aux_syscalls.stp b/tapset/aux_syscalls.stp index 5435d3aa..7dac038d 100644 --- a/tapset/aux_syscalls.stp +++ b/tapset/aux_syscalls.stp @@ -1910,8 +1910,12 @@ static const _stp_val_array const _stp_irq_list[] = { V(IRQF_PROBE_SHARED), V(IRQF_TIMER), V(IRQF_PERCPU), +#ifdef IRQF_NOBALANCING V(IRQF_NOBALANCING), +#endif +#ifdef IRQF_IRQPOLL V(IRQF_IRQPOLL), +#endif V(IRQF_ONESHOT), {0, NULL} }; -- cgit From 0e357e42f614362b37c0b55a840eb585b04b311c Mon Sep 17 00:00:00 2001 From: David Smith Date: Tue, 17 Nov 2009 13:50:03 -0600 Subject: Fixed aux_syscalls.stp for RHEL4. * tapset/aux_syscalls.stp: Only define entries for IRQF_* flags if they exist. --- tapset/aux_syscalls.stp | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'tapset') diff --git a/tapset/aux_syscalls.stp b/tapset/aux_syscalls.stp index 7dac038d..6e45e8e1 100644 --- a/tapset/aux_syscalls.stp +++ b/tapset/aux_syscalls.stp @@ -1904,12 +1904,24 @@ function _struct_sigaction32_u:string(uaddr:long) #define IRQF_ONESHOT 0x00002000 #endif static const _stp_val_array const _stp_irq_list[] = { +#ifdef IRQF_DISABLED V(IRQF_DISABLED), +#endif +#ifdef IRQF_SAMPLE_RANDOM V(IRQF_SAMPLE_RANDOM), +#endif +#ifdef IRQF_SHARED V(IRQF_SHARED), +#endif +#ifdef IRQF_PROBE_SHARED V(IRQF_PROBE_SHARED), +#endif +#ifdef IRQF_TIMER V(IRQF_TIMER), +#endif +#ifdef IRQF_PERCPU V(IRQF_PERCPU), +#endif #ifdef IRQF_NOBALANCING V(IRQF_NOBALANCING), #endif -- cgit From 4d598c650a430fa16af5cfd9202d63931823b547 Mon Sep 17 00:00:00 2001 From: Mark Wielaard Date: Tue, 17 Nov 2009 23:41:31 +0100 Subject: Document is_return(), module_name() and stp_pid() context tapset functions. --- tapset/context.stp | 33 ++++++++++++++++++--------------- 1 file changed, 18 insertions(+), 15 deletions(-) (limited to 'tapset') diff --git a/tapset/context.stp b/tapset/context.stp index 14128589..36701e6e 100644 --- a/tapset/context.stp +++ b/tapset/context.stp @@ -210,7 +210,12 @@ function user_mode:long () %{ /* pure */ /* unprivileged */ } %} - +/** + * sfunction is_return - Whether the current probe context is a return probe. + * + * Description: Returns 1 if the current probe context is a return probe, + * returns 0 otherwise. + */ function is_return:long () %{ /* pure */ if (CONTEXT->pi) THIS->__retvalue = 1; @@ -225,24 +230,22 @@ function target:long () %{ /* pure */ /* unprivileged */ THIS->__retvalue = _stp_target; %} -/// -/// module_name:string() -/// module_name -/// -/// FIXME: need description. -/// -/// +/** + * sfunction module_name - The module name of the current script. + * + * Returns the name of the stap module. Either generated randomly + * (stap_[0-9a-f]+_[0-9a-f]+) or set by stap -m . + */ function module_name:string () %{ /* pure */ /* unprivileged */ strlcpy(THIS->__retvalue, THIS_MODULE->name, MAXSTRINGLEN); %} -/// -/// stp_pid:long() -/// stp_pid -/// -/// FIXME: need description. -/// -/// +/** + * sfunction stp_pid - The process id of the stapio process. + * + * Returns the process id of the stapio process that launched + * this script. + */ function stp_pid:long () %{ /* pure */ THIS->__retvalue = _stp_pid; %} -- cgit From f2107354d0a07d8f1d3bb3e97920ba557ebe7855 Mon Sep 17 00:00:00 2001 From: David Smith Date: Wed, 18 Nov 2009 10:59:37 -0600 Subject: PR 5150. Fixed nfs tapset by making probes optional. * tapset/nfs_proc.stp: Made 'nfs.proc.read', 'nfs.proc.write', and 'nfs.proc.commit' optional for newer kernels without those functions. * testsuite/systemtap.pass1-4/buildok.exp: Expect nfs-all-probes.stp to pass. --- tapset/nfs_proc.stp | 52 ++++++++++++++++++++++++++++++---------------------- 1 file changed, 30 insertions(+), 22 deletions(-) (limited to 'tapset') diff --git a/tapset/nfs_proc.stp b/tapset/nfs_proc.stp index 502091b4..afd5328b 100644 --- a/tapset/nfs_proc.stp +++ b/tapset/nfs_proc.stp @@ -207,9 +207,9 @@ function __getfh_inode :long(dir:long) %{ /* pure */ THIS->__retvalue =(long) fh; %} probe nfs.proc.entries = nfs.proc.lookup, - nfs.proc.read, - nfs.proc.write, - nfs.proc.commit, + nfs.proc.read ?, + nfs.proc.write ?, + nfs.proc.commit ?, nfs.proc.read_setup, nfs.proc.write_setup, nfs.proc.commit_setup, @@ -226,9 +226,9 @@ probe nfs.proc.entries = nfs.proc.lookup, probe nfs.proc.return = nfs.proc.lookup.return, - nfs.proc.read.return, - nfs.proc.write.return, - nfs.proc.commit.return, + nfs.proc.read.return ?, + nfs.proc.write.return ?, + nfs.proc.commit.return ?, nfs.proc.read_setup.return, nfs.proc.write_setup.return, nfs.proc.commit_setup.return, @@ -355,16 +355,18 @@ probe nfs.proc4.lookup.return = kernel.function("nfs4_proc_lookup").return!, * count : read bytes in this execution * offset : the file offset * +* All the nfs.proc.read kernel functions were removed in kernel commit +* 8e0969, so these probes are optional. */ -probe nfs.proc.read = nfs.proc2.read , - nfs.proc3.read , - nfs.proc4.read +probe nfs.proc.read = nfs.proc2.read ?, + nfs.proc3.read ?, + nfs.proc4.read ? {} -probe nfs.proc.read.return = nfs.proc2.read.return , - nfs.proc3.read.return , - nfs.proc4.read.return +probe nfs.proc.read.return = nfs.proc2.read.return ?, + nfs.proc3.read.return ?, + nfs.proc4.read.return ? { } @@ -464,17 +466,20 @@ probe nfs.proc4.read.return = kernel.function("nfs4_proc_read").return !, * bitmask0: * bitmask1 :V4 bitmask representing the set of attributes * supported on this filesystem (only in probe nfs.proc4.write) +* +* All the nfs.proc.write kernel functions were removed in kernel commit +* 200baa, so these probes are optional. */ -probe nfs.proc.write = nfs.proc2.write , - nfs.proc3.write , - nfs.proc4.write +probe nfs.proc.write = nfs.proc2.write ?, + nfs.proc3.write ?, + nfs.proc4.write ? {} -probe nfs.proc.write.return = nfs.proc2.write.return , - nfs.proc3.write.return , - nfs.proc4.write.return +probe nfs.proc.write.return = nfs.proc2.write.return ?, + nfs.proc3.write.return ?, + nfs.proc4.write.return ? {} probe nfs.proc2.write = kernel.function("nfs_proc_write")!, @@ -598,13 +603,16 @@ probe nfs.proc4.write.return = kernel.function("nfs4_proc_write").return !, * bitmask0: * bitmask1 :V4 bitmask representing the set of attributes * supported on this filesystem (only in probe nfs.proc4.commit) +* +* All the nfs.proc.commit kernel functions were removed in kernel +* commit 200baa, so these probes are optional. */ -probe nfs.proc.commit = nfs.proc3.commit, - nfs.proc4.commit +probe nfs.proc.commit = nfs.proc3.commit ?, + nfs.proc4.commit ? {} -probe nfs.proc.commit.return = nfs.proc3.commit.return, - nfs.proc4.commit.return +probe nfs.proc.commit.return = nfs.proc3.commit.return ?, + nfs.proc4.commit.return ? {} // XXX: on kernels > 2.6.18 (?), module("nfs") -> module("nfsd") and -- cgit From 02a2d6ca6f9120cc39cc1eb5ffe089b88dd4d818 Mon Sep 17 00:00:00 2001 From: David Smith Date: Wed, 18 Nov 2009 12:53:50 -0600 Subject: PR 10981. Fixed buildok/netdev.stp for RHEL5. * tapset/networking.stp: Made 'netdev.change_rx_flag' and 'netdev.get_stats' optional, since those functions don't exist on RHEL5. * testsuite/buildok/netdev.stp: Ditto. --- tapset/networking.stp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'tapset') diff --git a/tapset/networking.stp b/tapset/networking.stp index e9ea35dc..e1c5ed1f 100644 --- a/tapset/networking.stp +++ b/tapset/networking.stp @@ -154,7 +154,7 @@ probe netdev.rx * @flags: The new flags */ probe netdev.change_rx_flag - = kernel.function("dev_change_rx_flags") + = kernel.function("dev_change_rx_flags") ? { dev_name = get_netdev_name($dev) flags = $flags @@ -217,7 +217,7 @@ probe netdev.unregister * @dev_name: The device that is going to provide the statistics */ probe netdev.get_stats - = kernel.function("dev_get_stats") + = kernel.function("dev_get_stats") ? { dev_name = get_netdev_name($dev) } -- cgit From 4eea0069b8b677657dcfea3effa2f342d0e5d27f Mon Sep 17 00:00:00 2001 From: Prerna Saxena Date: Sun, 22 Nov 2009 23:40:39 +0530 Subject: Added tracepoint-based probes to block IO and IO scheduler tapsets. Added testcases for these probes. Also, modified comments in ioblock.stp so that tapset docmentation can be automatically generated for this tapset. --- tapset/ioblock.stp | 221 ++++++++++++++++++++++++++++++++++++++----------- tapset/ioscheduler.stp | 191 +++++++++++++++++++++++++++++++++++++++++- 2 files changed, 362 insertions(+), 50 deletions(-) (limited to 'tapset') diff --git a/tapset/ioblock.stp b/tapset/ioblock.stp index bc64c425..1bc06699 100644 --- a/tapset/ioblock.stp +++ b/tapset/ioblock.stp @@ -78,18 +78,13 @@ function __bio_devname:string(bio:long) global BIO_READ = 0, BIO_WRITE = 1 -/* probe ioblock.request +/** + * probe ioblock.request - Fires whenever making a generic block I/O request. * - * Fires whenever making a generic block I/O request. - * - * Context: - * The process makes block I/O request - * - * Variables: - * devname - block device name - * ino - i-node number of the mapped file - * sector - beginning sector for the entire bio - * flags - see below + * @devname - block device name + * @ino - i-node number of the mapped file + * @sector - beginning sector for the entire bio + * @flags - see below * BIO_UPTODATE 0 ok after I/O completion * BIO_RW_BLOCK 1 RW_AHEAD set, and read/write would block * BIO_EOF 2 out-out-bounds error @@ -99,20 +94,18 @@ global BIO_READ = 0, BIO_WRITE = 1 * BIO_USER_MAPPED 6 contains user pages * BIO_EOPNOTSUPP 7 not supported * - * rw - binary trace for read/write request - * vcnt - bio vector count which represents number of array element (page, - * offset, length) which make up this I/O request - * idx - offset into the bio vector array - * phys_segments - number of segments in this bio after physical address - * coalescing is performed. - * hw_segments - number of segments after physical and DMA remapping - * hardware coalescing is performed - * size - total size in bytes - * bdev - target block device - * bdev_contains - points to the device object which contains the - * partition (when bio structure represents a partition) - * p_start_sect - points to the start sector of the partition - * structure of the device + * @rw - binary trace for read/write request + * @vcnt - bio vector count which represents number of array element (page, offset, length) which make up this I/O request + * @idx - offset into the bio vector array + * @phys_segments - number of segments in this bio after physical address coalescing is performed + * @hw_segments - number of segments after physical and DMA remapping hardware coalescing is performed + * @size - total size in bytes + * @bdev - target block device + * @bdev_contains - points to the device object which contains the partition (when bio structure represents a partition) + * @p_start_sect - points to the start sector of the partition structure of the device + * + * Context: + * The process makes block I/O request */ probe ioblock.request = kernel.function ("generic_make_request") { @@ -135,19 +128,14 @@ probe ioblock.request = kernel.function ("generic_make_request") p_start_sect = __bio_start_sect($bio) } -/* probe ioblock.end - * - * Fires whenever a block I/O transfer is complete. - * - * Context: - * The process signals the transfer is done. +/** + * probe ioblock.end - Fires whenever a block I/O transfer is complete. * - * Variables: - * devname - block device name - * ino - i-node number of the mapped file - * byte_done - number of bytes transferred - * sector - beginning sector for the entire bio - * flags - see below + * @devname - block device name + * @ino - i-node number of the mapped file + * @bytes_done - number of bytes transferred + * @sector - beginning sector for the entire bio + * @flags - see below * BIO_UPTODATE 0 ok after I/O completion * BIO_RW_BLOCK 1 RW_AHEAD set, and read/write would block * BIO_EOF 2 out-out-bounds error @@ -156,16 +144,16 @@ probe ioblock.request = kernel.function ("generic_make_request") * BIO_BOUNCED 5 bio is a bounce bio * BIO_USER_MAPPED 6 contains user pages * BIO_EOPNOTSUPP 7 not supported - * error - 0 on success - * rw - binary trace for read/write request - * vcnt - bio vector count which represents number of array element (page, - * offset, length) which makes up this I/O request - * idx - offset into the bio vector array - * phys_segments - number of segments in this bio after physical address - * coalescing is performed. - * hw_segments - number of segments after physical and DMA remapping - * hardware coalescing is performed - * size - total size in bytes + * @error - 0 on success + * @rw - binary trace for read/write request + * @vcnt - bio vector count which represents number of array element (page, offset, length) which makes up this I/O request + * @idx - offset into the bio vector array + * @phys_segments - number of segments in this bio after physical address coalescing is performed. + * @hw_segments - number of segments after physical and DMA remapping hardware coalescing is performed + * @size - total size in bytes + * + * Context: + * The process signals the transfer is done. */ probe ioblock.end = kernel.function("bio_endio") { @@ -186,3 +174,142 @@ probe ioblock.end = kernel.function("bio_endio") %) size = $bio->bi_size } + +/** + * probe ioblock_trace.bounce - Fires whenever a buffer bounce is needed for at least one page of a block IO request. + * + * @bio struct bio * + * @q struct request_queue* + * @devname device for which a buffer bounce was needed. + * @ino - i-node number of the mapped file + * @bytes_done - number of bytes transferred + * @sector - beginning sector for the entire bio + * @flags - see below + * BIO_UPTODATE 0 ok after I/O completion + * BIO_RW_BLOCK 1 RW_AHEAD set, and read/write would block + * BIO_EOF 2 out-out-bounds error + * BIO_SEG_VALID 3 nr_hw_seg valid + * BIO_CLONED 4 doesn't own data + * BIO_BOUNCED 5 bio is a bounce bio + * BIO_USER_MAPPED 6 contains user pages + * BIO_EOPNOTSUPP 7 not supported + * @error - 0 on success + * @rw - binary trace for read/write request + * @vcnt - bio vector count which represents number of array element (page, offset, length) which makes up this I/O request + * @idx - offset into the bio vector array + * @phys_segments - number of segments in this bio after physical address coalescing is performed. + * @size - total size in bytes + * + * Context : + * The process creating a block IO request. + */ +probe ioblock_trace.bounce = kernel.trace("block_bio_bounce") +{ + devname = __bio_devname($bio) + ino = __bio_ino($bio) + + bytes_done = $bio->bi_size + sector = $bio->bi_sector + flags = $bio->bi_flags + rw = $bio->bi_rw + vcnt = $bio->bi_vcnt + idx = $bio->bi_idx + phys_segments = $bio->bi_phys_segments + size = $bio->bi_size +} + +/** + * probe ioblock_trace.request - Fires just as a generic block I/O request is created for a bio. + * + * @bio struct bio* for which IO request is to be submitted + * @q struct request_queue* to which the request is to be added + * @devname - block device name + * @ino - i-node number of the mapped file + * @sector - beginning sector for the entire bio + * @flags - see below + * BIO_UPTODATE 0 ok after I/O completion + * BIO_RW_BLOCK 1 RW_AHEAD set, and read/write would block + * BIO_EOF 2 out-out-bounds error + * BIO_SEG_VALID 3 nr_hw_seg valid + * BIO_CLONED 4 doesn't own data + * BIO_BOUNCED 5 bio is a bounce bio + * BIO_USER_MAPPED 6 contains user pages + * BIO_EOPNOTSUPP 7 not supported + * + * @rw - binary trace for read/write request + * @vcnt - bio vector count which represents number of array element (page, offset, length) which make up this I/O request + * @idx - offset into the bio vector array + * @phys_segments - number of segments in this bio after physical address coalescing is performed. + * @size - total size in bytes + * @bdev - target block device + * @bdev_contains - points to the device object which contains the partition (when bio structure represents a partition) + * @p_start_sect - points to the start sector of the partition structure of the device + * + * Context: + * The process makes block I/O request + */ + +probe ioblock_trace.request = kernel.trace("block_bio_queue") +{ + devname = __bio_devname($bio) + ino = __bio_ino($bio) + + bytes_done = $bio->bi_size + error = $error + sector = $bio->bi_sector + flags = $bio->bi_flags + rw = $bio->bi_rw + vcnt = $bio->bi_vcnt + idx = $bio->bi_idx + phys_segments = $bio->bi_phys_segments + size = $bio->bi_size + bdev_contains = $bio->bi_bdev->bd_contains + bdev = $bio->bi_bdev + p_start_sect = __bio_start_sect($bio) +} + +/** + * probe ioblock_trace.end - Fires whenever a block I/O transfer is complete. + * + * @q - request queue on which this bio was queued. + * @devname - block device name + * @ino - i-node number of the mapped file + * @bytes_done - number of bytes transferred + * @sector - beginning sector for the entire bio + * @flags - see below + * BIO_UPTODATE 0 ok after I/O completion + * BIO_RW_BLOCK 1 RW_AHEAD set, and read/write would block + * BIO_EOF 2 out-out-bounds error + * BIO_SEG_VALID 3 nr_hw_seg valid + * BIO_CLONED 4 doesn't own data + * BIO_BOUNCED 5 bio is a bounce bio + * BIO_USER_MAPPED 6 contains user pages + * BIO_EOPNOTSUPP 7 not supported + + * @error - 0 on success + * @rw - binary trace for read/write request + * @vcnt - bio vector count which represents number of array element (page, offset, length) which makes up this I/O request + * @idx - offset into the bio vector array + * @phys_segments - number of segments in this bio after physical address coalescing is performed. + * @size - total size in bytes + * + * Context: + * The process signals the transfer is done. + */ +probe ioblock_trace.end = kernel.trace("block_bio_complete") +{ + q = $q + devname = __bio_devname($bio) + ino = __bio_ino($bio) + + bytes_done = $bio->bi_size + error = $error + + sector = $bio->bi_sector + flags = $bio->bi_flags + rw = $bio->bi_rw + vcnt = $bio->bi_vcnt + idx = $bio->bi_idx + phys_segments = $bio->bi_phys_segments + size = $bio->bi_size +} diff --git a/tapset/ioscheduler.stp b/tapset/ioscheduler.stp index 637e2783..ac271f80 100644 --- a/tapset/ioscheduler.stp +++ b/tapset/ioscheduler.stp @@ -68,22 +68,24 @@ probe ioscheduler.elv_next_request.return } /** - * probe ioscheduler.elv_add_request - A request was added to the request queue + * probe ioscheduler.elv_add_request.kp - kprobe based probe to indicate that a request was added to the request queue * @elevator_name: The type of I/O elevator currently enabled + * @q: pointer to request queue * @req: Address of the request * @req_flags: Request flags * @disk_major: Disk major number of the request * @disk_minor: Disk minor number of the request */ // when a request is added to the request queue -probe ioscheduler.elv_add_request - = kernel.function("__elv_add_request") +probe ioscheduler.elv_add_request.kp + = kernel.function("elv_insert") { %( kernel_v >= "2.6.10" %? elevator_name = kernel_string($q->elevator->elevator_type->elevator_name) %: elevator_name = kernel_string($q->elevator->elevator_name) %) + q = $q if($rq == 0) { disk_major = -1 disk_minor = -1 @@ -142,6 +144,189 @@ probe ioscheduler.elv_completed_request %) } +/** + * probe ioscheduler.elv_add_request.tp : tracepoint based probe to indicate a request is added to the request queue. + * @elevator_name : The type of I/O elevator currently enabled. + * @q : Pointer to request queue. + * @rq : Address of request. + * @rq_flags : Request flags. + * @disk_major : Disk major no of request. + * @disk_minor : Disk minor number of request. + * + */ +probe ioscheduler.elv_add_request.tp + = kernel.trace("block_rq_insert") +{ +q = $q +elevator_name = kernel_string($q->elevator->elevator_type->elevator_name) +rq = $rq + +if ($rq == 0 || $rq->rq_disk ==0) { + disk_major = -1 + disk_minor = -1 +} else { + disk_major = $rq->rq_disk->major + disk_minor = $rq->rq_disk->first_minor +} + +rq_flags = $rq==0? 0:$rq->cmd_flags +} + +/** + * probe ioscheduler.elv_add_request : probe to indicate request is added to the request queue. + * @elevator_name : The type of I/O elevator currently enabled. + * @q : Pointer to request queue. + * @rq : Address of request. + * @rq_flags : Request flags. + * @disk_major : Disk major no of request. + * @disk_minor : Disk minor number of request. + * + */ +probe ioscheduler.elv_add_request = + ioscheduler.elv_add_request.tp !, ioscheduler.elv_add_request.kp +{} + +/** + * probe ioscheduler_trace.elv_completed_request : Fires when a request is + * completed. + * @elevator_name : The type of I/O elevator currently enabled. + * @rq : Address of request. + * @rq_flags : Request flags. + * @disk_major : Disk major no of request. + * @disk_minor : Disk minor number of request. + * + */ +probe ioscheduler_trace.elv_completed_request + = kernel.trace("block_rq_complete") +{ +elevator_name = kernel_string($q->elevator->elevator_type->elevator_name) +rq = $rq + +if ($rq == 0 || $rq->rq_disk ==0) { + disk_major = -1 + disk_minor = -1 +} else { + disk_major = $rq->rq_disk->major + disk_minor = $rq->rq_disk->first_minor +} + +rq_flags = $rq==0? 0:$rq->cmd_flags +} + +/** + * probe ioscheduler_trace.elv_issue_request : Fires when a request is + * scheduled. + * @elevator_name : The type of I/O elevator currently enabled. + * @rq : Address of request. + * @rq_flags : Request flags. + * @disk_major : Disk major no of request. + * @disk_minor : Disk minor number of request. + * + */ +probe ioscheduler_trace.elv_issue_request + = kernel.trace("block_rq_issue") +{ +elevator_name = kernel_string($q->elevator->elevator_type->elevator_name) +rq = $rq + +if ($rq == 0 || $rq->rq_disk ==0) { + disk_major = -1 + disk_minor = -1 +} else { + disk_major = $rq->rq_disk->major + disk_minor = $rq->rq_disk->first_minor +} + +rq_flags = $rq==0? 0:$rq->cmd_flags +} + +/** + * probe ioscheduler_trace.elv_requeue_request : Fires when a request is + * put back on the queue, when the hadware cannot accept more requests. + * @elevator_name : The type of I/O elevator currently enabled. + * @rq : Address of request. + * @rq_flags : Request flags. + * @disk_major : Disk major no of request. + * @disk_minor : Disk minor number of request. + * + */ +probe ioscheduler_trace.elv_requeue_request + = kernel.trace("block_rq_requeue") +{ +elevator_name = kernel_string($q->elevator->elevator_type->elevator_name) +rq = $rq + +if ($rq == 0 || $rq->rq_disk ==0) { + disk_major = -1 + disk_minor = -1 +} else { + disk_major = $rq->rq_disk->major + disk_minor = $rq->rq_disk->first_minor +} + +rq_flags = $rq==0? 0:$rq->cmd_flags +} + +/** + * probe ioscheduler_trace.elv_abort_request : Fires when a request is aborted. + * @elevator_name : The type of I/O elevator currently enabled. + * @rq : Address of request. + * @rq_flags : Request flags. + * @disk_major : Disk major no of request. + * @disk_minor : Disk minor number of request. + * + */ +probe ioscheduler_trace.elv_abort_request + = kernel.trace("block_rq_abort") +{ +elevator_name = kernel_string($q->elevator->elevator_type->elevator_name) +rq = $rq + +if ($rq == 0 || $rq->rq_disk ==0) { + disk_major = -1 + disk_minor = -1 +} else { + disk_major = $rq->rq_disk->major + disk_minor = $rq->rq_disk->first_minor +} + +rq_flags = $rq==0? 0:$rq->cmd_flags +} + +/** + * probe ioscheduler_trace.plug - Fires when a request queue is plugged; + * ie, requests in the queue cannot be serviced by block driver. + * @rq_queue : request queue + * + */ +probe ioscheduler_trace.plug = kernel.trace("block_plug") +{ + rq_queue = $q +} + +/** + * probe ioscheduler_trace.unplug_io - Fires when a request queue is unplugged; + * Either, when number of pending requests in the queue exceeds threshold + * or, upon expiration of timer that was activated when queue was plugged. + * @rq_queue : request queue + * + */ +probe ioscheduler_trace.unplug_io = kernel.trace("block_unplug_io") +{ + rq_queue = $q +} + +/** + * probe ioscheduler_trace.unplug_timer - Fires when unplug timer associated + * with a request queue expires. + * @rq_queue : request queue + * + */ +probe ioscheduler_trace.unplug_timer = kernel.trace("block_unplug_timer") +{ + rq_queue = $q +} + function disk_major_from_request:long(var_q:long) %{ /* pure */ struct request_queue *q = (struct request_queue *)((long)THIS->var_q); -- cgit From b28d67e28087f208ecfd888b4518bb9efb2bf552 Mon Sep 17 00:00:00 2001 From: Wenji Huang Date: Mon, 23 Nov 2009 14:03:33 +0800 Subject: Correct block IO and IO scheduler tapset and test case * tapset/ioblock.stp: Update comment and variables. * testsuite/buildok/ioblock_test.stp: Add parameters. * testsuite/buildok/ioscheduler.stp: Remove redundant parameters. --- tapset/ioblock.stp | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) (limited to 'tapset') diff --git a/tapset/ioblock.stp b/tapset/ioblock.stp index 1bc06699..707fad4c 100644 --- a/tapset/ioblock.stp +++ b/tapset/ioblock.stp @@ -178,8 +178,6 @@ probe ioblock.end = kernel.function("bio_endio") /** * probe ioblock_trace.bounce - Fires whenever a buffer bounce is needed for at least one page of a block IO request. * - * @bio struct bio * - * @q struct request_queue* * @devname device for which a buffer bounce was needed. * @ino - i-node number of the mapped file * @bytes_done - number of bytes transferred @@ -193,7 +191,6 @@ probe ioblock.end = kernel.function("bio_endio") * BIO_BOUNCED 5 bio is a bounce bio * BIO_USER_MAPPED 6 contains user pages * BIO_EOPNOTSUPP 7 not supported - * @error - 0 on success * @rw - binary trace for read/write request * @vcnt - bio vector count which represents number of array element (page, offset, length) which makes up this I/O request * @idx - offset into the bio vector array @@ -221,10 +218,9 @@ probe ioblock_trace.bounce = kernel.trace("block_bio_bounce") /** * probe ioblock_trace.request - Fires just as a generic block I/O request is created for a bio. * - * @bio struct bio* for which IO request is to be submitted - * @q struct request_queue* to which the request is to be added * @devname - block device name * @ino - i-node number of the mapped file + * @bytes_done - number of bytes transferred * @sector - beginning sector for the entire bio * @flags - see below * BIO_UPTODATE 0 ok after I/O completion @@ -255,7 +251,6 @@ probe ioblock_trace.request = kernel.trace("block_bio_queue") ino = __bio_ino($bio) bytes_done = $bio->bi_size - error = $error sector = $bio->bi_sector flags = $bio->bi_flags rw = $bio->bi_rw @@ -286,7 +281,6 @@ probe ioblock_trace.request = kernel.trace("block_bio_queue") * BIO_USER_MAPPED 6 contains user pages * BIO_EOPNOTSUPP 7 not supported - * @error - 0 on success * @rw - binary trace for read/write request * @vcnt - bio vector count which represents number of array element (page, offset, length) which makes up this I/O request * @idx - offset into the bio vector array @@ -303,7 +297,6 @@ probe ioblock_trace.end = kernel.trace("block_bio_complete") ino = __bio_ino($bio) bytes_done = $bio->bi_size - error = $error sector = $bio->bi_sector flags = $bio->bi_flags -- cgit From d58c711f40a92a0013cd62b6e96c4ae1c54fe045 Mon Sep 17 00:00:00 2001 From: William Cohen Date: Mon, 23 Nov 2009 13:30:46 -0500 Subject: Correct tapset/ioscheduler.stp so documentation builds. --- tapset/ioscheduler.stp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'tapset') diff --git a/tapset/ioscheduler.stp b/tapset/ioscheduler.stp index ac271f80..7f26cf23 100644 --- a/tapset/ioscheduler.stp +++ b/tapset/ioscheduler.stp @@ -145,7 +145,7 @@ probe ioscheduler.elv_completed_request } /** - * probe ioscheduler.elv_add_request.tp : tracepoint based probe to indicate a request is added to the request queue. + * probe ioscheduler.elv_add_request.tp - tracepoint based probe to indicate a request is added to the request queue. * @elevator_name : The type of I/O elevator currently enabled. * @q : Pointer to request queue. * @rq : Address of request. @@ -173,7 +173,7 @@ rq_flags = $rq==0? 0:$rq->cmd_flags } /** - * probe ioscheduler.elv_add_request : probe to indicate request is added to the request queue. + * probe ioscheduler.elv_add_request - probe to indicate request is added to the request queue. * @elevator_name : The type of I/O elevator currently enabled. * @q : Pointer to request queue. * @rq : Address of request. @@ -187,7 +187,7 @@ probe ioscheduler.elv_add_request = {} /** - * probe ioscheduler_trace.elv_completed_request : Fires when a request is + * probe ioscheduler_trace.elv_completed_request - Fires when a request is * completed. * @elevator_name : The type of I/O elevator currently enabled. * @rq : Address of request. @@ -214,7 +214,7 @@ rq_flags = $rq==0? 0:$rq->cmd_flags } /** - * probe ioscheduler_trace.elv_issue_request : Fires when a request is + * probe ioscheduler_trace.elv_issue_request - Fires when a request is * scheduled. * @elevator_name : The type of I/O elevator currently enabled. * @rq : Address of request. @@ -241,7 +241,7 @@ rq_flags = $rq==0? 0:$rq->cmd_flags } /** - * probe ioscheduler_trace.elv_requeue_request : Fires when a request is + * probe ioscheduler_trace.elv_requeue_request - Fires when a request is * put back on the queue, when the hadware cannot accept more requests. * @elevator_name : The type of I/O elevator currently enabled. * @rq : Address of request. @@ -268,7 +268,7 @@ rq_flags = $rq==0? 0:$rq->cmd_flags } /** - * probe ioscheduler_trace.elv_abort_request : Fires when a request is aborted. + * probe ioscheduler_trace.elv_abort_request - Fires when a request is aborted. * @elevator_name : The type of I/O elevator currently enabled. * @rq : Address of request. * @rq_flags : Request flags. -- cgit From 18871ad0ed1c0618dc4c2479eadbcf982b72e6cd Mon Sep 17 00:00:00 2001 From: David Smith Date: Mon, 23 Nov 2009 14:13:38 -0600 Subject: Fixed tapset reference manual generation. * doc/SystemTap_Tapset_Reference/Makefile.am: Check for file existence before doing compare. * doc/SystemTap_Tapset_Reference/Makefile.in: Regenerated. * tapset/ioblock.stp: Fixed comment so that docs can be built. --- tapset/ioblock.stp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'tapset') diff --git a/tapset/ioblock.stp b/tapset/ioblock.stp index 707fad4c..761e7df7 100644 --- a/tapset/ioblock.stp +++ b/tapset/ioblock.stp @@ -280,7 +280,7 @@ probe ioblock_trace.request = kernel.trace("block_bio_queue") * BIO_BOUNCED 5 bio is a bounce bio * BIO_USER_MAPPED 6 contains user pages * BIO_EOPNOTSUPP 7 not supported - + * * @rw - binary trace for read/write request * @vcnt - bio vector count which represents number of array element (page, offset, length) which makes up this I/O request * @idx - offset into the bio vector array -- cgit