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