From b9c556e44326b40b2c927a0a5b5626332a8c9587 Mon Sep 17 00:00:00 2001 From: hunt Date: Tue, 22 Mar 2005 08:57:11 +0000 Subject: *** empty log message *** --- runtime/docs/html/io_8c-source.html | 58 ++++++++++++++++++++----------------- 1 file changed, 32 insertions(+), 26 deletions(-) (limited to 'runtime/docs/html/io_8c-source.html') diff --git a/runtime/docs/html/io_8c-source.html b/runtime/docs/html/io_8c-source.html index a152c946..246f36d8 100644 --- a/runtime/docs/html/io_8c-source.html +++ b/runtime/docs/html/io_8c-source.html @@ -1,13 +1,21 @@ -SystemTap: SystemTap Runtime Library +SystemTap: io.c Source File -
Intro | Functions | Defines | Enumerations | Enumeration Values
- -

io.c

Go to the documentation of this file.
00001 
-00011 void dlog (const char *fmt, ...)
+
+

io.c

00001 /** Logs data.
+00002  * This function is compatible with printk.  In fact it currently
+00003  * sends all output to vprintk, after sending "STP: ". This allows
+00004  * us to easily detect SystemTap output in the log file.
+00005  *
+00006  * @param fmt A variable number of args.
+00007  * @bug Lines are limited in length by printk buffer.
+00008  * @todo Needs replaced with something much faster that does not
+00009  * use the system log.
+00010  */
+00011 void dlog (const char *fmt, ...)
 00012 {
 00013   va_list args;
 00014   printk("STP: ");
@@ -23,17 +31,17 @@
 00024                             char **modname, char *namebuf)=(void *)KALLSYMS_LOOKUP;
 00025 
 00026 
-00027 #define STP_BUF_LEN 8191
+00027 #define STP_BUF_LEN 8191
 00028 
 00029 /* FIXME. These need to be per-cpu */
-00030 static char _stp_pbuf[STP_BUF_LEN+1];
-00031 static int _stp_pbuf_len = STP_BUF_LEN;
+00030 static char _stp_pbuf[STP_BUF_LEN+1];
+00031 static int _stp_pbuf_len = STP_BUF_LEN;
 00032 
-00033 void _stp_print_buf (const char *fmt, ...)
+00033 void _stp_print_buf (const char *fmt, ...)
 00034 {
 00035   int num;
 00036   va_list args;
-00037   char *buf = _stp_pbuf + STP_BUF_LEN - _stp_pbuf_len;
+00037   char *buf = _stp_pbuf + STP_BUF_LEN - _stp_pbuf_len;
 00038   va_start(args, fmt);
 00039   num = vscnprintf(buf, _stp_pbuf_len, fmt, args);
 00040   va_end(args);
@@ -41,13 +49,13 @@
 00042     _stp_pbuf_len -= num;
 00043 }
 00044 
-00045 void _stp_print_buf_init (void)
+00045 void _stp_print_buf_init (void)
 00046 {
-00047   _stp_pbuf_len = STP_BUF_LEN;
+00047   _stp_pbuf_len = STP_BUF_LEN;
 00048   _stp_pbuf[0] = 0;
 00049 }
 00050 
-00051 void _stp_print_symbol(const char *fmt, unsigned long address)
+00051 void _stp_print_symbol(const char *fmt, unsigned long address)
 00052 {
 00053         char *modname;
 00054         const char *name;
@@ -57,18 +65,18 @@
 00058         name = _stp_kallsyms_lookup(address, &size, &offset, &modname, namebuf);
 00059 
 00060         if (!name)
-00061                 _stp_print_buf("0x%lx", address);
-00062         else {
+00061                 _stp_print_buf("0x%lx", address);
+00062         else {
 00063           if (modname)
-00064             _stp_print_buf("%s+%#lx/%#lx [%s]", name, offset,
+00064             _stp_print_buf("%s+%#lx/%#lx [%s]", name, offset,
 00065                            size, modname);
-00066           else
-00067             _stp_print_buf("%s+%#lx/%#lx", name, offset, size);
+00066           else
+00067             _stp_print_buf("%s+%#lx/%#lx", name, offset, size);
 00068         }
 00069 }
 00070 
 00071  
-00072 unsigned long cur_ret_addr (struct pt_regs *regs)
+00072 unsigned long cur_ret_addr (struct pt_regs *regs)
 00073 {
 00074 #ifdef __x86_64__
 00075   unsigned long *ra = (unsigned long *)regs->rsp;
@@ -76,12 +84,10 @@
 00077   unsigned long *ra = (unsigned long *)regs->esp;
 00078 #endif
 00079   if (ra)
-00080     return *ra;
-00081   else
-00082     return 0;
+00080     return *ra;
+00081   else
+00082     return 0;
 00083 }
-

Generated on Mon Mar 21 13:29:45 2005 for SystemTap by  - -doxygen 1.4.1
- +

+Generated on Tue Mar 22 00:32:02 2005 for SystemTap. -- cgit