summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStan Cox <scox@redhat.com>2008-08-28 11:05:32 -0400
committerStan Cox <scox@redhat.com>2008-08-28 11:05:32 -0400
commitcd221ed4afd8d5e0f24f3f9d6ed4216f3181b1ca (patch)
tree8047db20555cec7c7c5d52e2474bf7f360041515
parent0565b404408de934e41a4343259068d27deb3ecb (diff)
downloadsystemtap-steved-cd221ed4afd8d5e0f24f3f9d6ed4216f3181b1ca.tar.gz
systemtap-steved-cd221ed4afd8d5e0f24f3f9d6ed4216f3181b1ca.tar.xz
systemtap-steved-cd221ed4afd8d5e0f24f3f9d6ed4216f3181b1ca.zip
Document written but unread global variable automatic display.
-rw-r--r--ChangeLog1
-rw-r--r--NEWS7
-rw-r--r--doc/ChangeLog4
-rw-r--r--doc/langref.tex4
-rw-r--r--stap.1.in4
5 files changed, 18 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog
index 43fe2f59..23425b71 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -4,6 +4,7 @@
(semantic_pass): Call it.
(dead_assignment_remover::visit_assignment): Don't remove written
but unread global variables.
+ * NEWS, stap.1.in: Document
2008-08-26 David Smith <dsmith@redhat.com>
diff --git a/NEWS b/NEWS
index ce3954cf..969f736f 100644
--- a/NEWS
+++ b/NEWS
@@ -1,5 +1,12 @@
* What's new
+- Global variables which are written to but never read are now
+ automatically displayed when the session does a shutdown. For example:
+ global running_tasks
+ probe timer.profile {tc=task_current();
+ running_tasks[task_pid(tc),task_tid(tc)] = execname()}
+ probe timer.ms(8000) {exit()}
+
- A formatted string representation of the variables, parameters, or local
variables at a probe point is now supported via the special $$vars,
$$parms, and $$locals context variables, which expand to a string
diff --git a/doc/ChangeLog b/doc/ChangeLog
index a04c4cdc..d28b588d 100644
--- a/doc/ChangeLog
+++ b/doc/ChangeLog
@@ -1,3 +1,7 @@
+2008-08-28 Stan Cox <scox@redhat.com>
+
+ * langref.tex: Document written but unread global variable display.
+
2008-08-25 Frank Ch. Eigler <fche@elastic.org>
* Makefile.am: Removed dist-related targets and macros.
diff --git a/doc/langref.tex b/doc/langref.tex
index 413ece4d..5db82550 100644
--- a/doc/langref.tex
+++ b/doc/langref.tex
@@ -495,7 +495,9 @@ found. Because of possible concurrency limits, such as multiple probe handlers,
each global variable used by a probe is automatically read- or write-locked
while the handler is running. A global declaration may be written at the
outermost level anywhere in a script file, not just within a block of code.
-The following declaration marks \texttt{var1} and \texttt{var2} as global.
+Global variables which are written but never read will be displayed
+automatically at session shutdown. The following declaration marks
+\texttt{var1} and \texttt{var2} as global.
The translator will infer a value type for each, and if the variable is used
as an array, its key types.
diff --git a/stap.1.in b/stap.1.in
index 466c021b..d787a015 100644
--- a/stap.1.in
+++ b/stap.1.in
@@ -351,7 +351,9 @@ Variables may be declared global, so that they are shared amongst all
probes and live as long as the entire systemtap session. There is one
namespace for all global variables, regardless of which script file
they are found within. A global declaration may be written at the
-outermost level anywhere, not within a block of code. The following
+outermost level anywhere, not within a block of code. Global
+variables which are written but never read will be displayed
+automatically at session shutdown. The following
declaration marks a few variables as global. The translator will
infer for each its value type, and if it is used as an array, its key
types. Optionally, scalar globals may be initialized with a string