<html><body><div style="font-family: arial, helvetica, sans-serif; font-size: 12pt; color: #000000"><div><span id="zwchr" data-marker="__DIVIDER__">----- On Jul 9, 2021, at 4:30 AM, lttng-dev <lttng-dev@lists.lttng.org> wrote:<br></span></div><div data-marker="__QUOTED_TEXT__"><blockquote style="border-left:2px solid #1010FF;margin-left:5px;padding-left:5px;color:#000;font-weight:normal;font-style:normal;text-decoration:none;font-family:Helvetica,Arial,sans-serif;font-size:12pt;"><div dir="ltr"><div dir="ltr"><div>Hi there, I'm a little new to lttng and tracing in general. I am using a Java Userspace agent, which is working well, but I am having trouble adding callstack context to my tracing channels. I'm not sure if it's relevant but running 'lttng add-context --list" shows callstack-user in the list.</div></div></div></blockquote><div><br></div><div>It's not surprising, because the callstack-user context is specific to the kernel tracer.<br data-mce-bogus="1"></div><div><br data-mce-bogus="1"></div><blockquote style="border-left:2px solid #1010FF;margin-left:5px;padding-left:5px;color:#000;font-weight:normal;font-style:normal;text-decoration:none;font-family:Helvetica,Arial,sans-serif;font-size:12pt;"><div dir="ltr"><div dir="ltr"><br><div>the commands I input are:<br></div><br><div>lttng create <br></div><div>lttng enable-channel --userspace mychannel</div><div>lttng enable-event --userspace --all --channel mychannel<br></div><div>lttng add-context --userspace --channel mychannel --type callstack-user</div><div>>Error: callstack-user: UST invalid context</div></div></div></blockquote><div><br></div><div>This is expected.<br data-mce-bogus="1"></div><div><br data-mce-bogus="1"></div><blockquote style="border-left:2px solid #1010FF;margin-left:5px;padding-left:5px;color:#000;font-weight:normal;font-style:normal;text-decoration:none;font-family:Helvetica,Arial,sans-serif;font-size:12pt;"><div dir="ltr"><div dir="ltr"><br><div>When I run the following command instead:<br></div><div>lttng add-context --userspace --channel mychannel --type vpid</div><br><div>I am able to get it to work and I see vpid appear in my traces. Are there any other things I need to set up first to be able to use it?</div><br><div>also, are there any commands that can list the per-domain contexts available?</div></div></div></blockquote><div><br></div><div>Not currently, though I think it would make sense to make "lttng add-context --list" allow a tracing domain<br data-mce-bogus="1"></div><div>(e.g. --kernel/--userspace) to be specified as a future improvement.<br data-mce-bogus="1"></div><div><br data-mce-bogus="1"></div><div>Some information about this is available in the lttng-add-context(1) man page, but the fact that the<br data-mce-bogus="1"></div><div>kernel and user callstack contexts are only supported by the kernel tracer don't seem to be mentioned.<br data-mce-bogus="1"></div><div><br data-mce-bogus="1"></div><div>Thanks,<br data-mce-bogus="1"></div><div><br data-mce-bogus="1"></div><div>Mathieu<br data-mce-bogus="1"></div><div><br data-mce-bogus="1"></div><blockquote style="border-left:2px solid #1010FF;margin-left:5px;padding-left:5px;color:#000;font-weight:normal;font-style:normal;text-decoration:none;font-family:Helvetica,Arial,sans-serif;font-size:12pt;"><div dir="ltr"><div dir="ltr"><div><br></div></div></div>
<br>_______________________________________________<br>lttng-dev mailing list<br>lttng-dev@lists.lttng.org<br>https://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev<br></blockquote></div><div><br></div><div data-marker="__SIG_POST__">-- <br></div><div>Mathieu Desnoyers<br>EfficiOS Inc.<br>http://www.efficios.com</div></div></body></html>