summaryrefslogtreecommitdiffstats
path: root/tapsets.cxx
diff options
context:
space:
mode:
authorDavid Smith <dsmith@redhat.com>2008-08-15 14:02:31 -0500
committerDavid Smith <dsmith@redhat.com>2008-08-15 14:02:31 -0500
commit986e98de88e5a55451aaf24a6ead7f44725124c1 (patch)
tree0b17238485833b8cb0ae0f4556c29065259f54eb /tapsets.cxx
parenta43ba4339f5b291d139e0be59bba4bc46c55ea25 (diff)
downloadsystemtap-steved-986e98de88e5a55451aaf24a6ead7f44725124c1.tar.gz
systemtap-steved-986e98de88e5a55451aaf24a6ead7f44725124c1.tar.xz
systemtap-steved-986e98de88e5a55451aaf24a6ead7f44725124c1.zip
Change system-wide probes from 'process("*").begin' to 'process.begin'.
2008-08-15 David Smith <dsmith@redhat.com> * tapsets.cxx (utrace_builder::build): Change system-wide probes from 'process("*").begin' to 'process.begin'. (register_standard_tapsets): Add new 'process' binding. * stapprobes.5.in: Change system-wide probes from 'process("*").begin' to 'process.begin'. 2008-08-15 David Smith <dsmith@redhat.com> * systemtap.base/utrace_p4.exp: Change system-wide probes from 'process("*").begin' to 'process.begin'.
Diffstat (limited to 'tapsets.cxx')
-rw-r--r--tapsets.cxx29
1 files changed, 18 insertions, 11 deletions
diff --git a/tapsets.cxx b/tapsets.cxx
index 1f7d2555..60d9a377 100644
--- a/tapsets.cxx
+++ b/tapsets.cxx
@@ -5945,7 +5945,6 @@ struct utrace_builder: public derived_probe_builder
bool has_path = get_param (parameters, TOK_PROCESS, path);
bool has_pid = get_param (parameters, TOK_PROCESS, pid);
enum utrace_derived_probe_flags flags = UDPF_NONE;
- assert (has_path || has_pid);
if (has_null_param (parameters, TOK_THREAD))
{
@@ -5966,23 +5965,23 @@ struct utrace_builder: public derived_probe_builder
else if (has_null_param (parameters, TOK_END))
flags = UDPF_END;
+ // If we didn't get a path or pid, this means to probe everything.
+ // Convert this to a pid-based probe.
+ if (! has_path && ! has_pid)
+ {
+ has_path = false;
+ path.clear();
+ has_pid = true;
+ pid = 0;
+ }
// Validate pid.
- if (has_pid)
+ else if (has_pid)
{
// We can't probe 'init' (pid 1).
if (pid < 2)
throw semantic_error ("process pid must be greater than 1",
location->tok);
}
- // If we have a path whose value is "*", this means to probe
- // everything. Convert this to a pid-based probe.
- else if (has_path && path == "*")
- {
- has_path = false;
- path.clear();
- has_pid = true;
- pid = 0;
- }
// If we have a regular path, we need to validate it.
else if (has_path)
{
@@ -8897,18 +8896,26 @@ register_standard_tapsets(systemtap_session & s)
->bind(new utrace_builder ());
s.pattern_root->bind_num(TOK_PROCESS)->bind(TOK_BEGIN)
->bind(new utrace_builder ());
+ s.pattern_root->bind(TOK_PROCESS)->bind(TOK_BEGIN)
+ ->bind(new utrace_builder ());
s.pattern_root->bind_str(TOK_PROCESS)->bind(TOK_END)
->bind(new utrace_builder ());
s.pattern_root->bind_num(TOK_PROCESS)->bind(TOK_END)
->bind(new utrace_builder ());
+ s.pattern_root->bind(TOK_PROCESS)->bind(TOK_END)
+ ->bind(new utrace_builder ());
s.pattern_root->bind_str(TOK_PROCESS)->bind(TOK_THREAD)->bind(TOK_BEGIN)
->bind(new utrace_builder ());
s.pattern_root->bind_num(TOK_PROCESS)->bind(TOK_THREAD)->bind(TOK_BEGIN)
->bind(new utrace_builder ());
+ s.pattern_root->bind(TOK_PROCESS)->bind(TOK_THREAD)->bind(TOK_BEGIN)
+ ->bind(new utrace_builder ());
s.pattern_root->bind_str(TOK_PROCESS)->bind(TOK_THREAD)->bind(TOK_END)
->bind(new utrace_builder ());
s.pattern_root->bind_num(TOK_PROCESS)->bind(TOK_THREAD)->bind(TOK_END)
->bind(new utrace_builder ());
+ s.pattern_root->bind(TOK_PROCESS)->bind(TOK_THREAD)->bind(TOK_END)
+ ->bind(new utrace_builder ());
// itrace user-space probes
s.pattern_root->bind_str(TOK_PROCESS)->bind("itrace")