####################################################################
# Copyright (c) 2012, 2014 Ericsson
#
# All rights reserved. This program and the accompanying materials are
# made available under the terms of the Eclipse Public License 2.0 which
# accompanies this distribution, and is available at
# https://www.eclipse.org/legal/epl-2.0/
#
# SPDX-License-Identifier: EPL-2.0
#
# Contributors:
#    Bernd Hufmann - Initial API and implementation
####################################################################
####################################################################
# Scenario: Initialize
####################################################################
<SCENARIO>
Initialize
<COMMAND_INPUT>
lttng version
</COMMAND_INPUT>
<COMMAND_RESULT>
0
</COMMAND_RESULT>
<COMMAND_OUTPUT>
lttng version 2.0.0 - Annedd'ale
Web site: http://lttng.org/

lttng is free software and under the GPL license and part LGPL
</COMMAND_OUTPUT>

<COMMAND_INPUT>
lttng list
</COMMAND_INPUT>
<COMMAND_RESULT>
0
</COMMAND_RESULT>
<COMMAND_OUTPUT>
Currently no available tracing session
</COMMAND_OUTPUT>

<COMMAND_INPUT>
lttng list -k
</COMMAND_INPUT>
<COMMAND_RESULT>
0
</COMMAND_RESULT>
<COMMAND_OUTPUT>
Kernel events
-------------
      sched_kthread_stop (loglevel: TRACE_EMERG (0)) (type: tracepoint)
      sched_kthread_stop_ret (loglevel: TRACE_EMERG (0)) (type: tracepoint)
      sched_wakeup_new (loglevel: TRACE_EMERG (0)) (type: tracepoint)

</COMMAND_OUTPUT>

<COMMAND_INPUT>
lttng list -u
</COMMAND_INPUT>
<COMMAND_RESULT>
0
</COMMAND_RESULT>
<COMMAND_OUTPUT>
UST events:
-------------

PID: 9379 - Name: /home/user/git/lttng-ust/tests/hello.cxx/.libs/lt-hello
    ust_tests_hello:tptest_sighandler (loglevel: TRACE_WARNING (4)) (type: tracepoint)
    ust_tests_hello:tptest (loglevel: TRACE_DEBUG_FUNCTION (12)) (type: tracepoint)

PID: 4852 - Name: /home/user/git/lttng-ust/tests/hello.cxx/.libs/lt-hello
    ust_tests_hello:tptest_sighandler (loglevel: TRACE_WARNING (4)) (type: tracepoint)
    ust_tests_hello:tptest (loglevel: TRACE_DEBUG_FUNCTION (12)) (type: tracepoint)

</COMMAND_OUTPUT>
</SCENARIO>

####################################################################
# Scenario: Create and destroy session
####################################################################
<SCENARIO>
SessionHandling
<SCENARIO>
<COMMAND_INPUT>
lttng create mysession
</COMMAND_INPUT>
<COMMAND_RESULT>
0
</COMMAND_RESULT>
<COMMAND_OUTPUT>
Session mysession created.
Traces will be written in /home/user/lttng-traces/mysession-20120314-132824
</COMMAND_OUTPUT>

<COMMAND_INPUT>
lttng list mysession
</COMMAND_INPUT>
<COMMAND_RESULT>
0
</COMMAND_RESULT>
<COMMAND_OUTPUT>
Tracing session mysession: [inactive]
    Trace path: /home/user/lttng-traces/mysession-20120314-132824

</COMMAND_OUTPUT>

<COMMAND_INPUT>
lttng destroy mysession
</COMMAND_INPUT>
<COMMAND_RESULT>
0
</COMMAND_RESULT>
<COMMAND_OUTPUT>
Session mysession destroyed.
</COMMAND_OUTPUT>

<COMMAND_INPUT>
lttng start mysession
</COMMAND_INPUT>
<COMMAND_RESULT>
0
</COMMAND_RESULT>
<COMMAND_OUTPUT>
Tracing started for session mysession.
</COMMAND_OUTPUT>

<COMMAND_INPUT>
lttng stop mysession
</COMMAND_INPUT>
<COMMAND_RESULT>
0
</COMMAND_RESULT>
<COMMAND_OUTPUT>
Tracing stopped for session mysession.
</COMMAND_OUTPUT>

</SCENARIO>

####################################################################
# Scenario: Create and destroy session
####################################################################
<SCENARIO>
SessionHandlingWithPath
<SCENARIO>
<COMMAND_INPUT>
lttng create mysession -o /home/user/temp
</COMMAND_INPUT>
<COMMAND_RESULT>
0
</COMMAND_RESULT>
<COMMAND_OUTPUT>
Session mysession created.
Traces will be written in /home/user/temp
</COMMAND_OUTPUT>

<COMMAND_INPUT>
lttng list mysession
</COMMAND_INPUT>
<COMMAND_RESULT>
0
</COMMAND_RESULT>
<COMMAND_OUTPUT>
Tracing session mysession: [inactive]
    Trace path: /home/user/temp

</COMMAND_OUTPUT>

<COMMAND_INPUT>
lttng destroy mysession
</COMMAND_INPUT>
<COMMAND_RESULT>
0
</COMMAND_RESULT>
<COMMAND_OUTPUT>
Session mysession destroyed.
</COMMAND_OUTPUT>

</SCENARIO>


####################################################################
# Scenario: Enable events from kernel provider events
####################################################################
<SCENARIO>
Scenario1


<COMMAND_INPUT>
lttng enable-event sched_kthread_stop,sched_kthread_stop_ret -k -s mysession --tracepoint
</COMMAND_INPUT>
<COMMAND_RESULT>
0
</COMMAND_RESULT>
<COMMAND_OUTPUT>
kernel event sched_kthread_stop created in channel channel0
kernel sched_kthread_stop_ret created in channel channel0
</COMMAND_OUTPUT>

<COMMAND_INPUT>
lttng list mysession
</COMMAND_INPUT>
<COMMAND_RESULT>
0
</COMMAND_RESULT>
<COMMAND_OUTPUT>
Tracing session mysession: [inactive]
    Trace path: /home/user/lttng-traces/mysession-20120314-132824

=== Domain: Kernel ===

Channels:
-------------
- channel0: [enabled]

    Attributes:
      overwrite mode: 0
      subbufers size: 262144
      number of subbufers: 4
      switch timer interval: 0
      read timer interval: 200
      output: splice()

    Events:
      sched_kthread_stop_ret (loglevel: TRACE_EMERG (0)) (type: tracepoint) [enabled]
      sched_kthread_stop (loglevel: TRACE_EMERG (0)) (type: tracepoint) [enabled]

</COMMAND_OUTPUT>

<COMMAND_INPUT>
lttng disable-event sched_kthread_stop_ret,sched_kthread_stop -k -s mysession -c channel0
</COMMAND_INPUT>
<COMMAND_RESULT>
0
</COMMAND_RESULT>
<COMMAND_OUTPUT>
kernel event sched_kthread_stop_ret disabled in channel channel0
kernel event sched_kthread_stop disabled in channel channel0
</COMMAND_OUTPUT>

<COMMAND_INPUT>
lttng enable-event sched_kthread_stop -k -s mysession -c channel0 --tracepoint
</COMMAND_INPUT>
<COMMAND_RESULT>
0
</COMMAND_RESULT>
<COMMAND_OUTPUT>
kernel event sched_kthread_stop enabled in channel channel0
</COMMAND_OUTPUT>

</SCENARIO>

####################################################################
# Scenario: Enable events from UST provider events
####################################################################
<SCENARIO>
Scenario2

<COMMAND_INPUT>
lttng enable-channel mychannel -u -s mysession --subbuf-size 16384 --num-subbuf 2 --switch-timer 200 --read-timer 100
</COMMAND_INPUT>
<COMMAND_RESULT>
0
</COMMAND_RESULT>
<COMMAND_OUTPUT>
UST channel mychannel enabled for session mysession
</COMMAND_OUTPUT>

<COMMAND_INPUT>
lttng list mysession
</COMMAND_INPUT>
<COMMAND_RESULT>
0
</COMMAND_RESULT>
<COMMAND_OUTPUT>
Tracing session mysession: [inactive]
    Trace path: /home/user/temp

=== Domain: UST global ===

Channels:
-------------
- mychannel: [enabled]

    Attributes:
      overwrite mode: 0
      subbufers size: 16384
      number of subbufers: 2
      switch timer interval: 200
      read timer interval: 100
      output: mmap()

    Events:
      None

</COMMAND_OUTPUT>

<COMMAND_INPUT>
lttng enable-event ust_tests_hello:tptest_sighandler,ust_tests_hello:tptest -u -s mysession --tracepoint
</COMMAND_INPUT>
<COMMAND_RESULT>
0
</COMMAND_RESULT>
<COMMAND_OUTPUT>
UST event ust_tests_hello:tptest_sighandler in channel channel0
UST sched_ust_tests_hello:tptest created in channel channel0
</COMMAND_OUTPUT>

<COMMAND_INPUT>
lttng list mysession
</COMMAND_INPUT>
<COMMAND_RESULT>
0
</COMMAND_RESULT>
<COMMAND_OUTPUT>
Tracing session mysession: [inactive]
    Trace path: /home/user/temp

=== Domain: UST global ===

Channels:
-------------
- mychannel: [enabled]

    Attributes:
      overwrite mode: 0
      subbufers size: 16384
      number of subbufers: 2
      switch timer interval: 200
      read timer interval: 100
      output: mmap()

    Events:
      ust_tests_hello:tptest_sighandler (type: tracepoint) [enabled]
      ust_tests_hello:tptest (type: tracepoint) [enabled]

</COMMAND_OUTPUT>

<COMMAND_INPUT>
lttng disable-event ust_tests_hello:tptest -u -s mysession -c mychannel
</COMMAND_INPUT>
<COMMAND_RESULT>
0
</COMMAND_RESULT>
<COMMAND_OUTPUT>
kernel event ust_tests_hello:tptest in channel mychannel
</COMMAND_OUTPUT>

<COMMAND_INPUT>
lttng enable-event ust_tests_hello:tptest -u -s mysession -c mychannel --tracepoint
</COMMAND_INPUT>
<COMMAND_RESULT>
0
</COMMAND_RESULT>
<COMMAND_OUTPUT>
kernel event ust_tests_hello:tptest enabled in channel mychannel
</COMMAND_OUTPUT>

</SCENARIO>

<SCENARIO>
Scenario3

<COMMAND_INPUT>
lttng enable-channel mychannel -k -s mysession --overwrite --subbuf-size 16384 --num-subbuf 4 --switch-timer 100 --read-timer 200
</COMMAND_INPUT>
<COMMAND_RESULT>
0
</COMMAND_RESULT>
<COMMAND_OUTPUT>
Kernel channel mychannel enabled for session mysession
</COMMAND_OUTPUT>

<COMMAND_INPUT>
lttng list mysession
</COMMAND_INPUT>
<COMMAND_RESULT>
0
</COMMAND_RESULT>
<COMMAND_OUTPUT>
Tracing session mysession: [inactive]
    Trace path: /home/user/lttng-traces/mysession-20120314-132824

=== Domain: Kernel ===

Channels:
-------------
- mychannel: [enabled]

    Attributes:
      overwrite mode: 1
      subbufers size: 16384
      number of subbufers: 4
      switch timer interval: 100
      read timer interval: 200
      output: splice()

    Events:
      None

</COMMAND_OUTPUT>

<COMMAND_INPUT>
lttng enable-channel mychannel2 -k -s mysession --subbuf-size 32768 --num-subbuf 2 --switch-timer 100 --read-timer 200
</COMMAND_INPUT>
<COMMAND_RESULT>
0
</COMMAND_RESULT>
<COMMAND_OUTPUT>
Kernel channel mychannel2 enabled for session mysession
</COMMAND_OUTPUT>

<COMMAND_INPUT>
lttng list mysession
</COMMAND_INPUT>
<COMMAND_RESULT>
0
</COMMAND_RESULT>
<COMMAND_OUTPUT>
Tracing session mysession: [inactive]
    Trace path: /home/user/lttng-traces/mysession-20120314-132824

=== Domain: Kernel ===

Channels:
-------------
- mychannel: [enabled]

    Attributes:
      overwrite mode: 1
      subbufers size: 16384
      number of subbufers: 4
      switch timer interval: 100
      read timer interval: 200
      output: splice()

    Events:
      None

- mychannel2: [enabled]

    Attributes:
      overwrite mode: 0
      subbufers size: 32768
      number of subbufers: 2
      switch timer interval: 100
      read timer interval: 200
      output: splice()

    Events:
      None

</COMMAND_OUTPUT>


<COMMAND_INPUT>
lttng disable-channel mychannel,mychannel2 -k -s mysession
</COMMAND_INPUT>
<COMMAND_RESULT>
0
</COMMAND_RESULT>
<COMMAND_OUTPUT>
Kernel channel mychannel disabled for session mysession
Kernel channel mychannel2 disabled for session mysession
</COMMAND_OUTPUT>

<COMMAND_INPUT>
lttng enable-channel mychannel,mychannel2 -k -s mysession
</COMMAND_INPUT>
<COMMAND_RESULT>
0
</COMMAND_RESULT>
<COMMAND_OUTPUT>
Kernel channel mychannel enabled for session mysession
Kernel channel mychannel2 enabled for session mysession
</COMMAND_OUTPUT>

<COMMAND_INPUT>
lttng enable-event sched_kthread_stop,sched_kthread_stop_ret -k -s mysession --tracepoint
</COMMAND_INPUT>
<COMMAND_RESULT>
0
</COMMAND_RESULT>
<COMMAND_OUTPUT>
kernel event sched_kthread_stop created in channel channel0
kernel sched_kthread_stop_ret created in channel channel0
</COMMAND_OUTPUT>

<COMMAND_INPUT>
lttng list mysession
</COMMAND_INPUT>
<COMMAND_RESULT>
0
</COMMAND_RESULT>
<COMMAND_OUTPUT>
Tracing session mysession: [inactive]
    Trace path: /home/user/lttng-traces/mysession-20120314-132824

=== Domain: Kernel ===

Channels:
-------------
- mychannel: [enabled]

    Attributes:
      overwrite mode: 1
      subbufers size: 16384
      number of subbufers: 4
      switch timer interval: 100
      read timer interval: 200
      output: splice()

    Events:
      None

- mychannel2: [enabled]

    Attributes:
      overwrite mode: 0
      subbufers size: 32768
      number of subbufers: 2
      switch timer interval: 100
      read timer interval: 200
      output: splice()

    Events:
      None

- channel0: [enabled]

    Attributes:
      overwrite mode: 0
      subbufers size: 262144
      number of subbufers: 4
      switch timer interval: 0
      read timer interval: 200
      output: splice()

    Events:
      sched_kthread_stop_ret (loglevel: TRACE_EMERG (0)) (type: tracepoint) [enabled]
      sched_kthread_stop (loglevel: TRACE_EMERG (0)) (type: tracepoint) [enabled]

</COMMAND_OUTPUT>

<COMMAND_INPUT>
lttng enable-event sched_wakeup_new -k -s mysession --tracepoint
</COMMAND_INPUT>
<COMMAND_RESULT>
0
</COMMAND_RESULT>
<COMMAND_OUTPUT>
kernel event sched_wakeup_new created in channel channel0
</COMMAND_OUTPUT>

<COMMAND_INPUT>
lttng list mysession
</COMMAND_INPUT>
<COMMAND_RESULT>
0
</COMMAND_RESULT>
<COMMAND_OUTPUT>
Tracing session mysession: [inactive]
    Trace path: /home/user/lttng-traces/mysession-20120314-132824

=== Domain: Kernel ===

Channels:
-------------
- mychannel: [enabled]

    Attributes:
      overwrite mode: 1
      subbufers size: 16384
      number of subbufers: 4
      switch timer interval: 100
      read timer interval: 200
      output: splice()

    Events:
      None

- mychannel2: [enabled]

    Attributes:
      overwrite mode: 0
      subbufers size: 32768
      number of subbufers: 2
      switch timer interval: 100
      read timer interval: 200
      output: splice()

    Events:
      None

- channel0: [enabled]

    Attributes:
      overwrite mode: 0
      subbufers size: 262144
      number of subbufers: 4
      switch timer interval: 0
      read timer interval: 200
      output: splice()

    Events:
      sched_kthread_stop_ret (loglevel: TRACE_EMERG (0)) (type: tracepoint) [enabled]
      sched_kthread_stop (loglevel: TRACE_EMERG (0)) (type: tracepoint) [enabled]
      sched_wakeup_new (loglevel: TRACE_EMERG (0)) (type: tracepoint) [enabled]

</COMMAND_OUTPUT>

<COMMAND_INPUT>
lttng enable-event -a -k -s mysession -c mychannel2 --tracepoint
</COMMAND_INPUT>
<COMMAND_RESULT>
0
</COMMAND_RESULT>
<COMMAND_OUTPUT>
All kernel event sched_kthread_stop created in channel channel0
</COMMAND_OUTPUT>

<COMMAND_INPUT>
lttng list mysession
</COMMAND_INPUT>
<COMMAND_RESULT>
0
</COMMAND_RESULT>
<COMMAND_OUTPUT>
Tracing session mysession: [inactive]
    Trace path: /home/user/lttng-traces/mysession-20120314-132824

=== Domain: Kernel ===

Channels:
-------------
- mychannel: [enabled]

    Attributes:
      overwrite mode: 1
      subbufers size: 16384
      number of subbufers: 4
      switch timer interval: 100
      read timer interval: 200
      output: splice()

    Events:
      None

- mychannel2: [enabled]

    Attributes:
      overwrite mode: 0
      subbufers size: 32768
      number of subbufers: 2
      switch timer interval: 100
      read timer interval: 200
      output: splice()

    Events:
      sched_kthread_stop_ret (loglevel: TRACE_EMERG (0)) (type: tracepoint) [enabled]
      sched_kthread_stop (loglevel: TRACE_EMERG (0)) (type: tracepoint) [enabled]
      sched_wakeup_new (loglevel: TRACE_EMERG (0)) (type: tracepoint) [enabled]

- channel0: [enabled]

    Attributes:
      overwrite mode: 0
      subbufers size: 262144
      number of subbufers: 4
      switch timer interval: 0
      read timer interval: 200
      output: splice()

    Events:
      sched_kthread_stop_ret (loglevel: TRACE_EMERG (0)) (type: tracepoint) [enabled]
      sched_kthread_stop (loglevel: TRACE_EMERG (0)) (type: tracepoint) [enabled]
      sched_wakeup_new (loglevel: TRACE_EMERG (0)) (type: tracepoint) [enabled]

</COMMAND_OUTPUT>

<COMMAND_INPUT>
lttng enable-event -a -k -s mysession -c mychannel --syscall
</COMMAND_INPUT>
<COMMAND_RESULT>
0
</COMMAND_RESULT>
<COMMAND_OUTPUT>
All kernel system calls are enabled in channel mychannel
</COMMAND_OUTPUT>

<COMMAND_INPUT>
lttng list mysession
</COMMAND_INPUT>
<COMMAND_RESULT>
0
</COMMAND_RESULT>
<COMMAND_OUTPUT>
Tracing session mysession: [inactive]
    Trace path: /home/user/lttng-traces/mysession-20120314-132824

=== Domain: Kernel ===

Channels:
-------------
- mychannel: [enabled]

    Attributes:
      overwrite mode: 1
      subbufers size: 16384
      number of subbufers: 4
      switch timer interval: 100
      read timer interval: 200
      output: splice()

    Events:
      syscalls (type: syscall) [enabled]

- mychannel2: [enabled]

    Attributes:
      overwrite mode: 0
      subbufers size: 32768
      number of subbufers: 2
      switch timer interval: 100
      read timer interval: 200
      output: splice()

    Events:
      sched_kthread_stop_ret (loglevel: TRACE_EMERG (0)) (type: tracepoint) [enabled]
      sched_kthread_stop (loglevel: TRACE_EMERG (0)) (type: tracepoint) [enabled]
      sched_wakeup_new (loglevel: TRACE_EMERG (0)) (type: tracepoint) [enabled]

- channel0: [enabled]

    Attributes:
      overwrite mode: 0
      subbufers size: 262144
      number of subbufers: 4
      switch timer interval: 0
      read timer interval: 200
      output: splice()

    Events:
      sched_kthread_stop_ret (loglevel: TRACE_EMERG (0)) (type: tracepoint) [enabled]
      sched_kthread_stop (loglevel: TRACE_EMERG (0)) (type: tracepoint) [enabled]
      sched_wakeup_new (loglevel: TRACE_EMERG (0)) (type: tracepoint) [enabled]

</COMMAND_OUTPUT>

<COMMAND_INPUT>
lttng enable-event -a -k -s mysession --syscall
</COMMAND_INPUT>
<COMMAND_RESULT>
0
</COMMAND_RESULT>
<COMMAND_OUTPUT>
All kernel system calls are enabled in channel channel0
</COMMAND_OUTPUT>

<COMMAND_INPUT>
lttng list mysession
</COMMAND_INPUT>
<COMMAND_RESULT>
0
</COMMAND_RESULT>
<COMMAND_OUTPUT>
Tracing session mysession: [inactive]
    Trace path: /home/user/lttng-traces/mysession-20120314-132824

=== Domain: Kernel ===

Channels:
-------------
- mychannel: [enabled]

    Attributes:
      overwrite mode: 1
      subbufers size: 16384
      number of subbufers: 4
      switch timer interval: 100
      read timer interval: 200
      output: splice()

    Events:
      syscalls (type: syscall) [enabled]

- mychannel2: [enabled]

    Attributes:
      overwrite mode: 0
      subbufers size: 32768
      number of subbufers: 2
      switch timer interval: 100
      read timer interval: 200
      output: splice()

    Events:
      sched_kthread_stop_ret (loglevel: TRACE_EMERG (0)) (type: tracepoint) [enabled]
      sched_kthread_stop (loglevel: TRACE_EMERG (0)) (type: tracepoint) [enabled]
      sched_wakeup_new (loglevel: TRACE_EMERG (0)) (type: tracepoint) [enabled]

- channel0: [enabled]

    Attributes:
      overwrite mode: 0
      subbufers size: 262144
      number of subbufers: 4
      switch timer interval: 0
      read timer interval: 200
      output: splice()

    Events:
      syscalls (type: syscall) [enabled]
      sched_kthread_stop_ret (loglevel: TRACE_EMERG (0)) (type: tracepoint) [enabled]
      sched_kthread_stop (loglevel: TRACE_EMERG (0)) (type: tracepoint) [enabled]
      sched_wakeup_new (loglevel: TRACE_EMERG (0)) (type: tracepoint) [enabled]

</COMMAND_OUTPUT>

<COMMAND_INPUT>
lttng enable-event -a -k -s mysession --syscall
</COMMAND_INPUT>
<COMMAND_RESULT>
0
</COMMAND_RESULT>
<COMMAND_OUTPUT>
All kernel system calls are enabled in channel channel0
</COMMAND_OUTPUT>

<COMMAND_INPUT>
lttng list mysession
</COMMAND_INPUT>
<COMMAND_RESULT>
0
</COMMAND_RESULT>
<COMMAND_OUTPUT>
Tracing session mysession: [inactive]
    Trace path: /home/user/lttng-traces/mysession-20120314-132824

=== Domain: Kernel ===

Channels:
-------------
- mychannel: [enabled]

    Attributes:
      overwrite mode: 1
      subbufers size: 16384
      number of subbufers: 4
      switch timer interval: 100
      read timer interval: 200
      output: splice()

    Events:
      syscalls (type: syscall) [enabled]

- mychannel2: [enabled]

    Attributes:
      overwrite mode: 0
      subbufers size: 32768
      number of subbufers: 2
      switch timer interval: 100
      read timer interval: 200
      output: splice()

    Events:
      sched_kthread_stop_ret (loglevel: TRACE_EMERG (0)) (type: tracepoint) [enabled]
      sched_kthread_stop (loglevel: TRACE_EMERG (0)) (type: tracepoint) [enabled]
      sched_wakeup_new (loglevel: TRACE_EMERG (0)) (type: tracepoint) [enabled]

- channel0: [enabled]

    Attributes:
      overwrite mode: 0
      subbufers size: 262144
      number of subbufers: 4
      switch timer interval: 0
      read timer interval: 200
      output: splice()

    Events:
      syscalls (type: syscall) [enabled]
      sched_kthread_stop_ret (loglevel: TRACE_EMERG (0)) (type: tracepoint) [enabled]
      sched_kthread_stop (loglevel: TRACE_EMERG (0)) (type: tracepoint) [enabled]
      sched_wakeup_new (loglevel: TRACE_EMERG (0)) (type: tracepoint) [enabled]

</COMMAND_OUTPUT>

<COMMAND_INPUT>
lttng enable-event myevent1 -k -s mysession --probe 0xc0101280
</COMMAND_INPUT>
<COMMAND_RESULT>
0
</COMMAND_RESULT>
<COMMAND_OUTPUT>
kernel event myevent1 created in channel channel0
</COMMAND_OUTPUT>

<COMMAND_INPUT>
lttng list mysession
</COMMAND_INPUT>
<COMMAND_RESULT>
0
</COMMAND_RESULT>
<COMMAND_OUTPUT>
Tracing session mysession: [inactive]
    Trace path: /home/user/lttng-traces/mysession-20120314-132824

=== Domain: Kernel ===

Channels:
-------------
- mychannel: [enabled]

    Attributes:
      overwrite mode: 1
      subbufers size: 16384
      number of subbufers: 4
      switch timer interval: 100
      read timer interval: 200
      output: splice()

    Events:
      syscalls (type: syscall) [enabled]

- mychannel2: [enabled]

    Attributes:
      overwrite mode: 0
      subbufers size: 32768
      number of subbufers: 2
      switch timer interval: 100
      read timer interval: 200
      output: splice()

    Events:
      sched_kthread_stop_ret (loglevel: TRACE_EMERG (0)) (type: tracepoint) [enabled]
      sched_kthread_stop (loglevel: TRACE_EMERG (0)) (type: tracepoint) [enabled]
      sched_wakeup_new (loglevel: TRACE_EMERG (0)) (type: tracepoint) [enabled]

- channel0: [enabled]

    Attributes:
      overwrite mode: 0
      subbufers size: 262144
      number of subbufers: 4
      switch timer interval: 0
      read timer interval: 200
      output: splice()

    Events:
      myevent1 (type: probe) [enabled]
        addr: 0xc0101280
      syscalls (type: syscall) [enabled]
      sched_kthread_stop_ret (loglevel: TRACE_EMERG (0)) (type: tracepoint) [enabled]
      sched_kthread_stop (loglevel: TRACE_EMERG (0)) (type: tracepoint) [enabled]
      sched_wakeup_new (loglevel: TRACE_EMERG (0)) (type: tracepoint) [enabled]

</COMMAND_OUTPUT>

<COMMAND_INPUT>
lttng enable-event myevent2 -k -s mysession -c channel0 --probe init_post
</COMMAND_INPUT>
<COMMAND_RESULT>
0
</COMMAND_RESULT>
<COMMAND_OUTPUT>
kernel event myevent2 created in channel channel0
</COMMAND_OUTPUT>

<COMMAND_INPUT>
lttng list mysession
</COMMAND_INPUT>
<COMMAND_RESULT>
0
</COMMAND_RESULT>
<COMMAND_OUTPUT>
Tracing session mysession: [inactive]
    Trace path: /home/user/lttng-traces/mysession-20120314-132824

=== Domain: Kernel ===

Channels:
-------------
- mychannel: [enabled]

    Attributes:
      overwrite mode: 1
      subbufers size: 16384
      number of subbufers: 4
      switch timer interval: 100
      read timer interval: 200
      output: splice()

    Events:
      syscalls (type: syscall) [enabled]

- mychannel2: [enabled]

    Attributes:
      overwrite mode: 0
      subbufers size: 32768
      number of subbufers: 2
      switch timer interval: 100
      read timer interval: 200
      output: splice()

    Events:
      sched_kthread_stop_ret (loglevel: TRACE_EMERG (0)) (type: tracepoint) [enabled]
      sched_kthread_stop (loglevel: TRACE_EMERG (0)) (type: tracepoint) [enabled]
      sched_wakeup_new (loglevel: TRACE_EMERG (0)) (type: tracepoint) [enabled]

- channel0: [enabled]

    Attributes:
      overwrite mode: 0
      subbufers size: 262144
      number of subbufers: 4
      switch timer interval: 0
      read timer interval: 200
      output: splice()

    Events:
      myevent2 (type: probe) [enabled]
        offset: 0x0
        symbol: init_post
      myevent1 (type: probe) [enabled]
        addr: 0xc0101280
      syscalls (type: syscall) [enabled]
      sched_kthread_stop_ret (loglevel: TRACE_EMERG (0)) (type: tracepoint) [enabled]
      sched_kthread_stop (loglevel: TRACE_EMERG (0)) (type: tracepoint) [enabled]
      sched_wakeup_new (loglevel: TRACE_EMERG (0)) (type: tracepoint) [enabled]

</COMMAND_OUTPUT>

<COMMAND_INPUT>
lttng enable-event myevent3 -k -s mysession --probe init_post:0x1000
</COMMAND_INPUT>
<COMMAND_RESULT>
0
</COMMAND_RESULT>
<COMMAND_OUTPUT>
kernel event myevent2 created in channel channel0
</COMMAND_OUTPUT>

<COMMAND_INPUT>
lttng list mysession
</COMMAND_INPUT>
<COMMAND_RESULT>
0
</COMMAND_RESULT>
<COMMAND_OUTPUT>
Tracing session mysession: [inactive]
    Trace path: /home/user/lttng-traces/mysession-20120314-132824

=== Domain: Kernel ===

Channels:
-------------
- mychannel: [enabled]

    Attributes:
      overwrite mode: 1
      subbufers size: 16384
      number of subbufers: 4
      switch timer interval: 100
      read timer interval: 200
      output: splice()

    Events:
      syscalls (type: syscall) [enabled]

- mychannel2: [enabled]

    Attributes:
      overwrite mode: 0
      subbufers size: 32768
      number of subbufers: 2
      switch timer interval: 100
      read timer interval: 200
      output: splice()

    Events:
      sched_kthread_stop_ret (loglevel: TRACE_EMERG (0)) (type: tracepoint) [enabled]
      sched_kthread_stop (loglevel: TRACE_EMERG (0)) (type: tracepoint) [enabled]
      sched_wakeup_new (loglevel: TRACE_EMERG (0)) (type: tracepoint) [enabled]

- channel0: [enabled]

    Attributes:
      overwrite mode: 0
      subbufers size: 262144
      number of subbufers: 4
      switch timer interval: 0
      read timer interval: 200
      output: splice()

    Events:
      myevent3 (type: probe) [enabled]
        offset: 0x1000
        symbol: init_post
      myevent2 (type: probe) [enabled]
        offset: 0x0
        symbol: init_post
      myevent1 (type: probe) [enabled]
        addr: 0xc0101280
      syscalls (type: syscall) [enabled]
      sched_kthread_stop_ret (loglevel: TRACE_EMERG (0)) (type: tracepoint) [enabled]
      sched_kthread_stop (loglevel: TRACE_EMERG (0)) (type: tracepoint) [enabled]
      sched_wakeup_new (loglevel: TRACE_EMERG (0)) (type: tracepoint) [enabled]

</COMMAND_OUTPUT>

<COMMAND_INPUT>
lttng enable-event myevent4 -k -s mysession --function create_dev
</COMMAND_INPUT>
<COMMAND_RESULT>
0
</COMMAND_RESULT>
<COMMAND_OUTPUT>
kernel event myevent4 created in channel channel0
</COMMAND_OUTPUT>

<COMMAND_INPUT>
lttng list mysession
</COMMAND_INPUT>
<COMMAND_RESULT>
0
</COMMAND_RESULT>
<COMMAND_OUTPUT>
Tracing session mysession: [inactive]
    Trace path: /home/user/lttng-traces/mysession-20120314-132824

=== Domain: Kernel ===

Channels:
-------------
- mychannel: [enabled]

    Attributes:
      overwrite mode: 1
      subbufers size: 16384
      number of subbufers: 4
      switch timer interval: 100
      read timer interval: 200
      output: splice()

    Events:
      syscalls (type: syscall) [enabled]

- mychannel2: [enabled]

    Attributes:
      overwrite mode: 0
      subbufers size: 32768
      number of subbufers: 2
      switch timer interval: 100
      read timer interval: 200
      output: splice()

    Events:
      sched_kthread_stop_ret (loglevel: TRACE_EMERG (0)) (type: tracepoint) [enabled]
      sched_kthread_stop (loglevel: TRACE_EMERG (0)) (type: tracepoint) [enabled]
      sched_wakeup_new (loglevel: TRACE_EMERG (0)) (type: tracepoint) [enabled]

- channel0: [enabled]

    Attributes:
      overwrite mode: 0
      subbufers size: 262144
      number of subbufers: 4
      switch timer interval: 0
      read timer interval: 200
      output: splice()

    Events:
      myevent4 (type: function) [enabled]
        offset: 0x0
        symbol: create_dev
      myevent3 (type: probe) [enabled]
        offset: 0x1000
        symbol: init_post
      myevent2 (type: probe) [enabled]
        offset: 0x0
        symbol: init_post
      myevent1 (type: probe) [enabled]
        addr: 0xc0101280
      syscalls (type: syscall) [enabled]
      sched_kthread_stop_ret (loglevel: TRACE_EMERG (0)) (type: tracepoint) [enabled]
      sched_kthread_stop (loglevel: TRACE_EMERG (0)) (type: tracepoint) [enabled]
      sched_wakeup_new (loglevel: TRACE_EMERG (0)) (type: tracepoint) [enabled]

</COMMAND_OUTPUT>

<COMMAND_INPUT>
lttng enable-event myevent5 -k -s mysession --function create_dev:0x2000
</COMMAND_INPUT>
<COMMAND_RESULT>
0
</COMMAND_RESULT>
<COMMAND_OUTPUT>
kernel event myevent5 created in channel channel0
</COMMAND_OUTPUT>

<COMMAND_INPUT>
lttng list mysession
</COMMAND_INPUT>
<COMMAND_RESULT>
0
</COMMAND_RESULT>
<COMMAND_OUTPUT>
Tracing session mysession: [inactive]
    Trace path: /home/user/lttng-traces/mysession-20120314-132824

=== Domain: Kernel ===

Channels:
-------------
- mychannel: [enabled]

    Attributes:
      overwrite mode: 1
      subbufers size: 16384
      number of subbufers: 4
      switch timer interval: 100
      read timer interval: 200
      output: splice()

    Events:
      syscalls (type: syscall) [enabled]

- mychannel2: [enabled]

    Attributes:
      overwrite mode: 0
      subbufers size: 32768
      number of subbufers: 2
      switch timer interval: 100
      read timer interval: 200
      output: splice()

    Events:
      sched_kthread_stop_ret (loglevel: TRACE_EMERG (0)) (type: tracepoint) [enabled]
      sched_kthread_stop (loglevel: TRACE_EMERG (0)) (type: tracepoint) [enabled]
      sched_wakeup_new (loglevel: TRACE_EMERG (0)) (type: tracepoint) [enabled]

- channel0: [enabled]

    Attributes:
      overwrite mode: 0
      subbufers size: 262144
      number of subbufers: 4
      switch timer interval: 0
      read timer interval: 200
      output: splice()

    Events:
      myevent5 (type: probe) [enabled]
        offset: 0x2000
        symbol: create_dev
      myevent4 (type: function) [enabled]
        offset: 0x0
        symbol: create_dev
      myevent3 (type: probe) [enabled]
        offset: 0x1000
        symbol: init_post
      myevent2 (type: probe) [enabled]
        offset: 0x0
        symbol: init_post
      myevent1 (type: probe) [enabled]
        addr: 0xc0101280
      syscalls (type: syscall) [enabled]
      sched_kthread_stop_ret (loglevel: TRACE_EMERG (0)) (type: tracepoint) [enabled]
      sched_kthread_stop (loglevel: TRACE_EMERG (0)) (type: tracepoint) [enabled]
      sched_wakeup_new (loglevel: TRACE_EMERG (0)) (type: tracepoint) [enabled]

</COMMAND_OUTPUT>

<COMMAND_INPUT>
lttng enable-event myevent -k -s mysession -c mychannel --function create_dev:0x2000
</COMMAND_INPUT>
<COMMAND_RESULT>
0
</COMMAND_RESULT>
<COMMAND_OUTPUT>
kernel event myevent created in channel mychannel
</COMMAND_OUTPUT>

<COMMAND_INPUT>
lttng list mysession
</COMMAND_INPUT>
<COMMAND_RESULT>
0
</COMMAND_RESULT>
<COMMAND_OUTPUT>
Tracing session mysession: [inactive]
    Trace path: /home/user/lttng-traces/mysession-20120314-132824

=== Domain: Kernel ===

Channels:
-------------
- mychannel: [enabled]

    Attributes:
      overwrite mode: 1
      subbufers size: 16384
      number of subbufers: 4
      switch timer interval: 100
      read timer interval: 200
      output: splice()

    Events:
      myevent (type: probe) [enabled]
        offset: 0x2000
        symbol: create_dev
      syscalls (type: syscall) [enabled]

- mychannel2: [enabled]

    Attributes:
      overwrite mode: 0
      subbufers size: 32768
      number of subbufers: 2
      switch timer interval: 100
      read timer interval: 200
      output: splice()

    Events:
      sched_kthread_stop_ret (loglevel: TRACE_EMERG (0)) (type: tracepoint) [enabled]
      sched_kthread_stop (loglevel: TRACE_EMERG (0)) (type: tracepoint) [enabled]
      sched_wakeup_new (loglevel: TRACE_EMERG (0)) (type: tracepoint) [enabled]

- channel0: [enabled]

    Attributes:
      overwrite mode: 0
      subbufers size: 262144
      number of subbufers: 4
      switch timer interval: 0
      read timer interval: 200
      output: splice()

    Events:
      myevent5 (type: probe) [enabled]
        offset: 0x2000
        symbol: create_dev
      myevent4 (type: function) [enabled]
        offset: 0x0
        symbol: create_dev
      myevent3 (type: probe) [enabled]
        offset: 0x1000
        symbol: init_post
      myevent2 (type: probe) [enabled]
        offset: 0x0
        symbol: init_post
      myevent1 (type: probe) [enabled]
        addr: 0xc0101280
      syscalls (type: syscall) [enabled]
      sched_kthread_stop_ret (loglevel: TRACE_EMERG (0)) (type: tracepoint) [enabled]
      sched_kthread_stop (loglevel: TRACE_EMERG (0)) (type: tracepoint) [enabled]
      sched_wakeup_new (loglevel: TRACE_EMERG (0)) (type: tracepoint) [enabled]

</COMMAND_OUTPUT>

<COMMAND_INPUT>
lttng list
</COMMAND_INPUT>
<COMMAND_RESULT>
0
</COMMAND_RESULT>
<COMMAND_OUTPUT>
Available tracing sessions:
  1) mysession (/home/eedbhu/lttng-traces/mysession-20120321-115617) [inactive]

Use lttng list <session_name> for more details
</COMMAND_OUTPUT>

<COMMAND_INPUT>
lttng list -k
</COMMAND_INPUT>
<COMMAND_RESULT>
0
</COMMAND_RESULT>
<COMMAND_OUTPUT>
Kernel events
-------------
      sched_kthread_stop (loglevel: TRACE_EMERG (0)) (type: tracepoint)
      sched_kthread_stop_ret (loglevel: TRACE_EMERG (0)) (type: tracepoint)
      sched_wakeup_new (loglevel: TRACE_EMERG (0)) (type: tracepoint)

</COMMAND_OUTPUT>

<COMMAND_INPUT>
lttng list -u
</COMMAND_INPUT>
<COMMAND_RESULT>
0
</COMMAND_RESULT>
<COMMAND_OUTPUT>
UST events:
-------------

PID: 9379 - Name: /home/user/git/lttng-ust/tests/hello.cxx/.libs/lt-hello
    ust_tests_hello:tptest_sighandler (loglevel: TRACE_WARNING (4)) (type: tracepoint)
    ust_tests_hello:tptest (loglevel: TRACE_DEBUG_FUNCTION (12)) (type: tracepoint)

PID: 4852 - Name: /home/user/git/lttng-ust/tests/hello.cxx/.libs/lt-hello
    ust_tests_hello:tptest_sighandler (loglevel: TRACE_WARNING (4)) (type: tracepoint)
    ust_tests_hello:tptest (loglevel: TRACE_DEBUG_FUNCTION (12)) (type: tracepoint)

</COMMAND_OUTPUT>

<COMMAND_INPUT>
lttng list mysession
</COMMAND_INPUT>
<COMMAND_RESULT>
0
</COMMAND_RESULT>
<COMMAND_OUTPUT>
Tracing session mysession: [inactive]
    Trace path: /home/user/lttng-traces/mysession-20120314-132824

=== Domain: Kernel ===

Channels:
-------------
- mychannel: [enabled]

    Attributes:
      overwrite mode: 1
      subbufers size: 16384
      number of subbufers: 4
      switch timer interval: 100
      read timer interval: 200
      output: splice()

    Events:
      myevent (type: probe) [enabled]
        offset: 0x2000
        symbol: create_dev
      syscalls (type: syscall) [enabled]

- mychannel2: [enabled]

    Attributes:
      overwrite mode: 0
      subbufers size: 32768
      number of subbufers: 2
      switch timer interval: 100
      read timer interval: 200
      output: splice()

    Events:
      sched_kthread_stop_ret (loglevel: TRACE_EMERG (0)) (type: tracepoint) [enabled]
      sched_kthread_stop (loglevel: TRACE_EMERG (0)) (type: tracepoint) [enabled]
      sched_wakeup_new (loglevel: TRACE_EMERG (0)) (type: tracepoint) [enabled]

- channel0: [enabled]

    Attributes:
      overwrite mode: 0
      subbufers size: 262144
      number of subbufers: 4
      switch timer interval: 0
      read timer interval: 200
      output: splice()

    Events:
      myevent5 (type: probe) [enabled]
        offset: 0x2000
        symbol: create_dev
      myevent4 (type: function) [enabled]
        offset: 0x0
        symbol: create_dev
      myevent3 (type: probe) [enabled]
        offset: 0x1000
        symbol: init_post
      myevent2 (type: probe) [enabled]
        offset: 0x0
        symbol: init_post
      myevent1 (type: probe) [enabled]
        addr: 0xc0101280
      syscalls (type: syscall) [enabled]
      sched_kthread_stop_ret (loglevel: TRACE_EMERG (0)) (type: tracepoint) [enabled]
      sched_kthread_stop (loglevel: TRACE_EMERG (0)) (type: tracepoint) [enabled]
      sched_wakeup_new (loglevel: TRACE_EMERG (0)) (type: tracepoint) [enabled]

</COMMAND_OUTPUT>

<COMMAND_INPUT>
lttng add-context -h
</COMMAND_INPUT>
<COMMAND_RESULT>
0
</COMMAND_RESULT>
<COMMAND_OUTPUT>
usage: lttng add-context -t TYPE

If no channel and no event is given (-c/-e), the context
will be added to all events and all channels.
Otherwise the context will be added only to the channel (-c)
and/or event (-e) indicated.
Exactly one domain (-k/--kernel or -u/--userspace) must be specified.

Options:
  -h, --help               Show this help
      --list-options       Simple listing of options
  -s, --session NAME       Apply to session name
  -c, --channel NAME       Apply to channel
  -e, --event NAME         Apply to event
  -k, --kernel             Apply to the kernel tracer
  -u, --userspace          Apply to the user-space tracer
  -t, --type TYPE          Context type. You can repeat that option on
                           the command line to specify multiple contexts at once.
                           (--kernel preempts --userspace)
                           TYPE can be one of the strings below:
                               pid, procname, prio, nice, vpid, tid, pthread_id,
                               vtid, ppid, vppid, perf:cpu-cycles, perf:cycles,
                               perf:stalled-cycles-frontend,
                               perf:idle-cycles-frontend,
                               perf:stalled-cycles-backend,
                               perf:idle-cycles-backend, perf:instructions,
                               perf:cache-references, perf:cache-misses,
                               perf:branch-instructions, perf:branches,
                               perf:branch-misses, perf:bus-cycles,
                               perf:L1-dcache-loads, perf:L1-dcache-load-misses,
                               perf:L1-dcache-stores,
                               perf:L1-dcache-store-misses,
                               perf:L1-dcache-prefetches,
                               perf:L1-dcache-prefetch-misses,
                               perf:L1-icache-loads, perf:L1-icache-load-misses,
                               perf:L1-icache-stores,
                               perf:L1-icache-store-misses,
                               perf:L1-icache-prefetches,
                               perf:L1-icache-prefetch-misses, perf:LLC-loads,
                               perf:LLC-load-misses, perf:LLC-stores,
                               perf:LLC-store-misses, perf:LLC-prefetches,
                               perf:LLC-prefetch-misses, perf:dTLB-loads,
                               perf:dTLB-load-misses, perf:dTLB-stores,
                               perf:dTLB-store-misses, perf:dTLB-prefetches,
                               perf:dTLB-prefetch-misses, perf:iTLB-loads,
                               perf:iTLB-load-misses, perf:branch-loads,
                               perf:branch-load-misses, perf:cpu-clock,
                               perf:task-clock, perf:page-fault, perf:faults,
                               perf:major-faults, perf:minor-faults,
                               perf:context-switches, perf:cs,
                               perf:cpu-migrations, perf:migrations,
                               perf:alignment-faults, perf:emulation-faults
Example:
This command will add the context information 'prio' and two perf
counters (hardware branch misses and cache misses), to all events
in the trace data output:
# lttng add-context -k -t prio -t perf:branch-misses -t perf:cache-misses

</COMMAND_OUTPUT>

<COMMAND_INPUT>
lttng add-context -s mysession -k -t prio -t perf:branch-misses -t perf:cache-misses
</COMMAND_INPUT>
<COMMAND_RESULT>
0
</COMMAND_RESULT>
<COMMAND_OUTPUT>
kernel context perf:cache-misses added to all channels
kernel context perf:branch-misses added to all channels
kernel context prio added to all channels
</COMMAND_OUTPUT>

<COMMAND_INPUT>
lttng list mysession
</COMMAND_INPUT>
<COMMAND_RESULT>
0
</COMMAND_RESULT>
<COMMAND_OUTPUT>
Tracing session mysession: [inactive]
    Trace path: /home/user/lttng-traces/mysession-20120314-132824

=== Domain: Kernel ===

Channels:
-------------
- mychannel: [enabled]

    Attributes:
      overwrite mode: 1
      subbufers size: 16384
      number of subbufers: 4
      switch timer interval: 100
      read timer interval: 200
      output: splice()

    Events:
      myevent (type: probe) [enabled]
        offset: 0x2000
        symbol: create_dev
      syscalls (type: syscall) [enabled]

- mychannel2: [enabled]

    Attributes:
      overwrite mode: 0
      subbufers size: 32768
      number of subbufers: 2
      switch timer interval: 100
      read timer interval: 200
      output: splice()

    Events:
      sched_kthread_stop_ret (loglevel: TRACE_EMERG (0)) (type: tracepoint) [enabled]
      sched_kthread_stop (loglevel: TRACE_EMERG (0)) (type: tracepoint) [enabled]
      sched_wakeup_new (loglevel: TRACE_EMERG (0)) (type: tracepoint) [enabled]

- channel0: [enabled]

    Attributes:
      overwrite mode: 0
      subbufers size: 262144
      number of subbufers: 4
      switch timer interval: 0
      read timer interval: 200
      output: splice()

    Events:
      myevent5 (type: probe) [enabled]
        offset: 0x2000
        symbol: create_dev
      myevent4 (type: function) [enabled]
        offset: 0x0
        symbol: create_dev
      myevent3 (type: probe) [enabled]
        offset: 0x1000
        symbol: init_post
      myevent2 (type: probe) [enabled]
        offset: 0x0
        symbol: init_post
      myevent1 (type: probe) [enabled]
        addr: 0xc0101280
      syscalls (type: syscall) [enabled]
      sched_kthread_stop_ret (loglevel: TRACE_EMERG (0)) (type: tracepoint) [enabled]
      sched_kthread_stop (loglevel: TRACE_EMERG (0)) (type: tracepoint) [enabled]
      sched_wakeup_new (loglevel: TRACE_EMERG (0)) (type: tracepoint) [enabled]

</COMMAND_OUTPUT>

<COMMAND_INPUT>
lttng add-context -h
</COMMAND_INPUT>
<COMMAND_RESULT>
0
</COMMAND_RESULT>
<COMMAND_OUTPUT>
usage: lttng add-context -t TYPE

If no channel and no event is given (-c/-e), the context
will be added to all events and all channels.
Otherwise the context will be added only to the channel (-c)
and/or event (-e) indicated.
Exactly one domain (-k/--kernel or -u/--userspace) must be specified.

Options:
  -h, --help               Show this help
      --list-options       Simple listing of options
  -s, --session NAME       Apply to session name
  -c, --channel NAME       Apply to channel
  -e, --event NAME         Apply to event
  -k, --kernel             Apply to the kernel tracer
  -u, --userspace          Apply to the user-space tracer
  -t, --type TYPE          Context type. You can repeat that option on
                           the command line to specify multiple contexts at once.
                           (--kernel preempts --userspace)
                           TYPE can be one of the strings below:
                               pid, procname, prio, nice, vpid, tid, pthread_id,
                               vtid, ppid, vppid, perf:cpu-cycles, perf:cycles,
                               perf:stalled-cycles-frontend,
                               perf:idle-cycles-frontend,
                               perf:stalled-cycles-backend,
                               perf:idle-cycles-backend, perf:instructions,
                               perf:cache-references, perf:cache-misses,
                               perf:branch-instructions, perf:branches,
                               perf:branch-misses, perf:bus-cycles,
                               perf:L1-dcache-loads, perf:L1-dcache-load-misses,
                               perf:L1-dcache-stores,
                               perf:L1-dcache-store-misses,
                               perf:L1-dcache-prefetches,
                               perf:L1-dcache-prefetch-misses,
                               perf:L1-icache-loads, perf:L1-icache-load-misses,
                               perf:L1-icache-stores,
                               perf:L1-icache-store-misses,
                               perf:L1-icache-prefetches,
                               perf:L1-icache-prefetch-misses, perf:LLC-loads,
                               perf:LLC-load-misses, perf:LLC-stores,
                               perf:LLC-store-misses, perf:LLC-prefetches,
                               perf:LLC-prefetch-misses, perf:dTLB-loads,
                               perf:dTLB-load-misses, perf:dTLB-stores,
                               perf:dTLB-store-misses, perf:dTLB-prefetches,
                               perf:dTLB-prefetch-misses, perf:iTLB-loads,
                               perf:iTLB-load-misses, perf:branch-loads,
                               perf:branch-load-misses, perf:cpu-clock,
                               perf:task-clock, perf:page-fault, perf:faults,
                               perf:major-faults, perf:minor-faults,
                               perf:context-switches, perf:cs,
                               perf:cpu-migrations, perf:migrations,
                               perf:alignment-faults, perf:emulation-faults
Example:
This command will add the context information 'prio' and two perf
counters (hardware branch misses and cache misses), to all events
in the trace data output:
# lttng add-context -k -t prio -t perf:branch-misses -t perf:cache-misses

</COMMAND_OUTPUT>

<COMMAND_INPUT>
lttng add-context -s mysession -c mychannel -k -t prio -t perf:branch-misses -t perf:cache-misses
</COMMAND_INPUT>
<COMMAND_RESULT>
0
</COMMAND_RESULT>
<COMMAND_OUTPUT>
kernel context perf:cache-misses added to channel mychannel
kernel context perf:branch-misses added to channel mychannel
kernel context prio added to channel mychannel
</COMMAND_OUTPUT>

<COMMAND_INPUT>
lttng list mysession
</COMMAND_INPUT>
<COMMAND_RESULT>
0
</COMMAND_RESULT>
<COMMAND_OUTPUT>
Tracing session mysession: [inactive]
    Trace path: /home/user/lttng-traces/mysession-20120314-132824

=== Domain: Kernel ===

Channels:
-------------
- mychannel: [enabled]

    Attributes:
      overwrite mode: 1
      subbufers size: 16384
      number of subbufers: 4
      switch timer interval: 100
      read timer interval: 200
      output: splice()

    Events:
      myevent (type: probe) [enabled]
        offset: 0x2000
        symbol: create_dev
      syscalls (type: syscall) [enabled]

- mychannel2: [enabled]

    Attributes:
      overwrite mode: 0
      subbufers size: 32768
      number of subbufers: 2
      switch timer interval: 100
      read timer interval: 200
      output: splice()

    Events:
      sched_kthread_stop_ret (loglevel: TRACE_EMERG (0)) (type: tracepoint) [enabled]
      sched_kthread_stop (loglevel: TRACE_EMERG (0)) (type: tracepoint) [enabled]
      sched_wakeup_new (loglevel: TRACE_EMERG (0)) (type: tracepoint) [enabled]

- channel0: [enabled]

    Attributes:
      overwrite mode: 0
      subbufers size: 262144
      number of subbufers: 4
      switch timer interval: 0
      read timer interval: 200
      output: splice()

    Events:
      myevent5 (type: probe) [enabled]
        offset: 0x2000
        symbol: create_dev
      myevent4 (type: function) [enabled]
        offset: 0x0
        symbol: create_dev
      myevent3 (type: probe) [enabled]
        offset: 0x1000
        symbol: init_post
      myevent2 (type: probe) [enabled]
        offset: 0x0
        symbol: init_post
      myevent1 (type: probe) [enabled]
        addr: 0xc0101280
      syscalls (type: syscall) [enabled]
      sched_kthread_stop_ret (loglevel: TRACE_EMERG (0)) (type: tracepoint) [enabled]
      sched_kthread_stop (loglevel: TRACE_EMERG (0)) (type: tracepoint) [enabled]
      sched_wakeup_new (loglevel: TRACE_EMERG (0)) (type: tracepoint) [enabled]

</COMMAND_OUTPUT>

<COMMAND_INPUT>
lttng add-context -h
</COMMAND_INPUT>
<COMMAND_RESULT>
0
</COMMAND_RESULT>
<COMMAND_OUTPUT>
usage: lttng add-context -t TYPE

If no channel and no event is given (-c/-e), the context
will be added to all events and all channels.
Otherwise the context will be added only to the channel (-c)
and/or event (-e) indicated.
Exactly one domain (-k/--kernel or -u/--userspace) must be specified.

Options:
  -h, --help               Show this help
      --list-options       Simple listing of options
  -s, --session NAME       Apply to session name
  -c, --channel NAME       Apply to channel
  -e, --event NAME         Apply to event
  -k, --kernel             Apply to the kernel tracer
  -u, --userspace          Apply to the user-space tracer
  -t, --type TYPE          Context type. You can repeat that option on
                           the command line to specify multiple contexts at once.
                           (--kernel preempts --userspace)
                           TYPE can be one of the strings below:
                               pid, procname, prio, nice, vpid, tid, pthread_id,
                               vtid, ppid, vppid, perf:cpu-cycles, perf:cycles,
                               perf:stalled-cycles-frontend,
                               perf:idle-cycles-frontend,
                               perf:stalled-cycles-backend,
                               perf:idle-cycles-backend, perf:instructions,
                               perf:cache-references, perf:cache-misses,
                               perf:branch-instructions, perf:branches,
                               perf:branch-misses, perf:bus-cycles,
                               perf:L1-dcache-loads, perf:L1-dcache-load-misses,
                               perf:L1-dcache-stores,
                               perf:L1-dcache-store-misses,
                               perf:L1-dcache-prefetches,
                               perf:L1-dcache-prefetch-misses,
                               perf:L1-icache-loads, perf:L1-icache-load-misses,
                               perf:L1-icache-stores,
                               perf:L1-icache-store-misses,
                               perf:L1-icache-prefetches,
                               perf:L1-icache-prefetch-misses, perf:LLC-loads,
                               perf:LLC-load-misses, perf:LLC-stores,
                               perf:LLC-store-misses, perf:LLC-prefetches,
                               perf:LLC-prefetch-misses, perf:dTLB-loads,
                               perf:dTLB-load-misses, perf:dTLB-stores,
                               perf:dTLB-store-misses, perf:dTLB-prefetches,
                               perf:dTLB-prefetch-misses, perf:iTLB-loads,
                               perf:iTLB-load-misses, perf:branch-loads,
                               perf:branch-load-misses, perf:cpu-clock,
                               perf:task-clock, perf:page-fault, perf:faults,
                               perf:major-faults, perf:minor-faults,
                               perf:context-switches, perf:cs,
                               perf:cpu-migrations, perf:migrations,
                               perf:alignment-faults, perf:emulation-faults
Example:
This command will add the context information 'prio' and two perf
counters (hardware branch misses and cache misses), to all events
in the trace data output:
# lttng add-context -k -t prio -t perf:branch-misses -t perf:cache-misses

</COMMAND_OUTPUT>

<COMMAND_INPUT>
lttng add-context -s mysession -c channel0 -e sched_kthread_stop_ret -k -t prio -t perf:branch-misses -t perf:cache-misses
</COMMAND_INPUT>
<COMMAND_RESULT>
0
</COMMAND_RESULT>
<COMMAND_OUTPUT>
kernel context perf:cache-misses added to event sched_kthread_stop_ret channel mychannel
kernel context perf:branch-misses added to event sched_kthread_stop_ret channel mychannel
kernel context prio added to channel event sched_kthread_stop_ret mychannel
</COMMAND_OUTPUT>

<COMMAND_INPUT>
lttng list mysession
</COMMAND_INPUT>
<COMMAND_RESULT>
0
</COMMAND_RESULT>
<COMMAND_OUTPUT>
Tracing session mysession: [inactive]
    Trace path: /home/user/lttng-traces/mysession-20120314-132824

=== Domain: Kernel ===

Channels:
-------------
- mychannel: [enabled]

    Attributes:
      overwrite mode: 1
      subbufers size: 16384
      number of subbufers: 4
      switch timer interval: 100
      read timer interval: 200
      output: splice()

    Events:
      myevent (type: probe) [enabled]
        offset: 0x2000
        symbol: create_dev
      syscalls (type: syscall) [enabled]

- mychannel2: [enabled]

    Attributes:
      overwrite mode: 0
      subbufers size: 32768
      number of subbufers: 2
      switch timer interval: 100
      read timer interval: 200
      output: splice()

    Events:
      sched_kthread_stop_ret (loglevel: TRACE_EMERG (0)) (type: tracepoint) [enabled]
      sched_kthread_stop (loglevel: TRACE_EMERG (0)) (type: tracepoint) [enabled]
      sched_wakeup_new (loglevel: TRACE_EMERG (0)) (type: tracepoint) [enabled]

- channel0: [enabled]

    Attributes:
      overwrite mode: 0
      subbufers size: 262144
      number of subbufers: 4
      switch timer interval: 0
      read timer interval: 200
      output: splice()

    Events:
      myevent5 (type: probe) [enabled]
        offset: 0x2000
        symbol: create_dev
      myevent4 (type: function) [enabled]
        offset: 0x0
        symbol: create_dev
      myevent3 (type: probe) [enabled]
        offset: 0x1000
        symbol: init_post
      myevent2 (type: probe) [enabled]
        offset: 0x0
        symbol: init_post
      myevent1 (type: probe) [enabled]
        addr: 0xc0101280
      syscalls (type: syscall) [enabled]
      sched_kthread_stop_ret (loglevel: TRACE_EMERG (0)) (type: tracepoint) [enabled]
      sched_kthread_stop (loglevel: TRACE_EMERG (0)) (type: tracepoint) [enabled]
      sched_wakeup_new (loglevel: TRACE_EMERG (0)) (type: tracepoint) [enabled]

</COMMAND_OUTPUT>

</SCENARIO>

<SCENARIO>
Scenario4

<COMMAND_INPUT>
lttng enable-channel mychannel -u -s mysession --overwrite --subbuf-size 16384 --num-subbuf 4 --switch-timer 100 --read-timer 200
</COMMAND_INPUT>
<COMMAND_RESULT>
0
</COMMAND_RESULT>
<COMMAND_OUTPUT>
UST channel mychannel enabled for session mysession
</COMMAND_OUTPUT>

<COMMAND_INPUT>
lttng list mysession
</COMMAND_INPUT>
<COMMAND_RESULT>
0
</COMMAND_RESULT>
<COMMAND_OUTPUT>
Tracing session mysession: [inactive]
    Trace path: /home/user/lttng-traces/mysession-20120314-132824

=== Domain: UST global ===

Channels:
-------------
- mychannel: [enabled]

    Attributes:
      overwrite mode: 1
      subbufers size: 16384
      number of subbufers: 4
      switch timer interval: 100
      read timer interval: 200
      output: mmap()

    Events:
      None

</COMMAND_OUTPUT>

<COMMAND_INPUT>
lttng add-context -h
</COMMAND_INPUT>
<COMMAND_RESULT>
0
</COMMAND_RESULT>
<COMMAND_OUTPUT>
usage: lttng add-context -t TYPE

If no channel and no event is given (-c/-e), the context
will be added to all events and all channels.
Otherwise the context will be added only to the channel (-c)
and/or event (-e) indicated.
Exactly one domain (-k/--kernel or -u/--userspace) must be specified.

Options:
  -h, --help               Show this help
      --list-options       Simple listing of options
  -s, --session NAME       Apply to session name
  -c, --channel NAME       Apply to channel
  -e, --event NAME         Apply to event
  -k, --kernel             Apply to the kernel tracer
  -u, --userspace          Apply to the user-space tracer
  -t, --type TYPE          Context type. You can repeat that option on
                           the command line to specify multiple contexts at once.
                           (--kernel preempts --userspace)
                           TYPE can be one of the strings below:
                               pid, procname, prio, nice, vpid, tid, pthread_id,
                               vtid, ppid, vppid, perf:cpu-cycles, perf:cycles,
                               perf:stalled-cycles-frontend,
                               perf:idle-cycles-frontend,
                               perf:stalled-cycles-backend,
                               perf:idle-cycles-backend, perf:instructions,
                               perf:cache-references, perf:cache-misses,
                               perf:branch-instructions, perf:branches,
                               perf:branch-misses, perf:bus-cycles,
                               perf:L1-dcache-loads, perf:L1-dcache-load-misses,
                               perf:L1-dcache-stores,
                               perf:L1-dcache-store-misses,
                               perf:L1-dcache-prefetches,
                               perf:L1-dcache-prefetch-misses,
                               perf:L1-icache-loads, perf:L1-icache-load-misses,
                               perf:L1-icache-stores,
                               perf:L1-icache-store-misses,
                               perf:L1-icache-prefetches,
                               perf:L1-icache-prefetch-misses, perf:LLC-loads,
                               perf:LLC-load-misses, perf:LLC-stores,
                               perf:LLC-store-misses, perf:LLC-prefetches,
                               perf:LLC-prefetch-misses, perf:dTLB-loads,
                               perf:dTLB-load-misses, perf:dTLB-stores,
                               perf:dTLB-store-misses, perf:dTLB-prefetches,
                               perf:dTLB-prefetch-misses, perf:iTLB-loads,
                               perf:iTLB-load-misses, perf:branch-loads,
                               perf:branch-load-misses, perf:cpu-clock,
                               perf:task-clock, perf:page-fault, perf:faults,
                               perf:major-faults, perf:minor-faults,
                               perf:context-switches, perf:cs,
                               perf:cpu-migrations, perf:migrations,
                               perf:alignment-faults, perf:emulation-faults
Example:
This command will add the context information 'prio' and two perf
counters (hardware branch misses and cache misses), to all events
in the trace data output:
# lttng add-context -k -t prio -t perf:branch-misses -t perf:cache-misses

</COMMAND_OUTPUT>

<COMMAND_INPUT>
lttng list mysession
</COMMAND_INPUT>
<COMMAND_RESULT>
0
</COMMAND_RESULT>
<COMMAND_OUTPUT>
Tracing session mysession: [inactive]
    Trace path: /home/user/lttng-traces/mysession-20120314-132824

=== Domain: UST global ===

Channels:
-------------
- mychannel: [enabled]

    Attributes:
      overwrite mode: 1
      subbufers size: 16384
      number of subbufers: 4
      switch timer interval: 100
      read timer interval: 200
      output: mmap()

    Events:
      None

</COMMAND_OUTPUT>

<COMMAND_INPUT>
lttng add-context -s mysession -c mychannel -u -t procname -t vtid
</COMMAND_INPUT>
<COMMAND_RESULT>
0
</COMMAND_RESULT>
<COMMAND_OUTPUT>
kernel context procname added to all events channel mychannel
kernel context vtid added to all events channel mychannel
</COMMAND_OUTPUT>

<COMMAND_INPUT>
lttng enable-channel mychannel2 -u -s mysession --subbuf-size 32768 --num-subbuf 2 --switch-timer 100 --read-timer 200
</COMMAND_INPUT>
<COMMAND_RESULT>
0
</COMMAND_RESULT>
<COMMAND_OUTPUT>
UST channel mychannel2 enabled for session mysession
</COMMAND_OUTPUT>

<COMMAND_INPUT>
lttng list mysession
</COMMAND_INPUT>
<COMMAND_RESULT>
0
</COMMAND_RESULT>
<COMMAND_OUTPUT>
Tracing session mysession: [inactive]
    Trace path: /home/user/lttng-traces/mysession-20120314-132824

=== Domain: UST global ===

Channels:
-------------
- mychannel: [enabled]

    Attributes:
      overwrite mode: 1
      subbufers size: 16384
      number of subbufers: 4
      switch timer interval: 100
      read timer interval: 200
      output: mmap()

    Events:
      None

- mychannel2: [enabled]

    Attributes:
      overwrite mode: 0
      subbufers size: 32768
      number of subbufers: 2
      switch timer interval: 100
      read timer interval: 200
      output: mmap()

    Events:
      None

</COMMAND_OUTPUT>

<COMMAND_INPUT>
lttng enable-event ust_tests_hello:tptest_sighandler -u -s mysession --tracepoint
</COMMAND_INPUT>
<COMMAND_RESULT>
0
</COMMAND_RESULT>
<COMMAND_OUTPUT>
UST event ust_tests_hello:tptest_sighandler created in channel channel0
</COMMAND_OUTPUT>

<COMMAND_INPUT>
lttng list mysession
</COMMAND_INPUT>
<COMMAND_RESULT>
0
</COMMAND_RESULT>
<COMMAND_OUTPUT>
Tracing session mysession: [inactive]
    Trace path: /home/user/lttng-traces/mysession-20120314-132824

=== Domain: UST global ===

Channels:
-------------
- mychannel: [enabled]

    Attributes:
      overwrite mode: 1
      subbufers size: 16384
      number of subbufers: 4
      switch timer interval: 100
      read timer interval: 200
      output: mmap()

    Events:
      None

- mychannel2: [enabled]

    Attributes:
      overwrite mode: 0
      subbufers size: 32768
      number of subbufers: 2
      switch timer interval: 100
      read timer interval: 200
      output: mmap()

    Events:
      None

- channel0: [enabled]

    Attributes:
      overwrite mode: 0
      subbufers size: 262144
      number of subbufers: 4
      switch timer interval: 0
      read timer interval: 200
      output: mmap()

    Events:
      ust_tests_hello:tptest_sighandler (type: tracepoint) [enabled]

</COMMAND_OUTPUT>

<COMMAND_INPUT>
lttng enable-event ust_tests_hello:tptest -u -s mysession --tracepoint
</COMMAND_INPUT>
<COMMAND_RESULT>
0
</COMMAND_RESULT>
<COMMAND_OUTPUT>
UST event ust_tests_hello:tptest created in channel channel0
</COMMAND_OUTPUT>

<COMMAND_INPUT>
lttng list mysession
</COMMAND_INPUT>
<COMMAND_RESULT>
0
</COMMAND_RESULT>
<COMMAND_OUTPUT>
Tracing session mysession: [inactive]
    Trace path: /home/user/lttng-traces/mysession-20120314-132824

=== Domain: UST global ===

Channels:
-------------
- mychannel: [enabled]

    Attributes:
      overwrite mode: 1
      subbufers size: 16384
      number of subbufers: 4
      switch timer interval: 100
      read timer interval: 200
      output: mmap()

    Events:
      None

- mychannel2: [enabled]

    Attributes:
      overwrite mode: 0
      subbufers size: 32768
      number of subbufers: 2
      switch timer interval: 100
      read timer interval: 200
      output: mmap()

    Events:
      None

- channel0: [enabled]

    Attributes:
      overwrite mode: 0
      subbufers size: 262144
      number of subbufers: 4
      switch timer interval: 0
      read timer interval: 200
      output: mmap()

    Events:
      ust_tests_hello:tptest_sighandler (type: tracepoint) [enabled]
      ust_tests_hello:tptest (type: tracepoint) [enabled]

</COMMAND_OUTPUT>

<COMMAND_INPUT>
lttng enable-event -a -u -s mysession -c mychannel2 --tracepoint
</COMMAND_INPUT>
<COMMAND_RESULT>
0
</COMMAND_RESULT>
<COMMAND_OUTPUT>
All UST events created in channel channel0
</COMMAND_OUTPUT>

<COMMAND_INPUT>
lttng list mysession
</COMMAND_INPUT>
<COMMAND_RESULT>
0
</COMMAND_RESULT>
<COMMAND_OUTPUT>
Tracing session mysession: [inactive]
    Trace path: /home/user/lttng-traces/mysession-20120314-132824

=== Domain: UST global ===

Channels:
-------------
- mychannel: [enabled]

    Attributes:
      overwrite mode: 1
      subbufers size: 16384
      number of subbufers: 4
      switch timer interval: 100
      read timer interval: 200
      output: mmap()

    Events:
      None

- mychannel2: [enabled]

    Attributes:
      overwrite mode: 0
      subbufers size: 32768
      number of subbufers: 2
      switch timer interval: 100
      read timer interval: 200
      output: mmap()

    Events:
      * (type: tracepoint) [enabled]

- channel0: [enabled]

    Attributes:
      overwrite mode: 0
      subbufers size: 262144
      number of subbufers: 4
      switch timer interval: 0
      read timer interval: 200
      output: mmap()

    Events:
      ust_tests_hello:tptest_sighandler (type: tracepoint) [enabled]
      ust_tests_hello:tptest (type: tracepoint) [enabled]

</COMMAND_OUTPUT>

<COMMAND_INPUT>
lttng enable-event ust* -u -s mysession -c mychannel --tracepoint
</COMMAND_INPUT>
<COMMAND_RESULT>
0
</COMMAND_RESULT>
<COMMAND_OUTPUT>
UST event ust* created in channel mychannel
</COMMAND_OUTPUT>

<COMMAND_INPUT>
lttng list mysession
</COMMAND_INPUT>
<COMMAND_RESULT>
0
</COMMAND_RESULT>
<COMMAND_OUTPUT>
Tracing session mysession: [inactive]
    Trace path: /home/user/lttng-traces/mysession-20120314-132824

=== Domain: UST global ===

Channels:
-------------
- mychannel: [enabled]

    Attributes:
      overwrite mode: 1
      subbufers size: 16384
      number of subbufers: 4
      switch timer interval: 100
      read timer interval: 200
      output: mmap()

    Events:
      ust* (type: tracepoint) [enabled]

- mychannel2: [enabled]

    Attributes:
      overwrite mode: 0
      subbufers size: 32768
      number of subbufers: 2
      switch timer interval: 100
      read timer interval: 200
      output: mmap()

    Events:
      * (type: tracepoint) [enabled]

- channel0: [enabled]

    Attributes:
      overwrite mode: 0
      subbufers size: 262144
      number of subbufers: 4
      switch timer interval: 0
      read timer interval: 200
      output: mmap()

    Events:
      ust_tests_hello:tptest_sighandler (type: tracepoint) [enabled]
      ust_tests_hello:tptest (type: tracepoint) [enabled]

</COMMAND_OUTPUT>

<COMMAND_INPUT>
lttng enable-event ust* -u -s mysession --tracepoint
</COMMAND_INPUT>
<COMMAND_RESULT>
0
</COMMAND_RESULT>
<COMMAND_OUTPUT>
UST event ust* created in channel channel0
</COMMAND_OUTPUT>

<COMMAND_INPUT>
lttng list mysession
</COMMAND_INPUT>
<COMMAND_RESULT>
0
</COMMAND_RESULT>
<COMMAND_OUTPUT>
Tracing session mysession: [inactive]
    Trace path: /home/user/lttng-traces/mysession-20120314-132824

=== Domain: UST global ===

Channels:
-------------
- mychannel: [enabled]

    Attributes:
      overwrite mode: 1
      subbufers size: 16384
      number of subbufers: 4
      switch timer interval: 100
      read timer interval: 200
      output: mmap()

    Events:
      ust* (type: tracepoint) [enabled]

- mychannel2: [enabled]

    Attributes:
      overwrite mode: 0
      subbufers size: 32768
      number of subbufers: 2
      switch timer interval: 100
      read timer interval: 200
      output: mmap()

    Events:
      * (type: tracepoint) [enabled]

- channel0: [enabled]

    Attributes:
      overwrite mode: 0
      subbufers size: 262144
      number of subbufers: 4
      switch timer interval: 0
      read timer interval: 200
      output: mmap()

    Events:
      ust* (type: tracepoint) [enabled]
      ust_tests_hello:tptest_sighandler (type: tracepoint) [enabled]
      ust_tests_hello:tptest (type: tracepoint) [enabled]

</COMMAND_OUTPUT>

<COMMAND_INPUT>
lttng enable-event "u*" -u -s mysession --tracepoint
</COMMAND_INPUT>
<COMMAND_RESULT>
0
</COMMAND_RESULT>
<COMMAND_OUTPUT>
UST event u* created in channel channel0
</COMMAND_OUTPUT>

<COMMAND_INPUT>
lttng list mysession
</COMMAND_INPUT>
<COMMAND_RESULT>
0
</COMMAND_RESULT>
<COMMAND_OUTPUT>
Tracing session mysession: [inactive]
    Trace path: /home/user/lttng-traces/mysession-20120314-132824

=== Domain: UST global ===

Channels:
-------------
- mychannel: [enabled]

    Attributes:
      overwrite mode: 1
      subbufers size: 16384
      number of subbufers: 4
      switch timer interval: 100
      read timer interval: 200
      output: mmap()

    Events:
      ust* (type: tracepoint) [enabled]

- mychannel2: [enabled]

    Attributes:
      overwrite mode: 0
      subbufers size: 32768
      number of subbufers: 2
      switch timer interval: 100
      read timer interval: 200
      output: mmap()

    Events:
      * (type: tracepoint) [enabled]

- channel0: [enabled]

    Attributes:
      overwrite mode: 0
      subbufers size: 262144
      number of subbufers: 4
      switch timer interval: 0
      read timer interval: 200
      output: mmap()

    Events:
      u* (type: tracepoint) [enabled]
      ust* (type: tracepoint) [enabled]
      ust_tests_hello:tptest_sighandler (type: tracepoint) [enabled]
      ust_tests_hello:tptest (type: tracepoint) [enabled]

</COMMAND_OUTPUT>


<COMMAND_INPUT>
lttng enable-event myevent1 -u -s mysession --loglevel TRACE_WARNING
</COMMAND_INPUT>
<COMMAND_RESULT>
0
</COMMAND_RESULT>
<COMMAND_OUTPUT>
UST event myevent1 created in channel channel0
</COMMAND_OUTPUT>

<COMMAND_INPUT>
lttng list mysession
</COMMAND_INPUT>
<COMMAND_RESULT>
0
</COMMAND_RESULT>
<COMMAND_OUTPUT>
Tracing session mysession: [inactive]
    Trace path: /home/user/lttng-traces/mysession-20120314-132824

=== Domain: UST global ===

Channels:
-------------
- mychannel: [enabled]

    Attributes:
      overwrite mode: 1
      subbufers size: 16384
      number of subbufers: 4
      switch timer interval: 100
      read timer interval: 200
      output: mmap()

    Events:
      ust* (type: tracepoint) [enabled]

- mychannel2: [enabled]

    Attributes:
      overwrite mode: 0
      subbufers size: 32768
      number of subbufers: 2
      switch timer interval: 100
      read timer interval: 200
      output: mmap()

    Events:
      * (type: tracepoint) [enabled]

- channel0: [enabled]

    Attributes:
      overwrite mode: 0
      subbufers size: 262144
      number of subbufers: 4
      switch timer interval: 0
      read timer interval: 200
      output: splice()

    Events:
      myevent1 (loglevel <= TRACE_WARNING (4)) (type: tracepoint) [enabled]
      u* (type: tracepoint) [enabled]
      ust* (type: tracepoint) [enabled]
      ust_tests_hello:tptest_sighandler (type: tracepoint) [enabled]
      ust_tests_hello:tptest (type: tracepoint) [enabled]

</COMMAND_OUTPUT>

<COMMAND_INPUT>
lttng enable-event myevent2 -u -s mysession --loglevel-only TRACE_DEBUG_FUNCTION
</COMMAND_INPUT>
<COMMAND_RESULT>
0
</COMMAND_RESULT>
<COMMAND_OUTPUT>
UST event myevent2 created in channel channel0
</COMMAND_OUTPUT>

<COMMAND_INPUT>
lttng list mysession
</COMMAND_INPUT>
<COMMAND_RESULT>
0
</COMMAND_RESULT>
<COMMAND_OUTPUT>
Tracing session mysession: [inactive]
    Trace path: /home/user/lttng-traces/mysession-20120314-132824

=== Domain: UST global ===

Channels:
-------------
- mychannel: [enabled]

    Attributes:
      overwrite mode: 1
      subbufers size: 16384
      number of subbufers: 4
      switch timer interval: 100
      read timer interval: 200
      output: mmap()

    Events:
      ust* (type: tracepoint) [enabled]

- mychannel2: [enabled]

    Attributes:
      overwrite mode: 0
      subbufers size: 32768
      number of subbufers: 2
      switch timer interval: 100
      read timer interval: 200
      output: mmap()

    Events:
      * (type: tracepoint) [enabled]

- channel0: [enabled]

    Attributes:
      overwrite mode: 0
      subbufers size: 262144
      number of subbufers: 4
      switch timer interval: 0
      read timer interval: 200
      output: splice()

    Events:
      myevent2 (loglevel == TRACE_DEBUG_FUNCTION (12)) (type: tracepoint) [enabled]
      myevent1 (loglevel <= TRACE_WARNING (4)) (type: loglevel) [enabled]
      u* (type: tracepoint) [enabled]
      ust* (type: tracepoint) [enabled]
      ust_tests_hello:tptest_sighandler (type: tracepoint) [enabled]
      ust_tests_hello:tptest (type: tracepoint) [enabled]

</COMMAND_OUTPUT>

<COMMAND_INPUT>
lttng enable-event myevent0 -u -s mysession -c mychannel --loglevel-only TRACE_DEBUG_FUNCTION
</COMMAND_INPUT>
<COMMAND_RESULT>
0
</COMMAND_RESULT>
<COMMAND_OUTPUT>
UST event myevent0 created in channel mychannel
</COMMAND_OUTPUT>

<COMMAND_INPUT>
lttng list mysession
</COMMAND_INPUT>
<COMMAND_RESULT>
0
</COMMAND_RESULT>
<COMMAND_OUTPUT>
Tracing session mysession: [inactive]
    Trace path: /home/user/lttng-traces/mysession-20120314-132824

=== Domain: UST global ===

Channels:
-------------
- mychannel: [enabled]

    Attributes:
      overwrite mode: 1
      subbufers size: 16384
      number of subbufers: 4
      switch timer interval: 100
      read timer interval: 200
      output: mmap()

    Events:
      myevent0 (loglevel <= TRACE_DEBUG_FUNCTION (12)) (type: tracepoint) [enabled]
      ust* (type: tracepoint) [enabled]

- mychannel2: [enabled]

    Attributes:
      overwrite mode: 0
      subbufers size: 32768
      number of subbufers: 2
      switch timer interval: 100
      read timer interval: 200
      output: mmap()

    Events:
      * (type: tracepoint) [enabled]

- channel0: [enabled]

    Attributes:
      overwrite mode: 0
      subbufers size: 262144
      number of subbufers: 4
      switch timer interval: 0
      read timer interval: 200
      output: splice()

    Events:
      myevent2 (loglevel <= TRACE_DEBUG_FUNCTION (12)) (type: tracepoint) [enabled]
      myevent1 (loglevel == TRACE_WARNING (4)) (type: loglevel) [enabled]
      u* (type: tracepoint) [enabled]
      ust* (type: tracepoint) [enabled]
      ust_tests_hello:tptest_sighandler (type: tracepoint) [enabled]
      ust_tests_hello:tptest (type: tracepoint) [enabled]

</COMMAND_OUTPUT>


</SCENARIO>



