[lttng-dev] Problem with adding vpid and vtid context to UST

Amit Margalit AMITM at il.ibm.com
Thu Jun 27 01:56:02 EDT 2013


So, what you're saying is that with per-UID buffers, I cannot add 
vpid/vtid to the context because these are somehow written once per set of 
buffers, and the buffers are shared between all applications?

If that is so - why is it that I can add 'procname' to the context and see 
multiple processes in the trace files without any issue?

I believe I misunderstood your meaning, then. Could you please explain in 
some more detail?

Thanks in advance,

Amit Margalit
IBM XIV - Storage Reinvented
XIV-NAS Development Team
Tel. 03-689-7774
Fax. 03-689-7230



From:   Mathieu Desnoyers <mathieu.desnoyers at efficios.com>
To:     Amit Margalit/Israel/IBM at IBMIL
Cc:     David Goulet <dgoulet at efficios.com>, lttng-dev at lists.lttng.org
Date:   06/26/2013 09:36 PM
Subject:        Re: [lttng-dev] Problem with adding vpid and vtid context 
to UST



* Amit Margalit (AMITM at il.ibm.com) wrote:
> Thanks for the explanation.
> 
> The reason I am running enable-channel is to add arguments like number 
of 
> subbuffers, and to select per-uid buffers. The vtid / vpid context is 
> something I'd like to have on every channel, and I really only want a 
> single channel...
> 
> In fact, it is unclear to me how to tell an application which channel to 

> use - is it even possible?

No. Currently, channels apply to all registered applications.

However, with per-PID channels, you have one set of buffers per process.

With per-UID channels, you have one set of buffers per user ID, shared
amongst processes.

Thanks,

Mathieu

> 
> Thanks,
> 
> P.S. I intend to send a man-page patch for the domain separation as you 
> suggested.
> 
> 
> Amit Margalit
> IBM XIV - Storage Reinvented
> XIV-NAS Development Team
> Tel. 03-689-7774
> Fax. 03-689-7230
> 
> 
> 
> From:   David Goulet <dgoulet at efficios.com>
> To:     Amit Margalit/Israel/IBM at IBMIL
> Cc:     lttng-dev at lists.lttng.org
> Date:   06/17/2013 11:01 PM
> Subject:        Re: [lttng-dev] Problem with adding vpid and vtid 
context 
> to UST
> 
> 
> 
> Hi Amit,
> 
> Amit Margalit:
> > Hi,
> > 
> > Every time I try this, I get the following error:
> > 
> > Error: Error starting tracing for app pid: 5663 (ret: -1027)
> > 
> > Here's my sequence:
> > 
> > lttng create foo -o /store/
> > lttng enable-channel -u
> > lttng add-context -u -t vpid -t vtid -t procname
> > lttng enable-event -u -a
> > lttng start foo
> > 
> > At this point I start my application and get that error. When the 
> application
> > exits, I stop the tracing, and run lttng view.
> > 
> > The trace session seems to have worked just fine, and "procname" was 
> indeed
> > added to the context, but vtid and vpid were not.
> 
> What's going on here is that you enable a channel then add contexts. 
This 
> is
> perfectly OK (although your example is missing a channel name). So, the
> following "lttng enable-event" creates a default channel "channel0" 
since 
> no
> "-c" was specified.
> 
> So basically, the contexts are available on the first channel and not 
the 
> second
> one.
> 
> This sequence should work:
> 
> lttng create foo -o /store/
> lttng enable-event -u -a
> lttng add-context -u -t vpid -t vtid -t procname
> lttng start foo
> 
> We should detail that a bit better in the documentation that an 
> add-context
> needs to be done *after* a channel is enabled. This allows you to create
> multiple channel with different contexts.
> 
> Now, an other issue here in terms of usability is that the enable-event 
> *after*
> an enable-channel should be apply to this channel. I think there is been 
a
> discussion at some point on lttng-dev on in the bug tracker.
> 
> > 
> > And BTW, the documentation doesn't clearly state that pid and tid are
> > kernel-only contexts, and that one should use vtid and vpid.
> 
> Yes! The list of contexts accepted per domain would be quite useful and 
I 
> do
> agree with you that it's missing in the doc.
> 
> We would be *happy* to welcome a contribution for that :).
> 
> Cheers!
> David
> 
> > 
> > Any help is appreciated.
> > 
> > Thanks,
> > 
> > Amit Margalit
> > IBM XIV - /Storage Reinvented/
> > XIV-NAS Development Team
> > Tel. 03-689-7774
> > Fax. 03-689-7230
> > 
> > 
> > This body part will be downloaded on demand.
> 
> 

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


-- 
Mathieu Desnoyers
EfficiOS Inc.
http://www.efficios.com


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lttng.org/pipermail/lttng-dev/attachments/20130627/95087cc5/attachment-0001.html>


More information about the lttng-dev mailing list