diff options
author | Markus Metzger <markus.t.metzger@intel.com> | 2008-11-25 03:01:25 -0500 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2008-11-25 11:31:11 -0500 |
commit | ca0002a179bfa532d009a9272d619732872c49bd (patch) | |
tree | 9a9ca02164dfb2c13afaa38ab67f3f15d8dd5ce8 /include | |
parent | 7d55718b0c19ba611241c330f688ee824e9bab79 (diff) |
x86, bts: base in-kernel ds interface on handles
Impact: generalize the DS code to shared buffers
Change the in-kernel ds.h interface to identify the tracer via a
handle returned on ds_request_~().
Tracers used to be identified via their task_struct.
The changes are required to allow DS to be shared between different
tasks, which is needed for perfmon2 and for ftrace.
For ptrace, the handle is stored in the traced task's task_struct.
This should probably go into a (arch-specific) ptrace context some
time.
Signed-off-by: Markus Metzger <markus.t.metzger@intel.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/sched.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/include/linux/sched.h b/include/linux/sched.h index bee1e93c95ad..a9780eaa6737 100644 --- a/include/linux/sched.h +++ b/include/linux/sched.h | |||
@@ -96,6 +96,7 @@ struct exec_domain; | |||
96 | struct futex_pi_state; | 96 | struct futex_pi_state; |
97 | struct robust_list_head; | 97 | struct robust_list_head; |
98 | struct bio; | 98 | struct bio; |
99 | struct bts_tracer; | ||
99 | 100 | ||
100 | /* | 101 | /* |
101 | * List of flags we want to share for kernel threads, | 102 | * List of flags we want to share for kernel threads, |
@@ -1161,6 +1162,14 @@ struct task_struct { | |||
1161 | struct list_head ptraced; | 1162 | struct list_head ptraced; |
1162 | struct list_head ptrace_entry; | 1163 | struct list_head ptrace_entry; |
1163 | 1164 | ||
1165 | #ifdef CONFIG_X86_PTRACE_BTS | ||
1166 | /* | ||
1167 | * This is the tracer handle for the ptrace BTS extension. | ||
1168 | * This field actually belongs to the ptracer task. | ||
1169 | */ | ||
1170 | struct bts_tracer *bts; | ||
1171 | #endif /* CONFIG_X86_PTRACE_BTS */ | ||
1172 | |||
1164 | /* PID/PID hash table linkage. */ | 1173 | /* PID/PID hash table linkage. */ |
1165 | struct pid_link pids[PIDTYPE_MAX]; | 1174 | struct pid_link pids[PIDTYPE_MAX]; |
1166 | struct list_head thread_group; | 1175 | struct list_head thread_group; |