summaryrefslogtreecommitdiffstats
path: root/runtime
diff options
context:
space:
mode:
authorDavid Smith <dsmith@redhat.com>2008-04-15 15:58:23 -0500
committerDavid Smith <dsmith@redhat.com>2008-04-16 08:14:02 -0500
commit935447c84ba1f04ca3468565a2d74b071a95d77b (patch)
tree5b43fec11c3c2fa2ea7c4cd4a6cd5ccf459a2899 /runtime
parent10202d146ce3d8cbd427a3724b6adc04ef43616e (diff)
downloadsystemtap-steved-935447c84ba1f04ca3468565a2d74b071a95d77b.tar.gz
systemtap-steved-935447c84ba1f04ca3468565a2d74b071a95d77b.tar.xz
systemtap-steved-935447c84ba1f04ca3468565a2d74b071a95d77b.zip
2008-04-15 David Smith <dsmith@redhat.com>
* session.h (struct systemtap_session): Added utrace_derived_probe group and task_finder_derived_probe_group members. * elaborate.cxx (systemtap_session::systemtap_session): Added initialization of utrace_derived_probes and task_finder_derived_probes. * tapsets.cxx (struct task_finder_derived_probe_group): New derived_probe_group to handle task_finder framework. (struct utrace_derived_probe_group): New derived_probe_group to handle utrace probes. 2008-04-15 David Smith <dsmith@redhat.com> PR 5961 (partial) * task_finder.c (stap_start_task_finder): When an interesting thread is found that is already running, make sure to set up thread death notification.
Diffstat (limited to 'runtime')
-rw-r--r--runtime/ChangeLog7
-rw-r--r--runtime/task_finder.c19
2 files changed, 26 insertions, 0 deletions
diff --git a/runtime/ChangeLog b/runtime/ChangeLog
index d19a932f..b77e1a6c 100644
--- a/runtime/ChangeLog
+++ b/runtime/ChangeLog
@@ -1,3 +1,10 @@
+2008-04-15 David Smith <dsmith@redhat.com>
+
+ PR 5961 (partial)
+ * task_finder.c (stap_start_task_finder): When an interesting
+ thread is found that is already running, make sure to set up
+ thread death notification.
+
2008-04-15 hunt <hunt@redhat.com>
* print.c (_stp_pbuf_full): Delete.
diff --git a/runtime/task_finder.c b/runtime/task_finder.c
index d2e57a6b..dabcdafd 100644
--- a/runtime/task_finder.c
+++ b/runtime/task_finder.c
@@ -394,6 +394,25 @@ stap_start_task_finder(void)
(int)tsk->pid, rc);
break;
}
+
+ // Set up thread death notification.
+ memset(&cb_tgt->ops, 0, sizeof(cb_tgt->ops));
+ cb_tgt->ops.report_death
+ = &__stp_utrace_task_finder_death;
+
+ engine = utrace_attach(tsk,
+ UTRACE_ATTACH_CREATE,
+ &cb_tgt->ops, cb_tgt);
+ if (IS_ERR(engine)) {
+ _stp_error("attach to %d failed: %ld",
+ (int)tsk->pid,
+ PTR_ERR(engine));
+ }
+ else {
+ utrace_set_flags(tsk, engine,
+ __STP_UTRACE_ATTACHED_TASK_EVENTS);
+ cb_tgt->engine_attached = 1;
+ }
}
}
}