This is the mail archive of the
systemtap@sourceware.org
mailing list for the systemtap project.
RE: prompt script exiting
- From: "Mao, Bibo" <bibo dot mao at intel dot com>
- To: "William Cohen" <wcohen at redhat dot com>, "SystemTAP" <systemtap at sources dot redhat dot com>
- Date: Mon, 12 Dec 2005 19:35:10 +0800
- Subject: RE: prompt script exiting
Hi Cohen,
Currently in the script when exit() is called, the global variant flag _stp_exit_flag will be set as 1. I do know whether judge the value of _stp_exit_flag just before kprobe/kretprobe handler running. And then when it is set as 1, kprobe/kretprobe handler return immediately, and then collect data will be more accurate when it is used for measurement.
Regards
Bibo,mao
>-----Original Message-----
>From: systemtap-owner@sourceware.org [mailto:systemtap-owner@sourceware.org]
>On Behalf Of William Cohen
>Sent: 2005年12月3日 4:08
>To: SystemTAP
>Subject: prompt script exiting
>
>When running the testsuite with the recent version of systemtap
>(snapshot from this morning, 2005-12-02) I found that syscalls2.exp
>would consistently fail. The the tests uses an exit() in the script when
>a probe fires 100 times. The syscalls2.exp allows a little slop and the
>probe to fire after the exit but before being removed. However, the
>changes in how exit operates makes create a longer wait before scripts
>actually exits. On the test runs I saw the probe fire 232, 200, 267, and
>420 times on various machines, much more than the 150 times allowed in
>the test.
>
>Do we expect the script to exit promptly when the exit() is encountered
>in the script? People taking measurements will want to know about this
>because it could significantly affect the data their scripts collect.
>For the time being we can just document this as how it behaves. It
>should be fairly easy for users to have a predicate in their
>instrumentation, so it is a pretty minor issue.
>
>-Will