diff options
author | Frank Ch. Eigler <fche@elastic.org> | 2008-06-16 17:59:22 -0400 |
---|---|---|
committer | Frank Ch. Eigler <fche@elastic.org> | 2008-06-16 17:59:22 -0400 |
commit | f1552be17f72676f8fbc2c40292f4aebf883c321 (patch) | |
tree | f788de6e998c87ce6760d4ddfb9921cead6f4dff | |
parent | cfd621bc5bffb042aade8c6ec2d5b1b38cc58f5a (diff) | |
parent | 50446916683379f963eaaedb965654d464cd049f (diff) | |
download | systemtap-steved-f1552be17f72676f8fbc2c40292f4aebf883c321.tar.gz systemtap-steved-f1552be17f72676f8fbc2c40292f4aebf883c321.tar.xz systemtap-steved-f1552be17f72676f8fbc2c40292f4aebf883c321.zip |
Merge branch 'master' of ssh://sources.redhat.com/git/systemtap
* 'master' of ssh://sources.redhat.com/git/systemtap:
Improved callback handling.
Create alternative list only as needed.
-rw-r--r-- | ChangeLog | 5 | ||||
-rw-r--r-- | elaborate.cxx | 1 | ||||
-rw-r--r-- | runtime/ChangeLog | 5 | ||||
-rw-r--r-- | runtime/task_finder.c | 18 |
4 files changed, 20 insertions, 9 deletions
@@ -10,6 +10,11 @@ only on first iteration. Print alternatives for globals too. * session.h: Corresponding changes. +2008-06-16 Stan Cox <scox@redhat.com> + + * elaborate.cxx (semantic_pass_opt2): Only create function + alternatives if needed. Overload compare. + 2008-06-13 Stan Cox <scox@redhat.com> * elaborate.cxx (print_warning): Add optional_str parameter. diff --git a/elaborate.cxx b/elaborate.cxx index 27c0a013..93f541fa 100644 --- a/elaborate.cxx +++ b/elaborate.cxx @@ -1683,7 +1683,6 @@ void semantic_pass_opt2 (systemtap_session& s, bool& relaxed_p, unsigned iterati s.print_warning ("read-only local variable '" + l->name + "' " + (o.str() == "" ? "" : ("(alternatives:" + o.str() + ")")), l->tok); } - j++; } } diff --git a/runtime/ChangeLog b/runtime/ChangeLog index 3912a4cf..ca7bf082 100644 --- a/runtime/ChangeLog +++ b/runtime/ChangeLog @@ -1,3 +1,8 @@ +2008-06-16 David Smith <dsmith@redhat.com> + + * task_finder.c (stap_start_task_finder): Improved callback + handling. + 2008-06-10 David Smith <dsmith@redhat.com> * task_finder.c (struct stap_task_finder_target): Added diff --git a/runtime/task_finder.c b/runtime/task_finder.c index 8448f29c..e853cb2a 100644 --- a/runtime/task_finder.c +++ b/runtime/task_finder.c @@ -654,19 +654,21 @@ stap_start_task_finder(void) cb_tgt = list_entry(cb_node, struct stap_task_finder_target, callback_list); - if (cb_tgt == NULL || cb_tgt->callback == NULL) + if (cb_tgt == NULL) continue; // Call the callback. Assume that if // the thread is a thread group // leader, it is a process. - rc = cb_tgt->callback(tsk, 1, - (tsk->pid == tsk->tgid), - cb_tgt); - if (rc != 0) { - _stp_error("attach callback for %d failed: %d", - (int)tsk->pid, rc); - goto stf_err; + if (cb_tgt->callback != NULL) { + rc = cb_tgt->callback(tsk, 1, + (tsk->pid == tsk->tgid), + cb_tgt); + if (rc != 0) { + _stp_error("attach callback for %d failed: %d", + (int)tsk->pid, rc); + goto stf_err; + } } // Set up events we need for attached tasks. |