diff options
author | Markus Metzger <markus.t.metzger@intel.com> | 2008-11-25 03:05:27 -0500 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2008-11-25 11:31:12 -0500 |
commit | 6abb11aecd888d1da6276399380b7355f127c006 (patch) | |
tree | ef64f865780fa85f4ef102e6de4dd0a589302d32 /arch/x86/include/asm/ds.h | |
parent | ca0002a179bfa532d009a9272d619732872c49bd (diff) |
x86, bts, ptrace: move BTS buffer allocation from ds.c into ptrace.c
Impact: restructure DS memory allocation to be done by the usage site of DS
Require pre-allocated buffers in ds.h.
Move the BTS buffer allocation for ptrace into ptrace.c.
The pointer to the allocated buffer is stored in the traced task's
task_struct together with the handle returned by ds_request_bts().
Removes memory accounting code.
Signed-off-by: Markus Metzger <markus.t.metzger@intel.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'arch/x86/include/asm/ds.h')
-rw-r--r-- | arch/x86/include/asm/ds.h | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/arch/x86/include/asm/ds.h b/arch/x86/include/asm/ds.h index 0af997de5f01..99b6c39774a4 100644 --- a/arch/x86/include/asm/ds.h +++ b/arch/x86/include/asm/ds.h | |||
@@ -7,13 +7,12 @@ | |||
7 | * | 7 | * |
8 | * It manages: | 8 | * It manages: |
9 | * - per-thread and per-cpu allocation of BTS and PEBS | 9 | * - per-thread and per-cpu allocation of BTS and PEBS |
10 | * - buffer memory allocation (optional) | 10 | * - buffer overflow handling (to be done) |
11 | * - buffer overflow handling | ||
12 | * - buffer access | 11 | * - buffer access |
13 | * | 12 | * |
14 | * It assumes: | 13 | * It assumes: |
15 | * - get_task_struct on all parameter tasks | 14 | * - get_task_struct on all traced tasks |
16 | * - current is allowed to trace parameter tasks | 15 | * - current is allowed to trace tasks |
17 | * | 16 | * |
18 | * | 17 | * |
19 | * Copyright (C) 2007-2008 Intel Corporation. | 18 | * Copyright (C) 2007-2008 Intel Corporation. |
@@ -54,8 +53,7 @@ typedef void (*pebs_ovfl_callback_t)(struct pebs_tracer *); | |||
54 | * task: the task to request recording for; | 53 | * task: the task to request recording for; |
55 | * NULL for per-cpu recording on the current cpu | 54 | * NULL for per-cpu recording on the current cpu |
56 | * base: the base pointer for the (non-pageable) buffer; | 55 | * base: the base pointer for the (non-pageable) buffer; |
57 | * NULL if buffer allocation requested | 56 | * size: the size of the provided buffer in bytes |
58 | * size: the size of the requested or provided buffer in bytes | ||
59 | * ovfl: pointer to a function to be called on buffer overflow; | 57 | * ovfl: pointer to a function to be called on buffer overflow; |
60 | * NULL if cyclic buffer requested | 58 | * NULL if cyclic buffer requested |
61 | * th: the interrupt threshold in records from the end of the buffer; | 59 | * th: the interrupt threshold in records from the end of the buffer; |
@@ -72,8 +70,6 @@ extern struct pebs_tracer *ds_request_pebs(struct task_struct *task, | |||
72 | /* | 70 | /* |
73 | * Release BTS or PEBS resources | 71 | * Release BTS or PEBS resources |
74 | * | 72 | * |
75 | * Frees buffers allocated on ds_request. | ||
76 | * | ||
77 | * Returns 0 on success; -Eerrno otherwise | 73 | * Returns 0 on success; -Eerrno otherwise |
78 | * | 74 | * |
79 | * tracer: the tracer handle returned from ds_request_~() | 75 | * tracer: the tracer handle returned from ds_request_~() |