From e94cb46c2219da504a559d49eeda3e4134b96453 Mon Sep 17 00:00:00 2001 From: hunt Date: Tue, 22 Mar 2005 18:36:50 +0000 Subject: *** empty log message *** --- runtime/docs/html/io_8c.html | 146 +++++++++++++++++++++++++++++-------------- 1 file changed, 99 insertions(+), 47 deletions(-) (limited to 'runtime/docs/html/io_8c.html') diff --git a/runtime/docs/html/io_8c.html b/runtime/docs/html/io_8c.html index 85784820..ca8818d3 100644 --- a/runtime/docs/html/io_8c.html +++ b/runtime/docs/html/io_8c.html @@ -1,17 +1,19 @@ -SystemTap: SystemTap Runtime Library +SystemTap: io.c File Reference -
Intro | Functions | Defines | Enumerations | Enumeration Values
- -

io.c File Reference

+
Main Page | Data Structures | Directories | File List | Data Fields | Globals | Related Pages
+

io.c File Reference

I/O functions. More... +

+

Go to the source code of this file. - + @@ -19,42 +21,34 @@ + + + -

Defines

#define STP_BUF_LEN   8191
+#define STP_BUF_LEN   8191

Functions

void dlog (const char *fmt,...)
 Logs data.
void _stp_print_buf (const char *fmt,...)
 Print into the print buffer.
void _stp_print_buf_init (void)
 Clear the print buffer.
void _stp_print_symbol (const char *fmt, unsigned long address)
 Print addresses symbolically into the print buffer.
unsigned long cur_ret_addr (struct pt_regs *regs)
-


Define Documentation

-

- - - - -
- - - - -
#define STP_BUF_LEN   8191
-
- - - - + + -

+

+ + + + +
-   - +
 Get the current return address.

Variables

static const char *(* _stp_kallsyms_lookup )(unsigned long addr, unsigned long *symbolsize, unsigned long *offset, char **modname, char *namebuf) = (void *)KALLSYMS_LOOKUP
 Lookup symbol.
+static char _stp_pbuf [8191+1]
 Static buffer for printing.
+static int _stp_pbuf_len = 8191
+


Detailed Description

+I/O functions.

-Definition at line 27 of file io.c. +

-Referenced by _stp_print_buf(), and _stp_print_buf_init(). - - -


Function Documentation

+Definition in file io.c.

Function Documentation

@@ -89,13 +83,23 @@ Referenced by _stp_print_buf() +Referenced by _stp_print_symbol().

+Print into the print buffer. +

+Like printf, except output goes into _stp_pbuf, which will contain the null-terminated output. Safe because overflowing _stp_pbuf is not allowed. Size is limited by length of print buffer.

+

Parameters:
+ + +
fmt A variable number of args.
+
+
Note:
Formatting output should never be done within a probe. Use at module exit time.
+
See also:
_stp_print_buf_init

-Definition at line 33 of file io.c. +Definition at line 55 of file io.c.

-References STP_BUF_LEN. +References _stp_pbuf.

-Referenced by _stp_print_symbol().

@@ -123,11 +127,13 @@ Referenced by _stp_print_symbol()<

- +Clear the print buffer. +

+Output from _stp_print_buf() will accumulate in the buffer until this is called.

-Definition at line 45 of file io.c. +Definition at line 72 of file io.c.

-References STP_BUF_LEN. +References _stp_pbuf.

@@ -164,11 +170,20 @@ References STP_BUF_LEN.

+Print addresses symbolically into the print buffer. +

+

Parameters:
+ + + +
fmt A variable number of args.
address The address to lookup.
+
+
Note:
Formatting output should never be done within a probe. Use at module exit time.

-Definition at line 51 of file io.c. +Definition at line 85 of file io.c.

-References _stp_print_buf(). +References _stp_kallsyms_lookup, and _stp_print_buf().

@@ -196,9 +211,18 @@ References _stp_print_buf().

+Get the current return address. +

+Call from kprobes (not jprobes).

Parameters:
+ + +
regs The pt_regs saved by the kprobe.
+
+
Returns:
The return address saved in esp or rsp.
+
Note:
i386 and x86_64 only.

-Definition at line 72 of file io.c. +Definition at line 112 of file io.c.

@@ -245,16 +269,44 @@ This function is compatible with printk. In fact it currently sends all output t

Bug:
Lines are limited in length by printk buffer.

-

Todo:
Needs replaced with something much faster that does not use the system log.
+
Todo:
Needs replaced with something much faster that does not use the system log.

-Definition at line 11 of file io.c. +Definition at line 16 of file io.c. +

+Referenced by _stp_list_clear(), _stp_register_jprobes(), _stp_register_kprobes(), _stp_unregister_jprobes(), and _stp_unregister_kprobes(). + + +


Variable Documentation

+

+ + + + +
+ + + + +
const char*(* _stp_kallsyms_lookup)(unsigned long addr, unsigned long *symbolsize, unsigned long *offset, char **modname, char *namebuf) = (void *)KALLSYMS_LOOKUP [static]
+
+ + + + +Referenced by _stp_print_symbol().
+   + + +

+Lookup symbol. +

+This simply calls the kernel function kallsyms_lookup(). That function is not exported, so this workaround is required. See the kernel source, kernel/kallsyms.c for more information. +

+Definition at line 31 of file io.c.

-Referenced by _stp_list_clear(), _stp_register_jprobes(), _stp_register_kprobes(), _stp_unregister_jprobes(), and _stp_unregister_kprobes().

-


Generated on Mon Mar 21 13:29:45 2005 for SystemTap by  - -doxygen 1.4.1
- +
+Generated on Tue Mar 22 10:27:36 2005 for SystemTap. -- cgit