summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ChangeLog13
-rw-r--r--README3
-rw-r--r--doc/SystemTap_Beginners_Guide/en-US/Array-Operations.xml13
-rw-r--r--doc/SystemTap_Beginners_Guide/en-US/Arrays.xml60
-rw-r--r--doc/SystemTap_Beginners_Guide/en-US/Understanding_How_SystemTap_Works.xml2
-rw-r--r--doc/SystemTap_Beginners_Guide/en-US/Useful_SystemTap_Scripts.xml16
-rw-r--r--doc/langref.tex14
-rw-r--r--elaborate.cxx6
-rw-r--r--runtime/ChangeLog6
-rw-r--r--runtime/sduprobes.c8
-rw-r--r--runtime/sduprobes.h39
-rw-r--r--runtime/vsprintf.c43
-rw-r--r--stap.1.in11
-rw-r--r--staptree.cxx8
-rw-r--r--staptree.h3
-rw-r--r--tapsets.cxx4
-rw-r--r--testsuite/ChangeLog4
-rw-r--r--testsuite/systemtap.base/static_uprobes.exp2
-rw-r--r--translate.cxx6
19 files changed, 95 insertions, 166 deletions
diff --git a/ChangeLog b/ChangeLog
index a6bdc72f..dff79be9 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,16 @@
+2008-12-05 Frank Ch. Eigler <fche@elastic.org>
+
+ * tapsets.cxx, translate.cxx: Set default elfutils debuginfo_path
+ to start with "+", to enable debuginfo<->stripped checksum checking.
+ * stap.1.in: Note this.
+
+2008-12-05 Kent Sebastian <ksebasti@redhat.com>
+
+ PR7051
+ * doc/langref.tex, elaborate.cxx, runtime/vsprintf.c,
+ stap.1.in, staptree.cxx, staptree.h, translate.cxx:
+ Remove printf %n directive and references to it in documentation.
+
2008-12-03 Roland McGrath <roland@redhat.com>
PR6925
diff --git a/README b/README
index 2bb0ae79..7c1ab412 100644
--- a/README
+++ b/README
@@ -94,7 +94,8 @@ Tips:
Building a kernel.org kernel:
- Build the kernel using your normal procedures. Enable
- CONFIG_DEBUG_INFO, CONFIG_KPROBES, CONFIG_RELAY and CONFIG_DEBUG_FS.
+ CONFIG_DEBUG_INFO, CONFIG_KPROBES, CONFIG_RELAY, CONFIG_DEBUG_FS,
+ CONFIG_MODULES, CONFIG_MODULES_UNLOAD
- % make modules_install install headers_install
- Boot into the kernel.
diff --git a/doc/SystemTap_Beginners_Guide/en-US/Array-Operations.xml b/doc/SystemTap_Beginners_Guide/en-US/Array-Operations.xml
index c053c329..9c5e5a9f 100644
--- a/doc/SystemTap_Beginners_Guide/en-US/Array-Operations.xml
+++ b/doc/SystemTap_Beginners_Guide/en-US/Array-Operations.xml
@@ -178,7 +178,18 @@ delta = gettimeofday_s() - foo[tid()]
</screen>
</example>
-<para>In <xref linkend="arrayreadingvaluesfrom"/>, the first statement sets a timestamp associated with the returned value of the handler function <command>tid()</command> as a <emphasis>reference point</emphasis>. The second statement computes a value for the variable <command>delta</command> by subtracting the associated value the reference point from the current <command>gettimeofday_s()</command>. Note that the first statement writes the value of <command>gettimeofday_s()</command> into the appropriate key of array <literal>foo</literal>, while in the second statement the value of <command>foo[tid()]</command> is <emphasis>read</emphasis> from the array in order to compute for <literal>delta</literal>.</para>
+<para>
+ In <xref linkend="arrayreadingvaluesfrom"/>, the first statement sets a timestamp associated
+ with the returned value of the handler function <command>tid()</command> as a
+ <emphasis>reference point</emphasis>.
+ The second statement computes a value for the variable
+ <command>delta</command> by subtracting the associated value the reference point from the
+ current <command>gettimeofday_s()</command>. Note that the first statement writes the value
+ of <command>gettimeofday_s()</command> into the appropriate key of array
+ <literal>foo</literal>, while in the second statement the value of
+ <command>foo[tid()]</command> is <emphasis>read</emphasis> from the array in order to compute
+ for <literal>delta</literal>.
+</para>
<indexterm>
<primary>reading values from arrays</primary>
diff --git a/doc/SystemTap_Beginners_Guide/en-US/Arrays.xml b/doc/SystemTap_Beginners_Guide/en-US/Arrays.xml
index fa81d7fc..36423fb4 100644
--- a/doc/SystemTap_Beginners_Guide/en-US/Arrays.xml
+++ b/doc/SystemTap_Beginners_Guide/en-US/Arrays.xml
@@ -13,7 +13,10 @@
<primary>associative arrays</primary>
<secondary>introduction</secondary>
</indexterm>
-<para>SystemTap also supports the use of associative arrays. While an ordinary variable represents a single value, associative arrays can represent a list of values. Simply put, an associative array is a collection of unique keys; each key in the array has a value associated with it. Illustrating this visually would be similar to creating a two-column table: the first column would have the unique key, while the second column would have each key's associated value. Each unique key and its associated value is referred to as a <emphasis>key pair</emphasis>.</para>
+
+<para>SystemTap also supports the use of associative arrays. While an ordinary variable represents a single value, associative arrays can represent a list of values. Simply put, an associative array is a collection of unique keys; each key in the array has a value associated with it.</para>
+
+<!--<para>SystemTap also supports the use of associative arrays. While an ordinary variable represents a single value, associative arrays can represent a list of values. Simply put, an associative array is a collection of unique keys; each key in the array has a value associated with it. Illustrating this visually would be similar to creating a two-column table: the first column would have the unique key, while the second column would have each key's associated value. Each unique key and its associated value is referred to as a <emphasis>key pair</emphasis>.</para>-->
<!-- next 2 indexterms for key pairs -->
@@ -156,62 +159,19 @@ foo["harry"] = 25
</screen>
</example>
-<important>
- <title>Important</title>
- <para>All associate arrays must be declared as <command>global</command>, regardless of whether the associate array is used in one or multiple probes. </para>
-</important>
-
-
-<section id="tuples">
- <title>Array Slots</title>
-<!-- next 2 indexterms for slots -->
-
-<indexterm>
-<primary>arrays</primary>
-<secondary>introduction</secondary>
-<tertiary>slots</tertiary>
-</indexterm>
-
-<indexterm>
-<primary>associative arrays</primary>
-<secondary>introduction</secondary>
-<tertiary>slots</tertiary>
-</indexterm>
-
-<indexterm>
-<primary>slots</primary>
-<secondary>introduction</secondary>
-<tertiary>arrays</tertiary>
-</indexterm>
-<para>Another important point to remember in arrays is that each element therein (i.e. the indexed expression) exists in a <emphasis>slot</emphasis>. A key pair's slot is defined by the order in which each pair's unique key is defined. In our sample array <command>foo</command> in <xref linkend="arraysimplestexample"/>, the key pair that uses the unique key <command>tom</command> is in the first slot, since <command>tom</command> was the first unique key to be defined. <command>dick</command> is in the second slot, and so on.</para>
-
-<!--
-<para>The sequence in which each key pair appears in an array (as defined by each pair's slot) is referred to as a <emphasis>tuple</emphasis>. Tuples allow us to refer to key pairs in an array by the order in which they appear in the sequence.</para>-->
-
-<para>For example, the array statements in <xref linkend="arraysimplestexample"/> set 23 as the associated value of the unique key <command>tom</command>. Given the same array <command>foo</command>, we can increment the associated value of <command>tom</command> by 1 using the operator <command>++</command>, like so:</para>
+<para>You can specify up to 5 index expressons in an array statement, each one delimited by a comma (<command>,</command>). This is useful if you wish to perform the same operation to a set of key pairs. For example, to increase the associated value of all the key pairs defined by <xref linkend="arraysimplestexample"/>, you can use the following statement:</para>
<screen>
-foo["tom"] ++
+foo["tom","dick","harry"] ++
</screen>
-<para>The above statement will increase the associated value of unique key <command>tom</command> to 24. Now, looking back at <xref linkend="arraysimplestexample"/>, we know that <command>dick</command> was the first unique key to be defined. As such, we can perform the same operation (i.e. incrementing associated value by 1) to <command>dick</command> using the following statement:</para>
-
-<screen>
-foo[2] ++
-</screen>
+<important>
+ <title>Important</title>
+ <para>All associate arrays must be declared as <command>global</command>, regardless of whether the associate array is used in one or multiple probes. </para>
+</important>
-<note>
- <title>Note</title>
- <para>You can specify up to 5 index expressons in an array statement, each one delimited by a comma (<command>,</command>). This is useful if you wish to perform the same operation to a set of key pairs. For example, to increase the associated value of all the key pairs defined by <xref linkend="arraysimplestexample"/>, you can use the following statement:</para>
-
-<screen>
-foo["tom",2,"harry"] ++
-</screen>
-</note>
-</section>
-<xi:include href="Array-Operations.xml" xmlns:xi="http://www.w3.org/2001/XInclude" />
<!--
<varlistentry>
<term></term>
diff --git a/doc/SystemTap_Beginners_Guide/en-US/Understanding_How_SystemTap_Works.xml b/doc/SystemTap_Beginners_Guide/en-US/Understanding_How_SystemTap_Works.xml
index 4e63ac4e..4e61e247 100644
--- a/doc/SystemTap_Beginners_Guide/en-US/Understanding_How_SystemTap_Works.xml
+++ b/doc/SystemTap_Beginners_Guide/en-US/Understanding_How_SystemTap_Works.xml
@@ -156,6 +156,8 @@
<xi:include href="Scripts.xml" xmlns:xi="http://www.w3.org/2001/XInclude" />
<xi:include href="ScriptConstructs.xml" xmlns:xi="http://www.w3.org/2001/XInclude" />
<xi:include href="Arrays.xml" xmlns:xi="http://www.w3.org/2001/XInclude" />
+<xi:include href="Array-Operations.xml" xmlns:xi="http://www.w3.org/2001/XInclude" />
+
<!--
<section id="understanding-scripts">
<title>SystemTap Scripts</title>
diff --git a/doc/SystemTap_Beginners_Guide/en-US/Useful_SystemTap_Scripts.xml b/doc/SystemTap_Beginners_Guide/en-US/Useful_SystemTap_Scripts.xml
index 8e089af6..8b7fc741 100644
--- a/doc/SystemTap_Beginners_Guide/en-US/Useful_SystemTap_Scripts.xml
+++ b/doc/SystemTap_Beginners_Guide/en-US/Useful_SystemTap_Scripts.xml
@@ -36,8 +36,12 @@
<remark>case studies and more info on some scripts here - http://sourceware.org/systemtap/wiki/WarStories</remark>
<!-- <xi:include href="Useful_Scripts-Disk.xml" xmlns:xi="http://www.w3.org/2001/XInclude" /> -->
-<xi:include href="Useful_Scripts-futexes.xml" xmlns:xi="http://www.w3.org/2001/XInclude" />
-
+<section id="mainsect-network">
+ <title>Network</title>
+ <para>The following sections showcase scripts that trace network-related functions and build a profile of network activity.</para>
+ <xi:include href="Useful_Scripts-nettop.xml" xmlns:xi="http://www.w3.org/2001/XInclude" />
+ <xi:include href="Useful_Scripts-sockettrace.xml" xmlns:xi="http://www.w3.org/2001/XInclude" />
+</section>
<section id="mainsect-disk">
<title>Disk</title>
<para>The following sections showcase scripts that monitor disk and I/O activity.</para>
@@ -61,12 +65,8 @@
</section>
<!-- removed; handler function no longer working as expected
<xi:include href="Useful_Scripts-kernelprofiling.xml" xmlns:xi="http://www.w3.org/2001/XInclude" /> -->
-<section id="mainsect-network">
- <title>Network</title>
- <para>The following sections showcase scripts that trace network-related functions and build a profile of network activity.</para>
- <xi:include href="Useful_Scripts-nettop.xml" xmlns:xi="http://www.w3.org/2001/XInclude" />
- <xi:include href="Useful_Scripts-sockettrace.xml" xmlns:xi="http://www.w3.org/2001/XInclude" />
-</section>
+
+<xi:include href="Useful_Scripts-futexes.xml" xmlns:xi="http://www.w3.org/2001/XInclude" />
<!-- <xi:include href="Useful_Scripts-Network.xml" xmlns:xi="http://www.w3.org/2001/XInclude" />
<xi:include href="Useful_Scripts-Signals.xml" xmlns:xi="http://www.w3.org/2001/XInclude" />
diff --git a/doc/langref.tex b/doc/langref.tex
index 5db82550..3af2bd15 100644
--- a/doc/langref.tex
+++ b/doc/langref.tex
@@ -1858,16 +1858,10 @@ p&
Pointer address&
0x0000000000bc614e\tabularnewline
\hline
-n&
-Writes a binary value that is the total length of the string written by printf.
-The field width specifies the number of bytes to write. Valid specifications
-are \%n, \%1n, \%2n and \%4n. The default is 2.&
-See below\tabularnewline
-\hline
b&
Writes a binary value as text. The field width specifies the number of bytes
to write. Valid specifications are \%b, \%1b, \%2b, \%4b and \%8b. The default
-width is 4 (32-bits).&
+width is 8 (64-bits).&
See below\tabularnewline
\hline
\%&
@@ -1987,7 +1981,7 @@ Another example:
\begin{vindent}
\begin{verbatim}
-stap -e 'probe begin{printf("%1n%b%b", 0xc0dedbad, \
+stap -e 'probe begin{printf("%b%b", 0xc0dedbad, \
0x12345678);exit()}' | hexdump -C
\end{verbatim}
@@ -1996,8 +1990,8 @@ This prints:
\begin{vindent}
\begin{verbatim}
-00000000 08 ad db de c0 78 56 34 12 |.....xV4.|
-00000009
+00000000 ad db de c0 00 00 00 00 78 56 34 12 00 00 00 00 |........xV4.....|
+00000010
\end{verbatim}
\end{vindent}
Another example:
diff --git a/elaborate.cxx b/elaborate.cxx
index edd4668d..ba1cb79c 100644
--- a/elaborate.cxx
+++ b/elaborate.cxx
@@ -1167,7 +1167,7 @@ void add_global_var_display (systemtap_session& s)
|| vut.written.find (l) == vut.written.end())
continue;
- // Don't generate synthetic end probes for unread globals
+ // Don't generate synthetic end probes for unread globals
// declared only within tapsets. (RHBZ 468139), but rather
// only within the end-user script.
@@ -3902,8 +3902,7 @@ typeresolution_info::visit_print_format (print_format* e)
if (e->components[i].type == print_format::conv_unspecified)
throw semantic_error ("Unspecified conversion in print operator format string",
e->tok);
- else if (e->components[i].type == print_format::conv_literal
- || e->components[i].type == print_format::conv_size)
+ else if (e->components[i].type == print_format::conv_literal)
continue;
components.push_back(e->components[i]);
++expected_num_args;
@@ -3945,7 +3944,6 @@ typeresolution_info::visit_print_format (print_format* e)
{
case print_format::conv_unspecified:
case print_format::conv_literal:
- case print_format::conv_size:
assert (false);
break;
diff --git a/runtime/ChangeLog b/runtime/ChangeLog
index 51d8d933..aaf39a04 100644
--- a/runtime/ChangeLog
+++ b/runtime/ChangeLog
@@ -1,3 +1,9 @@
+2008-12-04 Stan Cox <scox@redhat.com>
+
+ * sduprobes.c (STAP_PROBE_START): Remove.
+ * sduprobes.h (STAP_PROBE_START): Remove.
+ (DTRACE_PROBE): New.
+
2008-11-26 Stan Cox <scox@redhat.com>
* sduprobes.h (STAP_PROBE1): Add USE_STAP_DEBUGINFO_PROBE.
diff --git a/runtime/sduprobes.c b/runtime/sduprobes.c
index 4bee3bd7..83bc8e72 100644
--- a/runtime/sduprobes.c
+++ b/runtime/sduprobes.c
@@ -9,14 +9,6 @@
#include <stddef.h>
#define unused __attribute__ ((unused))
-int _stap_probe_sentinel = 0;
-
-void
-_stap_probe_start()
-{
- _stap_probe_sentinel = 1;
-}
-
int
_stap_probe_0 (char* probe unused)
{
diff --git a/runtime/sduprobes.h b/runtime/sduprobes.h
index 934f19e0..b91dea93 100644
--- a/runtime/sduprobes.h
+++ b/runtime/sduprobes.h
@@ -7,13 +7,6 @@
// later version.
#include <string.h>
-extern int _stap_probe_sentinel;
-
-#define STAP_PROBE_START() \
- char *stap_sdt = getenv("SYSTEMTAP_SDT"); \
- if (stap_sdt != NULL) \
- _stap_probe_start ()
-
#if _LP64
#define STAP_PROBE_STRUCT_ARG \
@@ -35,21 +28,20 @@ struct _probe_ ## probe \
#ifndef USE_STAP_DEBUGINFO_PROBE
#define STAP_PROBE(provider,probe) \
STAP_PROBE_STRUCT(probe,0,0) \
- if (__builtin_expect(_stap_probe_sentinel, 0))\
- _stap_probe_0 (_probe_ ## probe.probe_name);
+ _stap_probe_0 (_probe_ ## probe.probe_name);
#else
#define STAP_PROBE(provider,probe) \
_probe_ ## probe: \
asm volatile ("nop"); \
- STAP_PROBE_STRUCT(probe,1,(size_t)&& _probe_ ## probe)
+ STAP_PROBE_STRUCT(probe,1,(size_t)&& _probe_ ## probe) \
+ asm volatile ("# %0" :: "m" ((_probe_ ## probe.probe_type)));
#endif
#ifndef USE_STAP_DEBUGINFO_PROBE
#define STAP_PROBE1(provider,probe,arg1) \
STAP_PROBE_STRUCT(probe,0,1) \
- if (__builtin_expect(_stap_probe_sentinel, 0))\
- _stap_probe_1 (_probe_ ## probe.probe_name,(size_t)arg1);
+ _stap_probe_1 (_probe_ ## probe.probe_name,(size_t)arg1);
#else
#define STAP_PROBE1(provider,probe,parm1) \
_probe_ ## probe: \
@@ -64,8 +56,7 @@ _probe_ ## probe: \
#ifndef USE_STAP_DEBUGINFO_PROBE
#define STAP_PROBE2(provider,probe,arg1,arg2) \
STAP_PROBE_STRUCT(probe,0,2) \
- if (__builtin_expect(_stap_probe_sentinel, 0)) \
- _stap_probe_2 (_probe_ ## probe.probe_name,(size_t)arg1,(size_t)arg2);
+ _stap_probe_2 (_probe_ ## probe.probe_name,(size_t)arg1,(size_t)arg2);
#else
#define STAP_PROBE2(provider,probe,parm1,parm2) \
_probe_ ## probe: \
@@ -81,8 +72,7 @@ _probe_ ## probe: \
#ifndef USE_STAP_DEBUGINFO_PROBE
#define STAP_PROBE3(provider,probe,arg1,arg2,arg3) \
STAP_PROBE_STRUCT(probe,0,3) \
- if (__builtin_expect(_stap_probe_sentinel, 0)) \
- _stap_probe_3 (_probe_ ## probe.probe_name,(size_t)arg1,(size_t)arg2,(size_t)arg3);
+ _stap_probe_3 (_probe_ ## probe.probe_name,(size_t)arg1,(size_t)arg2,(size_t)arg3);
#else
#define STAP_PROBE3(provider,probe,parm1,parm2,parm3) \
_probe_ ## probe: \
@@ -100,8 +90,7 @@ _probe_ ## probe: \
#ifndef USE_STAP_DEBUGINFO_PROBE
#define STAP_PROBE4(provider,probe,arg1,arg2,arg3,arg4) \
STAP_PROBE_STRUCT(probe,0,4) \
- if (__builtin_expect(_stap_probe_sentinel, 0)) \
- _stap_probe_4 (_probe_ ## probe.probe_name,(size_t)arg1,(size_t)arg2,(size_t)arg3,(size_t)arg4);
+ _stap_probe_4 (_probe_ ## probe.probe_name,(size_t)arg1,(size_t)arg2,(size_t)arg3,(size_t)arg4);
#else
#define STAP_PROBE4(provider,probe,parm1,parm2,parm3) \
_probe_ ## probe: \
@@ -121,8 +110,7 @@ _probe_ ## probe: \
#ifndef USE_STAP_DEBUGINFO_PROBE
#define STAP_PROBE5(provider,probe,arg1,arg2,arg3,arg4,arg5) \
STAP_PROBE_STRUCT(probe,0,5) \
- if (__builtin_expect(_stap_probe_sentinel, 0))\
- _stap_probe_5 (_probe_ ## probe.probe_name,(size_t)arg1,(size_t)arg2,(size_t)arg3,(size_t)arg4,(size_t)arg5);
+ _stap_probe_5 (_probe_ ## probe.probe_name,(size_t)arg1,(size_t)arg2,(size_t)arg3,(size_t)arg4,(size_t)arg5);
#else
#define STAP_PROBE5(provider,probe,parm1,parm2,parm3,parm4,parm5) \
_probe_ ## probe: \
@@ -140,3 +128,14 @@ _probe_ ## probe: \
asm volatile ("# %0" :: "r"(arg5)); \
asm volatile ("# %0" :: "m" ((_probe_ ## probe.probe_type)));
#endif
+
+#define DTRACE_PROBE1(provider,probe,parm1,parm2,parm3,parm4,parm5) \
+STAP_PROBE1(provider,probe,parm1,parm2,parm3,parm4,parm5)
+#define DTRACE_PROBE2(provider,probe,parm1,parm2,parm3,parm4,parm5) \
+STAP_PROBE2(provider,probe,parm1,parm2,parm3,parm4,parm5)
+#define DTRACE_PROBE3(provider,probe,parm1,parm2,parm3,parm4,parm5) \
+STAP_PROBE3(provider,probe,parm1,parm2,parm3,parm4,parm5)
+#define DTRACE_PROBE4(provider,probe,parm1,parm2,parm3,parm4,parm5) \
+STAP_PROBE4(provider,probe,parm1,parm2,parm3,parm4,parm5)
+#define DTRACE_PROBE5(provider,probe,parm1,parm2,parm3,parm4,parm5) \
+STAP_PROBE5(provider,probe,parm1,parm2,parm3,parm4,parm5)
diff --git a/runtime/vsprintf.c b/runtime/vsprintf.c
index 4ffcf72e..831b7a2b 100644
--- a/runtime/vsprintf.c
+++ b/runtime/vsprintf.c
@@ -143,8 +143,6 @@ int _stp_vsnprintf(char *buf, size_t size, const char *fmt, va_list args)
int precision; /* min. # of digits for integers; max
number of chars for from string */
int qualifier; /* 'h', 'l', or 'L' for integer fields */
- char *write_len_ptr = NULL;
- int write_len_width = 0;
/* Reject out-of-range values early */
if (unlikely((int) size < 0))
@@ -172,7 +170,7 @@ int _stp_vsnprintf(char *buf, size_t size, const char *fmt, va_list args)
case '#': flags |= STP_SPECIAL; goto repeat;
case '0': flags |= STP_ZEROPAD; goto repeat;
}
-
+
/* get field width */
field_width = -1;
if (isdigit(*fmt))
@@ -190,7 +188,7 @@ int _stp_vsnprintf(char *buf, size_t size, const char *fmt, va_list args)
/* get the precision */
precision = -1;
if (*fmt == '.') {
- ++fmt;
+ ++fmt;
if (isdigit(*fmt))
precision = skip_atoi(&fmt);
else if (*fmt == '*') {
@@ -283,7 +281,7 @@ int _stp_vsnprintf(char *buf, size_t size, const char *fmt, va_list args)
++str;
}
continue;
-
+
case 's':
case 'm':
s = va_arg(args, char *);
@@ -332,7 +330,7 @@ int _stp_vsnprintf(char *buf, size_t size, const char *fmt, va_list args)
flags |= STP_SIGN;
case 'u':
break;
-
+
case 'p':
/* Note that %p takes an int64_t argument. */
len = 2*sizeof(void *) + 2;
@@ -363,16 +361,6 @@ int _stp_vsnprintf(char *buf, size_t size, const char *fmt, va_list args)
16, field_width, field_width, flags);
continue;
- case 'n':
- write_len_ptr = str;
- write_len_width = 2;
- if (field_width == 1)
- write_len_width = 1;
- else if (field_width == 4)
- write_len_width = 4;
- str += write_len_width;
- continue;
-
case '%':
if (str <= end)
*str = '%';
@@ -436,29 +424,6 @@ int _stp_vsnprintf(char *buf, size_t size, const char *fmt, va_list args)
field_width, precision, flags);
}
- if (write_len_ptr) {
- int written;
- if (likely(str <= end))
- written = str - write_len_ptr - write_len_width;
- else
- written = end - write_len_ptr - write_len_width;
-
- if (likely(write_len_ptr + write_len_width < end)) {
- switch (write_len_width) {
- case 1:
- *(uint8_t *)write_len_ptr = (uint8_t)written;
- break;
- case 2:
- *(uint16_t *)write_len_ptr = (uint16_t)written;
- break;
-
- case 4:
- *(uint32_t *)write_len_ptr = (uint32_t)written;
- break;
- }
- }
- }
-
if (likely(str <= end))
*str = '\0';
else if (size > 0)
diff --git a/stap.1.in b/stap.1.in
index d4f8946a..16e09523 100644
--- a/stap.1.in
+++ b/stap.1.in
@@ -654,9 +654,6 @@ Signed decimal.
%m
Safely reads kernel memory at the given address, outputs its content. The width specifier determines the number of bytes to read. Default is 1 byte.
.TP
-%n
-Parameterless. Used in conjunction with %b. Writes a binary value which is the total remaning size of the binary blob being written. The width specifier determines the number of bytes this 'length value' will written as; valid specifiers are %n %1n %2n %4n. Default (%n) is 2 bytes. See example below.
-.TP
%o
Unsigned octal.
.TP
@@ -694,10 +691,8 @@ Examples:
Prints: a is alice; 1234abcd or 1234ABCD or 0x1234abcd; -1 or 18446744073709551615\\n
printf("2 bytes of kernel buffer at address %p: %2m", p, p)
Prints: 2 byte of kernel buffer at address 0x1234abcd: <binary data>
- printf("%1n%4b", p)
- Prints (these values as binary data): 0x4 0x1234abcd
- * the first byte (due to the 1 on %n) is the remaning number of bytes written by printf
- * the subsequent 4 bytes is the value due to %b
+ printf("%4b", p)
+ Prints (these values as binary data): 0x1234abcd
.ESAMPLE
.SS STATISTICS
@@ -1123,7 +1118,7 @@ The location of kernel debugging information when packaged into the
RPM, unless overridden by the
.I SYSTEMTAP_DEBUGINFO_PATH
environment variable. The default value for this variable is
-.IR \-:.debug:/usr/lib/debug .
+.IR \+:.debug:/usr/lib/debug:build .
Elfutils searches vmlinux in this path and it interprets the path as a base
directory of which various subdirectories will be searched for finding modules.
.TP
diff --git a/staptree.cxx b/staptree.cxx
index 38166c54..51992d7a 100644
--- a/staptree.cxx
+++ b/staptree.cxx
@@ -494,10 +494,6 @@ print_format::components_to_string(vector<format_component> const & components)
oss << 'm';
break;
- case conv_size:
- oss << 'n';
- break;
-
default:
break;
}
@@ -684,10 +680,6 @@ print_format::string_to_components(string const & str)
curr.type = conv_unsigned_lowercase_hex;
break;
- case 'n':
- curr.type = conv_size;
- break;
-
default:
break;
}
diff --git a/staptree.h b/staptree.h
index 40be8e05..069c9bcc 100644
--- a/staptree.h
+++ b/staptree.h
@@ -290,8 +290,7 @@ struct print_format: public expression
conv_char,
conv_memory,
conv_literal,
- conv_binary,
- conv_size
+ conv_binary
};
enum width_type
diff --git a/tapsets.cxx b/tapsets.cxx
index 178d2465..d49ea39d 100644
--- a/tapsets.cxx
+++ b/tapsets.cxx
@@ -895,7 +895,7 @@ struct dwflpp
if (! sess.module_cache)
sess.module_cache = new module_cache ();
- static const char *debuginfo_path_arr = "-:.debug:/usr/lib/debug:build";
+ static const char *debuginfo_path_arr = "+:.debug:/usr/lib/debug:build";
static const char *debuginfo_env_arr = getenv("SYSTEMTAP_DEBUGINFO_PATH");
static const char *debuginfo_path = (debuginfo_env_arr ?: debuginfo_path_arr );
@@ -957,7 +957,7 @@ struct dwflpp
void setup_user(string module_name, bool debuginfo_needed = true)
{
- static const char *debuginfo_path_arr = "-:.debug:/usr/lib/debug:build";
+ static const char *debuginfo_path_arr = "+:.debug:/usr/lib/debug:build";
static const char *debuginfo_env_arr = getenv("SYSTEMTAP_DEBUGINFO_PATH");
// NB: kernel_build_tree doesn't enter into this, as it's for
// kernel-side modules only.
diff --git a/testsuite/ChangeLog b/testsuite/ChangeLog
index ea8caa37..2549e27a 100644
--- a/testsuite/ChangeLog
+++ b/testsuite/ChangeLog
@@ -1,3 +1,7 @@
+2008-12-04 Stan Cox <scox@redhat.com>
+
+ * systemtap.base/static_uprobes.exp (STAP_PROBE_START): Remove.
+
2008-12-03 Frank Ch. Eigler <fche@elastic.org>
* systemtap.base/debugpath.exp: Correct test case for new -r behavior.
diff --git a/testsuite/systemtap.base/static_uprobes.exp b/testsuite/systemtap.base/static_uprobes.exp
index eb878405..78641d3f 100644
--- a/testsuite/systemtap.base/static_uprobes.exp
+++ b/testsuite/systemtap.base/static_uprobes.exp
@@ -36,8 +36,6 @@ buz ()
main ()
{
sleep(5);
- STAP_PROBE_START();
- _stap_probe_start (); // in lieu of setting SYSTEM_SDT
foo();
bar(2);
baz(3,\"abc\");
diff --git a/translate.cxx b/translate.cxx
index 12d50617..3f847b48 100644
--- a/translate.cxx
+++ b/translate.cxx
@@ -4706,7 +4706,7 @@ emit_symbol_data (systemtap_session& s)
unwindsym_dump_context ctx = { s, kallsyms_out, 0, s.unwindsym_modules };
// XXX: copied from tapsets.cxx dwflpp::, sadly
- static const char *debuginfo_path_arr = "-:.debug:/usr/lib/debug:build";
+ static const char *debuginfo_path_arr = "+:.debug:/usr/lib/debug:build";
static const char *debuginfo_env_arr = getenv("SYSTEMTAP_DEBUGINFO_PATH");
static const char *debuginfo_path = (debuginfo_env_arr ?: debuginfo_path_arr);
@@ -4736,9 +4736,9 @@ emit_symbol_data (systemtap_session& s)
if (s.kernel_build_tree == string("/lib/modules/" + s.kernel_release + "/build"))
elfutils_kernel_path = s.kernel_release;
else
- elfutils_kernel_path = s.kernel_build_tree;
+ elfutils_kernel_path = s.kernel_build_tree;
- int rc = dwfl_linux_kernel_report_offline (dwfl,
+ int rc = dwfl_linux_kernel_report_offline (dwfl,
elfutils_kernel_path.c_str(),
NULL /* XXX: filtering callback */);
dwfl_report_end (dwfl, NULL, NULL);