Re: [PATCH 1/1] uprobes/tracing: Don't pass addr=ip to perf_trace_buf_submit()
* Oleg Nesterov [2013-04-10 16:58:44]: > uprobe_perf_print() passes addr=ip to perf_trace_buf_submit() for > no reason. This sets perf_sample_data->addr for PERF_SAMPLE_ADDR, > we already have perf_sample_data->ip initialized if PERF_SAMPLE_IP. > > Signed-off-by: Oleg Nesterov Acked-by: Srikar Dronamraju > --- > kernel/trace/trace_uprobe.c |8 +++- > 1 files changed, 3 insertions(+), 5 deletions(-) > > diff --git a/kernel/trace/trace_uprobe.c b/kernel/trace/trace_uprobe.c > index 2d08bea..37ccb72 100644 > --- a/kernel/trace/trace_uprobe.c > +++ b/kernel/trace/trace_uprobe.c > @@ -811,7 +811,6 @@ static void uprobe_perf_print(struct trace_uprobe *tu, > struct ftrace_event_call *call = >call; > struct uprobe_trace_entry_head *entry; > struct hlist_head *head; > - unsigned long ip; > void *data; > int size, rctx, i; > > @@ -825,13 +824,12 @@ static void uprobe_perf_print(struct trace_uprobe *tu, > if (!entry) > goto out; > > - ip = instruction_pointer(regs); > if (is_ret_probe(tu)) { > entry->vaddr[0] = func; > - entry->vaddr[1] = ip; > + entry->vaddr[1] = instruction_pointer(regs); > data = DATAOF_TRACE_ENTRY(entry, true); > } else { > - entry->vaddr[0] = ip; > + entry->vaddr[0] = instruction_pointer(regs); > data = DATAOF_TRACE_ENTRY(entry, false); > } > > @@ -839,7 +837,7 @@ static void uprobe_perf_print(struct trace_uprobe *tu, > call_fetch(>args[i].fetch, regs, data + tu->args[i].offset); > > head = this_cpu_ptr(call->perf_events); > - perf_trace_buf_submit(entry, size, rctx, ip, 1, regs, head, NULL); > + perf_trace_buf_submit(entry, size, rctx, 0, 1, regs, head, NULL); > out: > preempt_enable(); > } > -- > 1.5.5.1 > > -- Thanks and Regards Srikar Dronamraju -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [PATCH 1/1] uprobes/tracing: Don't pass addr=ip to perf_trace_buf_submit()
* Oleg Nesterov o...@redhat.com [2013-04-10 16:58:44]: uprobe_perf_print() passes addr=ip to perf_trace_buf_submit() for no reason. This sets perf_sample_data-addr for PERF_SAMPLE_ADDR, we already have perf_sample_data-ip initialized if PERF_SAMPLE_IP. Signed-off-by: Oleg Nesterov o...@redhat.com Acked-by: Srikar Dronamraju sri...@linux.vnet.ibm.com --- kernel/trace/trace_uprobe.c |8 +++- 1 files changed, 3 insertions(+), 5 deletions(-) diff --git a/kernel/trace/trace_uprobe.c b/kernel/trace/trace_uprobe.c index 2d08bea..37ccb72 100644 --- a/kernel/trace/trace_uprobe.c +++ b/kernel/trace/trace_uprobe.c @@ -811,7 +811,6 @@ static void uprobe_perf_print(struct trace_uprobe *tu, struct ftrace_event_call *call = tu-call; struct uprobe_trace_entry_head *entry; struct hlist_head *head; - unsigned long ip; void *data; int size, rctx, i; @@ -825,13 +824,12 @@ static void uprobe_perf_print(struct trace_uprobe *tu, if (!entry) goto out; - ip = instruction_pointer(regs); if (is_ret_probe(tu)) { entry-vaddr[0] = func; - entry-vaddr[1] = ip; + entry-vaddr[1] = instruction_pointer(regs); data = DATAOF_TRACE_ENTRY(entry, true); } else { - entry-vaddr[0] = ip; + entry-vaddr[0] = instruction_pointer(regs); data = DATAOF_TRACE_ENTRY(entry, false); } @@ -839,7 +837,7 @@ static void uprobe_perf_print(struct trace_uprobe *tu, call_fetch(tu-args[i].fetch, regs, data + tu-args[i].offset); head = this_cpu_ptr(call-perf_events); - perf_trace_buf_submit(entry, size, rctx, ip, 1, regs, head, NULL); + perf_trace_buf_submit(entry, size, rctx, 0, 1, regs, head, NULL); out: preempt_enable(); } -- 1.5.5.1 -- Thanks and Regards Srikar Dronamraju -- To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [PATCH 1/1] uprobes/tracing: Don't pass addr=ip to perf_trace_buf_submit()
(2013/04/10 23:58), Oleg Nesterov wrote: > uprobe_perf_print() passes addr=ip to perf_trace_buf_submit() for > no reason. This sets perf_sample_data->addr for PERF_SAMPLE_ADDR, > we already have perf_sample_data->ip initialized if PERF_SAMPLE_IP. > > Signed-off-by: Oleg Nesterov Acked-by: Masami Hiramatsu Thank you! > --- > kernel/trace/trace_uprobe.c |8 +++- > 1 files changed, 3 insertions(+), 5 deletions(-) > > diff --git a/kernel/trace/trace_uprobe.c b/kernel/trace/trace_uprobe.c > index 2d08bea..37ccb72 100644 > --- a/kernel/trace/trace_uprobe.c > +++ b/kernel/trace/trace_uprobe.c > @@ -811,7 +811,6 @@ static void uprobe_perf_print(struct trace_uprobe *tu, > struct ftrace_event_call *call = >call; > struct uprobe_trace_entry_head *entry; > struct hlist_head *head; > - unsigned long ip; > void *data; > int size, rctx, i; > > @@ -825,13 +824,12 @@ static void uprobe_perf_print(struct trace_uprobe *tu, > if (!entry) > goto out; > > - ip = instruction_pointer(regs); > if (is_ret_probe(tu)) { > entry->vaddr[0] = func; > - entry->vaddr[1] = ip; > + entry->vaddr[1] = instruction_pointer(regs); > data = DATAOF_TRACE_ENTRY(entry, true); > } else { > - entry->vaddr[0] = ip; > + entry->vaddr[0] = instruction_pointer(regs); > data = DATAOF_TRACE_ENTRY(entry, false); > } > > @@ -839,7 +837,7 @@ static void uprobe_perf_print(struct trace_uprobe *tu, > call_fetch(>args[i].fetch, regs, data + tu->args[i].offset); > > head = this_cpu_ptr(call->perf_events); > - perf_trace_buf_submit(entry, size, rctx, ip, 1, regs, head, NULL); > + perf_trace_buf_submit(entry, size, rctx, 0, 1, regs, head, NULL); > out: > preempt_enable(); > } > -- Masami HIRAMATSU IT Management Research Dept. Linux Technology Center Hitachi, Ltd., Yokohama Research Laboratory E-mail: masami.hiramatsu...@hitachi.com -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [PATCH 1/1] uprobes/tracing: Don't pass addr=ip to perf_trace_buf_submit()
(2013/04/10 23:58), Oleg Nesterov wrote: uprobe_perf_print() passes addr=ip to perf_trace_buf_submit() for no reason. This sets perf_sample_data-addr for PERF_SAMPLE_ADDR, we already have perf_sample_data-ip initialized if PERF_SAMPLE_IP. Signed-off-by: Oleg Nesterov o...@redhat.com Acked-by: Masami Hiramatsu masami.hiramatsu...@hitachi.com Thank you! --- kernel/trace/trace_uprobe.c |8 +++- 1 files changed, 3 insertions(+), 5 deletions(-) diff --git a/kernel/trace/trace_uprobe.c b/kernel/trace/trace_uprobe.c index 2d08bea..37ccb72 100644 --- a/kernel/trace/trace_uprobe.c +++ b/kernel/trace/trace_uprobe.c @@ -811,7 +811,6 @@ static void uprobe_perf_print(struct trace_uprobe *tu, struct ftrace_event_call *call = tu-call; struct uprobe_trace_entry_head *entry; struct hlist_head *head; - unsigned long ip; void *data; int size, rctx, i; @@ -825,13 +824,12 @@ static void uprobe_perf_print(struct trace_uprobe *tu, if (!entry) goto out; - ip = instruction_pointer(regs); if (is_ret_probe(tu)) { entry-vaddr[0] = func; - entry-vaddr[1] = ip; + entry-vaddr[1] = instruction_pointer(regs); data = DATAOF_TRACE_ENTRY(entry, true); } else { - entry-vaddr[0] = ip; + entry-vaddr[0] = instruction_pointer(regs); data = DATAOF_TRACE_ENTRY(entry, false); } @@ -839,7 +837,7 @@ static void uprobe_perf_print(struct trace_uprobe *tu, call_fetch(tu-args[i].fetch, regs, data + tu-args[i].offset); head = this_cpu_ptr(call-perf_events); - perf_trace_buf_submit(entry, size, rctx, ip, 1, regs, head, NULL); + perf_trace_buf_submit(entry, size, rctx, 0, 1, regs, head, NULL); out: preempt_enable(); } -- Masami HIRAMATSU IT Management Research Dept. Linux Technology Center Hitachi, Ltd., Yokohama Research Laboratory E-mail: masami.hiramatsu...@hitachi.com -- To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[PATCH 1/1] uprobes/tracing: Don't pass addr=ip to perf_trace_buf_submit()
uprobe_perf_print() passes addr=ip to perf_trace_buf_submit() for no reason. This sets perf_sample_data->addr for PERF_SAMPLE_ADDR, we already have perf_sample_data->ip initialized if PERF_SAMPLE_IP. Signed-off-by: Oleg Nesterov --- kernel/trace/trace_uprobe.c |8 +++- 1 files changed, 3 insertions(+), 5 deletions(-) diff --git a/kernel/trace/trace_uprobe.c b/kernel/trace/trace_uprobe.c index 2d08bea..37ccb72 100644 --- a/kernel/trace/trace_uprobe.c +++ b/kernel/trace/trace_uprobe.c @@ -811,7 +811,6 @@ static void uprobe_perf_print(struct trace_uprobe *tu, struct ftrace_event_call *call = >call; struct uprobe_trace_entry_head *entry; struct hlist_head *head; - unsigned long ip; void *data; int size, rctx, i; @@ -825,13 +824,12 @@ static void uprobe_perf_print(struct trace_uprobe *tu, if (!entry) goto out; - ip = instruction_pointer(regs); if (is_ret_probe(tu)) { entry->vaddr[0] = func; - entry->vaddr[1] = ip; + entry->vaddr[1] = instruction_pointer(regs); data = DATAOF_TRACE_ENTRY(entry, true); } else { - entry->vaddr[0] = ip; + entry->vaddr[0] = instruction_pointer(regs); data = DATAOF_TRACE_ENTRY(entry, false); } @@ -839,7 +837,7 @@ static void uprobe_perf_print(struct trace_uprobe *tu, call_fetch(>args[i].fetch, regs, data + tu->args[i].offset); head = this_cpu_ptr(call->perf_events); - perf_trace_buf_submit(entry, size, rctx, ip, 1, regs, head, NULL); + perf_trace_buf_submit(entry, size, rctx, 0, 1, regs, head, NULL); out: preempt_enable(); } -- 1.5.5.1 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[PATCH 1/1] uprobes/tracing: Don't pass addr=ip to perf_trace_buf_submit()
uprobe_perf_print() passes addr=ip to perf_trace_buf_submit() for no reason. This sets perf_sample_data-addr for PERF_SAMPLE_ADDR, we already have perf_sample_data-ip initialized if PERF_SAMPLE_IP. Signed-off-by: Oleg Nesterov o...@redhat.com --- kernel/trace/trace_uprobe.c |8 +++- 1 files changed, 3 insertions(+), 5 deletions(-) diff --git a/kernel/trace/trace_uprobe.c b/kernel/trace/trace_uprobe.c index 2d08bea..37ccb72 100644 --- a/kernel/trace/trace_uprobe.c +++ b/kernel/trace/trace_uprobe.c @@ -811,7 +811,6 @@ static void uprobe_perf_print(struct trace_uprobe *tu, struct ftrace_event_call *call = tu-call; struct uprobe_trace_entry_head *entry; struct hlist_head *head; - unsigned long ip; void *data; int size, rctx, i; @@ -825,13 +824,12 @@ static void uprobe_perf_print(struct trace_uprobe *tu, if (!entry) goto out; - ip = instruction_pointer(regs); if (is_ret_probe(tu)) { entry-vaddr[0] = func; - entry-vaddr[1] = ip; + entry-vaddr[1] = instruction_pointer(regs); data = DATAOF_TRACE_ENTRY(entry, true); } else { - entry-vaddr[0] = ip; + entry-vaddr[0] = instruction_pointer(regs); data = DATAOF_TRACE_ENTRY(entry, false); } @@ -839,7 +837,7 @@ static void uprobe_perf_print(struct trace_uprobe *tu, call_fetch(tu-args[i].fetch, regs, data + tu-args[i].offset); head = this_cpu_ptr(call-perf_events); - perf_trace_buf_submit(entry, size, rctx, ip, 1, regs, head, NULL); + perf_trace_buf_submit(entry, size, rctx, 0, 1, regs, head, NULL); out: preempt_enable(); } -- 1.5.5.1 -- To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/