####################################################################
# Copyright (c) 2012 Ericsson
#
# All rights reserved. This program and the accompanying materials are
# made available under the terms of the Eclipse Public License v1.0 which
# accompanies this distribution, and is available at
# http://www.eclipse.org/legal/epl-v10.html
#
# Contributors:
# Bernd Hufmann - Initial API and implementation
####################################################################
####################################################################
# Scenario: Test no sessions available
####################################################################
Initialize
lttng list
0
Currently no available tracing session
lttng list -k
0
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)
lttng list -u
0
UST events:
-------------
PID: 9379 - Name: /home/user/git/lttng-ust/tests/hello.cxx/.libs/lt-hello
ust_tests_hello:tptest_sighandler (loglevel: TRACE_DEBUG_MODULE (10)) (type: tracepoint)
ust_tests_hello:tptest (loglevel: TRACE_INFO (6)) (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)
####################################################################
# Scenario: Enable events from kernel provider events
####################################################################
Scenario1
lttng create mysession
0
Session mysession created.
Traces will be written in /home/user/lttng-traces/mysession-20120314-132824
lttng list mysession
0
Tracing session mysession: [inactive]
Trace path: /home/user/lttng-traces/mysession-20120314-132824
lttng enable-event sched_kthread_stop,sched_kthread_stop_ret -k -s mysession --tracepoint
0
kernel event sched_kthread_stop created in channel channel0
kernel sched_kthread_stop_ret created in channel channel0
lttng list mysession
0
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]
lttng disable-event sched_kthread_stop_ret,sched_kthread_stop -k -s mysession -c channel0
0
kernel event sched_kthread_stop_ret disabled in channel channel0
kernel event sched_kthread_stop disabled in channel channel0
lttng enable-event sched_kthread_stop -k -s mysession -c channel0 --tracepoint
0
kernel event sched_kthread_stop enabled in channel channel0
lttng destroy mysession
0
Session mysession destroyed.
####################################################################
# Scenario: Enable events from UST provider events
####################################################################
Scenario2
lttng create mysession -o /home/user/temp
0
Session mysession created.
Traces will be written in /home/user/temp
lttng list mysession
0
Tracing session mysession: [inactive]
Trace path: /home/user/temp
lttng enable-channel mychannel -u -s mysession --subbuf-size 16384 --num-subbuf 2 --switch-timer 200 --read-timer 100
0
UST channel mychannel enabled for session mysession
lttng list mysession
0
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
lttng enable-event ust_tests_hello:tptest_sighandler,ust_tests_hello:tptest -u -s mysession --tracepoint
0
UST event ust_tests_hello:tptest_sighandler in channel channel0
UST sched_ust_tests_hello:tptest created in channel channel0
lttng list mysession
0
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 (loglevel: TRACE_DEBUG_LINE (13)) (type: tracepoint) [enabled]
ust_tests_hello:tptest (loglevel: TRACE_DEBUG_LINE (13)) (type: tracepoint) [enabled]
lttng disable-event ust_tests_hello:tptest -u -s mysession -c mychannel
0
kernel event ust_tests_hello:tptest in channel mychannel
lttng enable-event ust_tests_hello:tptest -u -s mysession -c mychannel --tracepoint
0
kernel event ust_tests_hello:tptest enabled in channel mychannel
lttng destroy mysession
0
Session mysession destroyed.