Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 175387
b: refs/heads/master
c: 2f0993e
h: refs/heads/master
i:
  175385: 42d676a
  175383: e73e4c0
v: v3
  • Loading branch information
Frederic Weisbecker committed Dec 6, 2009
1 parent 06daf3d commit fe4aeb2
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 14 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 9cef30815b0f5b76e94a58d7674fcbf824d95579
refs/heads/master: 2f0993e0fb663c49e4d1e02654f6203246be4817
4 changes: 2 additions & 2 deletions trunk/arch/x86/kernel/ptrace.c
Original file line number Diff line number Diff line change
Expand Up @@ -618,7 +618,7 @@ ptrace_modify_breakpoint(struct perf_event *bp, int len, int type,
attr.bp_type = gen_type;
attr.disabled = disabled;

return modify_user_hw_breakpoint(bp, &attr, bp->callback, tsk);
return modify_user_hw_breakpoint(bp, &attr);
}

/*
Expand Down Expand Up @@ -740,7 +740,7 @@ static int ptrace_set_breakpoint_addr(struct task_struct *tsk, int nr,

attr = bp->attr;
attr.bp_addr = addr;
bp = modify_user_hw_breakpoint(bp, &attr, bp->callback, tsk);
bp = modify_user_hw_breakpoint(bp, &attr);
}
/*
* CHECKME: the previous code returned -EIO if the addr wasn't a
Expand Down
9 changes: 2 additions & 7 deletions trunk/include/linux/hw_breakpoint.h
Original file line number Diff line number Diff line change
Expand Up @@ -57,10 +57,7 @@ register_user_hw_breakpoint(struct perf_event_attr *attr,

/* FIXME: only change from the attr, and don't unregister */
extern struct perf_event *
modify_user_hw_breakpoint(struct perf_event *bp,
struct perf_event_attr *attr,
perf_callback_t triggered,
struct task_struct *tsk);
modify_user_hw_breakpoint(struct perf_event *bp, struct perf_event_attr *attr);

/*
* Kernel breakpoints are not associated with any particular thread.
Expand Down Expand Up @@ -97,9 +94,7 @@ register_user_hw_breakpoint(struct perf_event_attr *attr,
struct task_struct *tsk) { return NULL; }
static inline struct perf_event *
modify_user_hw_breakpoint(struct perf_event *bp,
struct perf_event_attr *attr,
perf_callback_t triggered,
struct task_struct *tsk) { return NULL; }
struct perf_event_attr *attr) { return NULL; }
static inline struct perf_event *
register_wide_hw_breakpoint_cpu(struct perf_event_attr *attr,
perf_callback_t triggered,
Expand Down
7 changes: 3 additions & 4 deletions trunk/kernel/hw_breakpoint.c
Original file line number Diff line number Diff line change
Expand Up @@ -312,9 +312,7 @@ EXPORT_SYMBOL_GPL(register_user_hw_breakpoint);
* @tsk: pointer to 'task_struct' of the process to which the address belongs
*/
struct perf_event *
modify_user_hw_breakpoint(struct perf_event *bp, struct perf_event_attr *attr,
perf_callback_t triggered,
struct task_struct *tsk)
modify_user_hw_breakpoint(struct perf_event *bp, struct perf_event_attr *attr)
{
/*
* FIXME: do it without unregistering
Expand All @@ -323,7 +321,8 @@ modify_user_hw_breakpoint(struct perf_event *bp, struct perf_event_attr *attr,
*/
unregister_hw_breakpoint(bp);

return perf_event_create_kernel_counter(attr, -1, tsk->pid, triggered);
return perf_event_create_kernel_counter(attr, -1, bp->ctx->task->pid,
bp->callback);
}
EXPORT_SYMBOL_GPL(modify_user_hw_breakpoint);

Expand Down

0 comments on commit fe4aeb2

Please sign in to comment.