[lttng-dev] Enable UST probes only in specific process

Jérémie Galarneau jeremie.galarneau at efficios.com
Wed Jul 30 14:31:28 EDT 2014


On Wed, Jul 30, 2014 at 9:58 AM, Dmitri Shubin <sbn at tbricks.com> wrote:
> Hi!
>
> Is it possible to enable user-space tracepoint in specific process (of given
> PID)?
>
> AFAIU
> lttng enable-event -u prov:probe --filter '$ctx.vpid==12345'
> enables probe for all processes and then drops unmatched.
>

Correct. The event won't be traced.

> In my case I'm doing rather heavyweight thing in probe (getting stack trace)
> and want to do that only in the process of interest.
>
> Is it possible?

The arguments won't be evaluated if the event is not enabled. However,
when an event is enabled, the arguments are evaluated regardless of
the result of the filter's expression evaluation since it could be
based on the event's content.

Let me know if that's not what you meant.

>
> The only way I can do it now is playing with LTTNG_HOME variable setting it
> to different paths for each process.

I'm not sure I understand what you mean here. Care to elaborate?

Thanks,
Jérémie

>
> Thanks!
>
> _______________________________________________
> lttng-dev mailing list
> lttng-dev at lists.lttng.org
> http://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev
>



-- 
Jérémie Galarneau
EfficiOS Inc.
http://www.efficios.com



More information about the lttng-dev mailing list