diff options
-rw-r--r-- | ChangeLog | 1 | ||||
-rw-r--r-- | NEWS | 7 | ||||
-rw-r--r-- | doc/ChangeLog | 4 | ||||
-rw-r--r-- | doc/langref.tex | 4 | ||||
-rw-r--r-- | stap.1.in | 4 |
5 files changed, 18 insertions, 2 deletions
@@ -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> @@ -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. @@ -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 |