This is the mail archive of the systemtap@sourceware.org mailing list for the systemtap project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: prompt script exiting


Frank Ch. Eigler wrote:
Hi -

wcohen wrote:


That [systemtap_session change] sounds like it would operate in the
manner that people would expect. [...]


Yeah. Would you mind testing it and committing it if it works?


What happens if there are two scripts running? Is this flag local to
the script or a global? [...]


"global" in the systemtap sense means shared amongst probe handlers of
the same systemtap session.  There is no "global" data in the sense of
kernel-wide at all, except perhaps in kprobes internals.

- FChE

Here is a one-liner that appears to fix the problem. systemtap.samples/syscalls2.exp works when it is installed.


2005-12-12 Will Cohen <wcohen@redhat.com>

	* tapset/logging.stp (function_exit): Make sure systemtap
	probes stop collection additional data.



-Will
Index: logging.stp
===================================================================
RCS file: /cvs/systemtap/src/tapset/logging.stp,v
retrieving revision 1.6
diff -u -r1.6 logging.stp
--- logging.stp	18 Nov 2005 21:57:30 -0000	1.6
+++ logging.stp	12 Dec 2005 20:16:34 -0000
@@ -21,6 +21,7 @@
 
 // NB: exit() does *not* cause immediate return from current function/probe
 function exit () %{
+    atomic_set (&session_state, STAP_SESSION_STOPPING);
     _stp_exit ();
 %}
 

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]