Next: Exercises
Up: Tapsets
Previous: Embedded C
Contents
Using the tapset search mechanism just described, potentially many
script files can become selected for inclusion in a single session.
This raises the problem of name collisions, where different tapsets
accidentally use the same names for functions/globals. This can
result in errors at translate or run time.
To control this problem, systemtap tapset developers are advised to
follow naming conventions. Here is some of the guidance.
- Pick a unique name for your tapset, and substitute it for
TAPSET below.
- Separate identifiers meant to be used by tapset users from
those that are internal implementation artifacts.
- Document the first set in the appropriate
man pages.
- Prefix the names of external identifiers with TAPSET_ if
there is any likelihood of collision with other tapsets or end-user
scripts.
- Prefix any probe point aliases with an appropriate prefix.
- Prefix the names of internal identifiers with __TAPSET_.