[lttng-dev] 答复: 答复: 2.7.0 not support enable-event -k -a

Jérémie Galarneau jeremie.galarneau at efficios.com
Thu Nov 12 09:13:14 EST 2015


Hi Zhenyu,

LTTng 2.7.0 has introduced event name wildcard support to kernel
space. In your specific case, the reason you see the call sequence
being so different is because we used to list all events and enable
them one by one.

Nowadays, we simply use the "enablers" mechanism, which has been
available on the lttng-ust side for a while, to enable all events
which match the "*" name.

It appears that your modified lttng-modules expects the 2.6.x behaviour.

Jérémie

On Tue, Nov 10, 2015 at 11:18 PM, zhenyu.ren <zhenyu.ren at aliyun.com> wrote:
> Hi,Galarneau
>
>     It seems that ,for "enable-event -k -a", Lttng-2.7.0 will call
> kernctl_create_event() to do a LTTNG_KERNEL_EVENT ioctl operation for the
> event(*)(in cmd_enable_event()). However,In Lttng-2.6.0,it will first call
> kernel_list_events() to get all kenel events , then iterator the list and
> call kernel_create_event() for every event(in
> event_kernel_enable_all_tracepoints()).  Is that right?
>
>    Is this " Warning: Event * not found!" appeared in your case.
>
> PS:my kernel: 2.6.32-220.23.2.el5.x86_64(RHEL6)
>      Lttng-toolchain:2.7.0
>
> Thanks in advance
> zhenyu.ren
>
>
> ------------------------------------------------------------------
> 发件人:zhenyu.ren <zhenyu.ren at aliyun.com>
> 发送时间:2015年11月11日(星期三) 10:37
> 收件人:zhenyu.ren <zhenyu.ren at aliyun.com>,Jérémie Galarneau
> <jeremie.galarneau at efficios.com>
> 抄 送:lttng-dev <lttng-dev at lists.lttng.org>
> 主 题:答复:[lttng-dev] 答复: 2.7.0 not support enable-event -k -a
>
> Sorry,forget to post the verbose logs of lttng-sessiond.
>
> DEBUG3 - 10:05:34.476087 [15262/15262]: Looking for a kernel consumer at
> these locations: (in spawn_consumerd() at main.c:2516)
> DEBUG3 - 10:05:34.476595 [15262/15262]:         1)
> /usr/local/lib/lttng/libexec/lttng-consumerd (in spawn_consumerd() at
> main.c:2517)
> DEBUG3 - 10:05:34.476682 [15262/15262]:         2)
> /usr/local/lib/lttng/libexec/lttng-consumerd (in spawn_consumerd() at
> main.c:2518)
> DEBUG1 - 10:05:34.476462 [14540/15263]: [thread] Manage consumer started (in
> thread_manage_consumer() at main.c:1249)
> DEBUG3 - 10:05:34.476765 [15262/15262]:         3)  (in spawn_consumerd() at
> main.c:2519)
> DEBUG3 - 10:05:34.477658 [15262/15262]: Found location #1 (in
> spawn_consumerd() at main.c:2521)
> DEBUG1 - 10:05:34.477742 [15262/15262]: Using kernel consumer at:
> /usr/local/lib/lttng/libexec/lttng-consumerd (in spawn_consumerd() at
> main.c:2534)
> DEBUG2 - 10:05:34.275827 [14540/15263]: Receiving code from consumer
> err_sock (in thread_manage_consumer() at main.c:1347)
> DEBUG1 - 10:05:34.376523 [14540/15263]: Consumer command socket ready (fd:
> 37 (in thread_manage_consumer() at main.c:1381)
> DEBUG1 - 10:05:34.376554 [14540/15263]: Consumer metadata socket ready (fd:
> 38) (in thread_manage_consumer() at main.c:1383)
> DEBUG3 - 10:05:34.376545 [14540/14601]: Consumer socket created (fd: 37) and
> added to output (in consumer_create_socket() at consumer.c:302)
> DEBUG1 - 10:05:34.376585 [14540/14601]: Setting relayd for session
> kernel_test (in cmd_setup_relayd() at cmd.c:761)
> DEBUG1 - 10:05:34.376599 [14540/14601]: Enable event command for event '*'
> (in _cmd_enable_event() at cmd.c:1524)
> DEBUG1 - 10:05:34.376619 [14540/14601]: Trying to find channel channel0 (in
> trace_kernel_get_channel_by_name() at trace-kernel.c:49)
> DEBUG1 - 10:05:34.376652 [14540/14601]: Enabling channel  for session
> kernel_test (in cmd_enable_channel() at cmd.c:1054)
> DEBUG1 - 10:05:34.376662 [14540/14601]: Trying to find channel channel0 (in
> trace_kernel_get_channel_by_name() at trace-kernel.c:49)
> DEBUG3 - 10:05:34.376679 [14540/14601]: Kernel create channel  with attr: 0,
> 262144, 4, 0, 200000, 0, 0 (in kernel_create_channel() at kernel.c:140)
> DEBUG1 - 10:05:35.744393 [14540/14601]: Kernel channel channel0 created (fd:
> 39) (in kernel_create_channel() at kernel.c:162)
> DEBUG1 - 10:05:35.744972 [14540/14601]: Kernel quiescent wait on 13 (in
> kernel_wait_quiescent() at kernel.c:570)
> DEBUG1 - 10:05:35.745053 [14540/14607]: Thread kernel return from poll on 2
> fds (in thread_manage_kernel() at main.c:1127)
> DEBUG1 - 10:05:35.745789 [14540/14607]: Updating kernel poll set (in
> update_kernel_poll() at main.c:910)
> DEBUG1 - 10:05:35.853454 [14540/14601]: Trying to find channel channel0 (in
> trace_kernel_get_channel_by_name() at trace-kernel.c:49)
> DEBUG1 - 10:05:35.853839 [14540/14601]: Found channel by name channel0 (in
> trace_kernel_get_channel_by_name() at trace-kernel.c:53)
> Warning: Event * not found!
> DEBUG3 - 10:05:35.854838 [14540/14601]: Kernel destroy channel channel0 (in
> kernel_destroy_channel() at kernel.c:956)
> DEBUG1 - 10:05:35.854937 [14540/14601]: [trace] Closing channel fd 39 (in
> trace_kernel_destroy_channel() at trace-kernel.c:482)
> DEBUG1 - 10:05:35.855160 [14540/14601]: Sending response (size: 16, retcode:
> Enable kernel event failed) (in thread_manage_clients() at main.c:4456)
> DEBUG1 - 10:05:35.855269 [14540/14607]: Thread kernel polling (in
> thread_manage_kernel() at main.c:1120)
> DEBUG1 - 10:05:35.855485 [14540/14601]: Clean command context structure (in
> clean_command_ctx() at main.c:829)
> DEBUG1 - 10:05:35.856010 [14540/14601]: Accepting client command ... (in
> thread_manage_clients() at main.c:4310)
> Error: Events: Enable kernel event failed (channel channel0, session
> kernel_test)
> Error: Command error
>
> Is there any advice ?
>
> Thanks
> zhenyu.ren
> ------------------------------------------------------------------
> 发件人:zhenyu.ren <zhenyu.ren at aliyun.com>
> 发送时间:2015年11月11日(星期三) 09:32
> 收件人:Jérémie Galarneau <jeremie.galarneau at efficios.com>
> 抄 送:lttng-dev <lttng-dev at lists.lttng.org>
> 主 题:[lttng-dev] 答复: 2.7.0 not support enable-event -k -a
>
>   In fact, I made some changes in lttng toolchain(module/tool/ust) to
> support older kernel/OS.These changes are OK for Lttng 2.6 .Since you are
> sure "enable-event -k -a" has no problem,it's more chance that I made some
> inappropriate changes.
>
>
> Thanks
> zhenyu.ren
> ------------------------------------------------------------------
> 发件人:Jérémie Galarneau <jeremie.galarneau at efficios.com>
> 发送时间:2015年11月10日(星期二) 23:09
> 收件人:zhenyu.ren <zhenyu.ren at aliyun.com>
> 抄 送:lttng-dev <lttng-dev at lists.lttng.org>,Jonathan Rajotte Julien
> <Jonathan.rajotte-julien at efficios.com>
> 主 题:Re: [lttng-dev] 2.7.0 not support enable-event -k -a
>
> On Tue, Nov 10, 2015 at 10:02 AM, Jonathan Rajotte Julien
> <Jonathan.rajotte-julien at efficios.com> wrote:
>> Hi Zhenyu,
>>
>> I just tested it on a Ubuntu 15.10 with kernel 4.2.3 with no problem.
>>
>> Did you install from source/ppa ? Could you give us all the steps involved
>> ?
>>
>> Make sure to go over [1] to help us pinpoint the problem.
>>
>> [1] https://lttng.org/community/#bug-reporting-guidelines
>
> Make sure you include the verbose logs of the session daemon by
> launching it with the '-vvv' switch.
> Also, please check that your lttng-modules version matches the rest of
> the toolchain (v2.7.x)
>
> Thanks!
> Jérémie
>
>>
>> Cheers!
>>
>>
>> On 2015-11-10 03:17 AM, zhenyu.ren wrote:
>>>
>>> Hi,dev-team
>>>
>>>    I got the following erros when I run the commd :lttng enable-event -k
>>> -a
>>> "Error: Events: Enable kernel event failed (channel channel0, session
>>> kernel_test)
>>> Error: Command error"
>>>   It seems that LTTNG-2.7.0 do NOT support enable-event option "--all".
>>> Is
>>> that right?If wo ,what's the idea behind it?
>>>
>>> Thanks
>>> zhenyu.ren
>>>
>>>
>>>
>>> _______________________________________________
>>> lttng-dev mailing list
>>> lttng-dev at lists.lttng.org
>>> http://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev
>>
>>
>> --
>> Jonathan R. Julien
>> Efficios
>>
>>
>> _______________________________________________
>> lttng-dev mailing list
>> lttng-dev at lists.lttng.org
>> http://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev
>
>
>
> --
> Jérémie Galarneau
> EfficiOS Inc.
> http://www.efficios.com
>
>
>



-- 
Jérémie Galarneau
EfficiOS Inc.
http://www.efficios.com



More information about the lttng-dev mailing list