4.7. Special probe points


The probe points begin and end are defined by the translator to refer to the time of session startup and shutdown. There are no target variables available in either context.

4.7.1. begin

The begin probe is the start of the SystemTap session. All begin probe handlers are run during the startup of the session. All global variables must be declared prior to this point.

4.7.2. end

The end probe is the end of the SystemTap session. All end probes are run during the normal shutdown of a session, such as in the aftermath of an exit function call, or an interruption from the user. In the case of an shutdown triggered by error, end probes are not run.

4.7.3. begin and end probe sequence

begin and end probes are specified with an optional sequence number that controls the order in which they are run. If no sequence number is provided, the sequence number defaults to zero and probes are run in the order that they occur in the script file. Sequence numbers may be either positive or negative, and are especially useful for tapset writers who want to do initialization in a begin probe. The following are examples.
# In a tapset file:
probe begin(-1000) { ... }

# In a user script:
probe begin { ... }
The user script begin probe defaults to sequence number zero, so the tapset begin probe will run first.

4.7.4. never

The never probe point is defined by the translator to mean never. Its statements are analyzed for symbol and type correctness, but its probe handler is never run. This probe point may be useful in conjunction with optional probes. See Section Section 4.1.4, “Optional probe points”.
Red Hat logoGithubRedditYoutubeTwitter

Learn

Try, buy, & sell

Communities

About Red Hat Documentation

We help Red Hat users innovate and achieve their goals with our products and services with content they can trust.

Making open source more inclusive

Red Hat is committed to replacing problematic language in our code, documentation, and web properties. For more details, see the Red Hat Blog.

About Red Hat

We deliver hardened solutions that make it easier for enterprises to work across platforms and environments, from the core datacenter to the network edge.

© 2024 Red Hat, Inc.