diff mbox

[RFC,v3,4/5] Update documentation for LTTng ust tracing

Message ID 1381775755-8421-5-git-send-email-mohamad.gebai@polymtl.ca
State New
Headers show

Commit Message

Mohamad Gebai Oct. 14, 2013, 6:35 p.m. UTC
Signed-off-by: Mohamad Gebai <mohamad.gebai@polymtl.ca>
---
 docs/tracing.txt |   31 +++++++++++++++++++++++++++++++
 1 file changed, 31 insertions(+)

Comments

Alex Bennée Oct. 15, 2013, 11:21 a.m. UTC | #1
mohamad.gebai@gmail.com writes:

> Signed-off-by: Mohamad Gebai <mohamad.gebai@polymtl.ca>
> ---
>  docs/tracing.txt |   31 +++++++++++++++++++++++++++++++
>  1 file changed, 31 insertions(+)
>
> diff --git a/docs/tracing.txt b/docs/tracing.txt
> index bfc261b..64683db 100644
> --- a/docs/tracing.txt
> +++ b/docs/tracing.txt
> @@ -214,6 +214,37 @@ The "ust" backend uses the LTTng Userspace Tracer library.  There are no
>  monitor commands built into QEMU, instead UST utilities should be used to list,
>  enable/disable, and dump traces.
>  
> +Package lttng-tools is required for userspace tracing. After running Qemu, LTTng
> +should be able to list all available events:
> +
> +    lttng list -u

Running this gives me:

<quote>
UST events:
-------------
None
</quote>

Before or after running qemu. What is the mechanism lttng expects to
find out all these events?

> +
> +Create tracing session:
> +
> +    lttng create mysession
> +
> +Enable events:
> +
> +    lttng enable-event qemu:g_malloc -u
> +
> +Where the events can either be a comma-separated list of events, or "-a" to
> +enable all tracepoint events. Start and stop tracing as needed:
> +
> +    lttng start
> +    lttng stop
> +
> +View the trace:
> +
> +    lttng view
> +
> +Destroy tracing session:
> +
> +    lttng destroy
> +
> +Babeltrace can be used at any later time to view the trace:
> +
> +    babeltrace $HOME/lttng-traces/mysession-<date>-<time>
> +

The rest of this looks OK and worked on my system.

>  === SystemTap ===
>  
>  The "dtrace" backend uses DTrace sdt probes but has only been tested with
Mohamad Gebai Oct. 15, 2013, 4:07 p.m. UTC | #2
> Running this gives me:
>
> <quote>
> UST events:
> -------------
> None
> </quote>
>
> Before or after running qemu. What is the mechanism lttng expects to
> find out all these events?

Either the user should belong the group "tracing", or launch the 
lttng-sessiond daemon (lttng-sessiond -d).

>
>> +
>> +Create tracing session:
>> +
>> +    lttng create mysession
>> +
>> +Enable events:
>> +
>> +    lttng enable-event qemu:g_malloc -u
>> +
>> +Where the events can either be a comma-separated list of events, or "-a" to
>> +enable all tracepoint events. Start and stop tracing as needed:
>> +
>> +    lttng start
>> +    lttng stop
>> +
>> +View the trace:
>> +
>> +    lttng view
>> +
>> +Destroy tracing session:
>> +
>> +    lttng destroy
>> +
>> +Babeltrace can be used at any later time to view the trace:
>> +
>> +    babeltrace $HOME/lttng-traces/mysession-<date>-<time>
>> +
> The rest of this looks OK and worked on my system.
>
>>   === SystemTap ===
>>   
>>   The "dtrace" backend uses DTrace sdt probes but has only been tested with
>
Thanks!
Mohamad
Alex Bennée Oct. 16, 2013, 12:05 p.m. UTC | #3
mohamad.gebai@polymtl.ca writes:

>> Running this gives me:
>>
>> <quote>
>> UST events:
>> -------------
>> None
>> </quote>
>>
>> Before or after running qemu. What is the mechanism lttng expects to
>> find out all these events?
>
> Either the user should belong the group "tracing", or launch the 
> lttng-sessiond daemon (lttng-sessiond -d).
<snip>

Hmm I've done both and I get nothing still. I can enable all tracepoints
though. This could just be a Ubuntu weirdness thing though.

I'm not sure if mentioning the group/daemon requirements in the tracing
doc is required though. I guess these things can be a little
package/distro specific?
Mohamad Gebai Oct. 17, 2013, 1:02 a.m. UTC | #4
On 13-10-16 08:05 AM, Alex Bennée wrote:
>>> Running this gives me:
>>>
>>> <quote>
>>> UST events:
>>> -------------
>>> None
>>> </quote>
>>>
>>> Before or after running qemu. What is the mechanism lttng expects to
>>> find out all these events?
>> Either the user should belong the group "tracing", or launch the
>> lttng-sessiond daemon (lttng-sessiond -d).
> <snip>
>
> Hmm I've done both and I get nothing still. I can enable all tracepoints
> though. This could just be a Ubuntu weirdness thing though.

That's weird. I did test it on a clean Ubuntu Precise (in a VM) and I 
didn't have any problem after either one of these steps. Can you please 
make sure that the user belongs to the "tracing" group and that the 
lttng-sessiond daemon is running before running any instance of Qemu. 
Also, Qemu should be running for LTTng to be able to list the events.

Does lttng enable-event -a -u/start/stop/view show any event?

>
> I'm not sure if mentioning the group/daemon requirements in the tracing
> doc is required though. I guess these things can be a little
> package/distro specific?
>
> '

This isn't really specific to Ubuntu, it's the setup of LTTng so I guess 
I could add it to the documentation as well.

Thanks!
Mohamad
Alex Bennée Oct. 17, 2013, 9:20 a.m. UTC | #5
mohamad.gebai@polymtl.ca writes:

> On 13-10-16 08:05 AM, Alex Bennée wrote:
>>>> Running this gives me:
>>>>
>>>> <quote>
>>>> UST events:
>>>> -------------
>>>> None
>>>> </quote>
>>>>
>>>> Before or after running qemu. What is the mechanism lttng expects to
>>>> find out all these events?
>>> Either the user should belong the group "tracing", or launch the
>>> lttng-sessiond daemon (lttng-sessiond -d).
>> <snip>
>>
>> Hmm I've done both and I get nothing still. I can enable all tracepoints
>> though. This could just be a Ubuntu weirdness thing though.
>
> That's weird. I did test it on a clean Ubuntu Precise (in a VM) and I 
> didn't have any problem after either one of these steps. Can you please 
> make sure that the user belongs to the "tracing" group and that the 
> lttng-sessiond daemon is running before running any instance of Qemu. 
> Also, Qemu should be running for LTTng to be able to list the events.

Ahh that was it. I suggest you change the wording from:

"Package lttng-tools is required for userspace tracing. After running Qemu, LTTng
should be able to list all available events:"

to

"Package lttng-tools is required for userspace tracing. While running
and instrumented Qemu, LTTng should be able to list all available events:"

> Does lttng enable-event -a -u/start/stop/view show any event?

Yes, as I said the rest worked fine. With that minor wording fix I'm happy.

Thanks for getting this back into shape :-)
Mohamad Gebai Oct. 18, 2013, 6:38 a.m. UTC | #6
On 13-10-17 05:20 AM, Alex Bennée wrote:
> mohamad.gebai@polymtl.ca writes:
>
>> On 13-10-16 08:05 AM, Alex Bennée wrote:
>>>>> Running this gives me:
>>>>>
>>>>> <quote>
>>>>> UST events:
>>>>> -------------
>>>>> None
>>>>> </quote>
>>>>>
>>>>> Before or after running qemu. What is the mechanism lttng expects to
>>>>> find out all these events?
>>>> Either the user should belong the group "tracing", or launch the
>>>> lttng-sessiond daemon (lttng-sessiond -d).
>>> <snip>
>>>
>>> Hmm I've done both and I get nothing still. I can enable all tracepoints
>>> though. This could just be a Ubuntu weirdness thing though.
>> That's weird. I did test it on a clean Ubuntu Precise (in a VM) and I
>> didn't have any problem after either one of these steps. Can you please
>> make sure that the user belongs to the "tracing" group and that the
>> lttng-sessiond daemon is running before running any instance of Qemu.
>> Also, Qemu should be running for LTTng to be able to list the events.
> Ahh that was it. I suggest you change the wording from:
>
> "Package lttng-tools is required for userspace tracing. After running Qemu, LTTng
> should be able to list all available events:"
>
> to
>
> "Package lttng-tools is required for userspace tracing. While running
> and instrumented Qemu, LTTng should be able to list all available events:"

Oops! Sorry about that.
>
>> Does lttng enable-event -a -u/start/stop/view show any event?
> Yes, as I said the rest worked fine. With that minor wording fix I'm happy.
>
> Thanks for getting this back into shape :-)
>
Happy to do it, I hope it will be useful to others.

Mohamad
diff mbox

Patch

diff --git a/docs/tracing.txt b/docs/tracing.txt
index bfc261b..64683db 100644
--- a/docs/tracing.txt
+++ b/docs/tracing.txt
@@ -214,6 +214,37 @@  The "ust" backend uses the LTTng Userspace Tracer library.  There are no
 monitor commands built into QEMU, instead UST utilities should be used to list,
 enable/disable, and dump traces.
 
+Package lttng-tools is required for userspace tracing. After running Qemu, LTTng
+should be able to list all available events:
+
+    lttng list -u
+
+Create tracing session:
+
+    lttng create mysession
+
+Enable events:
+
+    lttng enable-event qemu:g_malloc -u
+
+Where the events can either be a comma-separated list of events, or "-a" to
+enable all tracepoint events. Start and stop tracing as needed:
+
+    lttng start
+    lttng stop
+
+View the trace:
+
+    lttng view
+
+Destroy tracing session:
+
+    lttng destroy
+
+Babeltrace can be used at any later time to view the trace:
+
+    babeltrace $HOME/lttng-traces/mysession-<date>-<time>
+
 === SystemTap ===
 
 The "dtrace" backend uses DTrace sdt probes but has only been tested with