Re: [PATCH 1/4] tracing/uprobes: Revert "Support mix of ftrace and perf"

From: Oleg Nesterov
Date: Mon Jun 30 2014 - 14:49:54 EST


Hi Namhyung,

On 06/30, Namhyung Kim wrote:
>
> On Fri, 27 Jun 2014 19:01:36 +0200, Oleg Nesterov wrote:
> >
> > This would be easy to fix, but there are other reasons why it is not
> > simple to mix ftrace and perf. If nothing else, they can't share the
> > same ->consumer.filter. This is fixable too, but probably we need to
> > fix the poorly designed uprobe_register() interface first. At least
> > "register" and "apply" should be clearly separated.
>
> Hmm.. right. It seems the current filter logic only cares about the
> perf. If ftrace comes after perf, it might not see some events due to
> the filter, right?

Yes. Or vice versa, ftrace can miss the events because perf can return
UPROBE_HANDLER_REMOVE. Or ftrace can come after perf, but in this case
it should call uprobe_apply() or it won't add the new breakpoints.

Actually, I'll probably try to make the patch tomorrow. It looks simple
enough, the main complication is CONFIG_PERF. And, to keep this patch
simple, I won't try to optimize (say) the TP_FLAG_TRACE-comes-first
case which could avoid uprobe_apply().

Yes, I still think it would be better to change the register/unregister
API first, but I do not know when I do this ;)

> > Cc: stable@xxxxxxxxxxxxxxx # v3.14
> > Signed-off-by: Oleg Nesterov <oleg@xxxxxxxxxx>
>
> Acked-by: Namhyung Kim <namhyung@xxxxxxxxxx>

Thanks!

Oleg.

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/