[lttng-dev] BUG: lttng-tools enable-event with filter, tracing error
jia,fang
fang.jia at windriver.com
Wed Aug 12 05:48:36 EDT 2015
Hi,
I found that if you enable-event with filter and then start tracepoint,
you can not stop your tracing even if you disable your event.
Do you have this problem ?
Here is the detail info:
My system is Ubuntu14.04, and Lttng-version is lttng version 2.7.0-pre - Gaia -
v2.6.0-rc1-242-g60f7035.
I build user application "hello" as
http://lttng.org/docs/v2.6/#doc-tracing-your-own-user-application told. And
change the hello.c as follow:
for(;;)
{
sleep(2);
for (x = 0; x < argc; ++x) {
tracepoint(hello_world, my_first_tracepoint, x, argv[x]);
}
}
Then I do this:
1/ lttng create mysession
2/ lttng enable-event hello_world:my_first_tracepoint --filter '$ctx.procname ==
"./hello*"' --session mysession -u -c channel
3/ lttng enable-event hello_world:my_first_tracepoint --session mysession -u -c
channel
4/ ./hello &
I press Enter to start tracepoint
5/ lttng disable-event --session mysession --channel channel --userspace
hello_world:my_first_tracepoint
6/ lttng start
7/ lttng stop
8/ lttng view
My detail log is as attachment
-------------- next part --------------
wrsadmin at pek-fjia-d1:~/workplace/lttng_test$ lttng create mysession
Session mysession created.
Traces will be written in /home/wrsadmin/lttng-traces/mysession-20150812-174320
wrsadmin at pek-fjia-d1:~/workplace/lttng_test$
wrsadmin at pek-fjia-d1:~/workplace/lttng_test$
wrsadmin at pek-fjia-d1:~/workplace/lttng_test$ lttng enable-event hello_world:my_first_tracepoint --filter '$ctx.procname == "./hello*"' --session mysession -u -c channel
Event hello_world:my_first_tracepoint: Filter '$ctx.procname == "./hello*"' successfully set
wrsadmin at pek-fjia-d1:~/workplace/lttng_test$ lttng enable-event hello_world:my_first_tracepoint --session mysession -u -c channel
UST event hello_world:my_first_tracepoint created in channel channel
wrsadmin at pek-fjia-d1:~/workplace/lttng_test$
wrsadmin at pek-fjia-d1:~/workplace/lttng_test$ lttng disable-event --session mysession --channel channel --userspace hello_world:my_first_tracepoint
UST event hello_world:my_first_tracepoint disabled in channel channel for session mysession
wrsadmin at pek-fjia-d1:~/workplace/lttng_test$ lttng list mysession
Tracing session mysession: [inactive]
Trace path: /home/wrsadmin/lttng-traces/mysession-20150812-174320
=== Domain: UST global ===
Buffer type: per UID
Channels:
-------------
- channel: [enabled]
Attributes:
overwrite mode: 0
subbufers size: 131072
number of subbufers: 4
switch timer interval: 0
read timer interval: 0
trace file count: 0
trace file size (bytes): 0
output: mmap()
Events:
hello_world:my_first_tracepoint (type: tracepoint) [disabled]
hello_world:my_first_tracepoint (type: tracepoint) [disabled] [with filter]
wrsadmin at pek-fjia-d1:~/workplace/lttng_test$ lttng start
Tracing started for session mysession
wrsadmin at pek-fjia-d1:~/workplace/lttng_test$ lttng stop
Waiting for data availabilityl.
Tracing stopped for session mysession
wrsadmin at pek-fjia-d1:~/workplace/lttng_test$ lttng view
Trace directory: /home/wrsadmin/lttng-traces/mysession-20150812-174320
[17:44:51.254236441] (+?.?????????) pek-fjia-d1 hello_world:my_first_tracepoint: { cpu_id = 3 }, { my_string_field = "hi there!", my_integer_field = 23 }
[17:44:51.254245902] (+0.000009461) pek-fjia-d1 hello_world:my_first_tracepoint: { cpu_id = 3 }, { my_string_field = "./hello", my_integer_field = 0 }
More information about the lttng-dev
mailing list