From e32551b18f4560056d2d482f5e1505b1b98fa82a Mon Sep 17 00:00:00 2001 From: hunt Date: Tue, 29 Mar 2005 18:07:58 +0000 Subject: *** empty log message *** --- runtime/docs/html/io_8c.html | 298 ++----------------------------------------- 1 file changed, 8 insertions(+), 290 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 ca8818d3..3357e2f8 100644 --- a/runtime/docs/html/io_8c.html +++ b/runtime/docs/html/io_8c.html @@ -4,309 +4,27 @@ -
Main Page | Data Structures | Directories | File List | Data Fields | Globals | Related Pages
+
Main Page | Modules | 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. - - - - - - - - - - - - - + - - + + - - - - - - - - - + + +

Defines

-#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)
void dlog (const char *fmt,...)
 Print addresses symbolically into the print buffer.
unsigned long cur_ret_addr (struct pt_regs *regs)
 Logs Data.
void _stp_print (const char *fmt,...)
 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
 Prints to the trace buffer.
void _stp_print_str (char *str)
 Prints to the trace buffer.


Detailed Description

I/O functions.

-Definition in file io.c.


Function Documentation

-

- - - - -
- - - - - - - - - - - - - - - - - - -
void _stp_print_buf const char *  fmt,
  ...
-
- - - - - -
-   - - -

-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 55 of file io.c. -

-References _stp_pbuf. -

-Referenced by _stp_print_symbol().

-

- - - - -
- - - - - - - - - -
void _stp_print_buf_init void   ) 
-
- - - - - -
-   - - -

-Clear the print buffer. -

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

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

-References _stp_pbuf.

-

- - - - -
- - - - - - - - - - - - - - - - - - -
void _stp_print_symbol const char *  fmt,
unsigned long  address
-
- - - - - -
-   - - -

-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 85 of file io.c. -

-References _stp_kallsyms_lookup, and _stp_print_buf().

-

- - - - -
- - - - - - - - - -
unsigned long cur_ret_addr struct pt_regs *  regs  ) 
-
- - - - - -
-   - - -

-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 112 of file io.c.

-

- - - - -
- - - - - - - - - - - - - - - - - - -
void dlog const char *  fmt,
  ...
-
- - - - - -
-   - - -

-Logs data. -

-This function is compatible with printk. In fact it currently sends all output to vprintk, after sending "STP: ". This allows us to easily detect SystemTap output in the log file.

-

Parameters:
- - -
fmt A variable number of args.
-
-
Bug:
Lines are limited in length by printk buffer.
-

-

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

-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]
-
- - - - - -
-   - - -

-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_print_symbol().

-


-Generated on Tue Mar 22 10:27:36 2005 for SystemTap. - +Definition in file io.c. -- cgit