All of lore.kernel.org
 help / color / mirror / Atom feed
* Re: Can lttng support kernel function tracer
       [not found] <5a55c10f-2991-4d2c-ae9f-71bf32a96867@aliyun.com>
@ 2015-02-16 16:53 ` Francis Deslauriers
       [not found] ` <0ecb9733-2e6d-4778-a764-48e139d116f0@aliyun.com>
  1 sibling, 0 replies; 6+ messages in thread
From: Francis Deslauriers @ 2015-02-16 16:53 UTC (permalink / raw)
  To: zhenyu.ren; +Cc: lttng-dev

Hi Zhenyu,

If I understandd your question correctly, I can think of two ways to
trace an arbitrary kernel function. First, you can hook the tracer on
a dynamic probe[1] using something like this:
"lttng enable-event customEventName -k --probe kernelFunctionName".
You can also hook the tracer on both entry and exit of a function
using "--function" instead of "--probe".
To list your kernel symbols use "cat /proc/kallsyms"
Second, you can create custom kernel tracepoints and compile them in
you kernel. Have a look at the online documentation [2].

Don't hesitate to explain further if this doesn't answer your question.

Cheers!
Francis

[1] http://git.lttng.org/?p=lttng-tools.git;a=blob;f=doc/quickstart.txt;h=018c27b2b939ef7cd075255fd01bcfd8b2b21b1e;hb=HEAD#l93
[2] http://lttng.org/docs/#doc-instrumenting-linux-kernel-itself

On Thu, Feb 12, 2015 at 7:49 PM, zhenyu.ren <zhenyu.ren@aliyun.com> wrote:
> Hi,
>
>    It's well known that lttng can make use of kernel tracepoints to do block tracing ,system call tracing etc.Is it possible that  lttng can produce anything like kernel function tracer does?
>
> Thanks
> zhenyu.ren
>
> _______________________________________________
> lttng-dev mailing list
> lttng-dev@lists.lttng.org
> http://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: 答复: Can lttng support kernel function tracer
       [not found] ` <0ecb9733-2e6d-4778-a764-48e139d116f0@aliyun.com>
@ 2015-02-17 15:09   ` Francis Deslauriers
  2015-02-18  6:29   ` 答复:答复: " zhenyu.ren
                     ` (2 subsequent siblings)
  3 siblings, 0 replies; 6+ messages in thread
From: Francis Deslauriers @ 2015-02-17 15:09 UTC (permalink / raw)
  To: zhenyu.ren; +Cc: lttng-dev

CCing lttng-dev back in the thread.

I might be wrong but I think that might be a usecase for a profiler
rather than a usecase for a tracer. Can someone else confirm?
To do that kind of work, you could compile your kernel with gprof support.

Thanks,
Francis


On Tue, Feb 17, 2015 at 3:38 AM, zhenyu.ren <zhenyu.ren@aliyun.com> wrote:
> Hi,Francis
>    In fact, I want to trace all kernel functions related to some
> behavior.For example,I write()  and it returns 100ms later ,so  I want to
> know which kernel  function is too slow. In this case,I can use function
> tracer to trace "all" kernel function in the write() time window.However,I
> want to know is it possible that lttng can be useful in this case.
>
> Thanks
> zhenyu.ren
>
>
> ------------------------------------------------------------------
> 发件人:Francis Deslauriers <francis.deslauriers@mail.utoronto.ca>
> 发送时间:2015年2月17日(星期二) 00:53
> 收件人:zhenyu.ren <zhenyu.ren@aliyun.com>
> 抄 送:lttng-dev <lttng-dev@lists.lttng.org>
> 主 题:Re: [lttng-dev] Can lttng support kernel function tracer
>
> Hi Zhenyu,
>
> If I understandd your question correctly, I can think of two ways to
> trace an arbitrary kernel function. First, you can hook the tracer on
> a dynamic probe[1] using something like this:
> "lttng enable-event customEventName -k --probe kernelFunctionName".
> You can also hook the tracer on both entry and exit of a function
> using "--function" instead of "--probe".
> To list your kernel symbols use "cat /proc/kallsyms"
> Second, you can create custom kernel tracepoints and compile them in
> you kernel. Have a look at the online documentation [2].
>
> Don't hesitate to explain further if this doesn't answer your question.
>
> Cheers!
> Francis
>
> [1]
> http://git.lttng.org/?p=lttng-tools.git;a=blob;f=doc/quickstart.txt;h=018c27b2b939ef7cd075255fd01bcfd8b2b21b1e;hb=HEAD#l93
> [2] http://lttng.org/docs/#doc-instrumenting-linux-kernel-itself
>
> On Thu, Feb 12, 2015 at 7:49 PM, zhenyu.ren <zhenyu.ren@aliyun.com> wrote:
>> Hi,
>>
>> It's well known that lttng can make use of kernel tracepoints to do block
>> tracing ,system call tracing etc.Is it possible that lttng can produce
>> anything like kernel function tracer does?
>>
>> Thanks
>> zhenyu.ren
>>
>> _______________________________________________
>> lttng-dev mailing list
>> lttng-dev@lists.lttng.org
>> http://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev

_______________________________________________
lttng-dev mailing list
lttng-dev@lists.lttng.org
http://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev

^ permalink raw reply	[flat|nested] 6+ messages in thread

* 答复:答复: Can lttng support kernel function tracer
       [not found] ` <0ecb9733-2e6d-4778-a764-48e139d116f0@aliyun.com>
  2015-02-17 15:09   ` 答复: " Francis Deslauriers
@ 2015-02-18  6:29   ` zhenyu.ren
       [not found]   ` <bde879bd-bc81-40a0-98ae-705947c3f5b6@aliyun.com>
  2015-02-25  1:26   ` zhenyu.ren
  3 siblings, 0 replies; 6+ messages in thread
From: zhenyu.ren @ 2015-02-18  6:29 UTC (permalink / raw)
  To: Francis Deslauriers; +Cc: lttng-dev

> I think that might be a usecase for a profiler rather than a usecase for a tracer

I am sorry that I have misled you.Not all write instances(a chance in a million) take 100ms+ to complete.So I have to trace all write instances to capture the deviant ones.

Thanks
zhenyu.ren






------------------------------------------------------------------
发件人:Francis Deslauriers <francis.deslauriers@mail.utoronto.ca>


发送时间:2015年2月17日(星期二) 23:09
收件人:zhenyu.ren <zhenyu.ren@aliyun.com>
抄 送:lttng-dev@lists.lttng.org <lttng-dev@lists.lttng.org>
主 题:Re: 答复:[lttng-dev] Can lttng support kernel function tracer


CCing lttng-dev back in the thread.

I might be wrong but I think that might be a usecase for a profiler
rather than a usecase for a tracer. Can someone else confirm?
To do that kind of work, you could compile your kernel with gprof support.

Thanks,
Francis


On Tue, Feb 17, 2015 at 3:38 AM, zhenyu.ren <zhenyu.ren@aliyun.com> wrote:
> Hi,Francis
>    In fact, I want to trace all kernel functions related to some
> behavior.For example,I write()  and it returns 100ms later ,so  I want to
> know which kernel  function is too slow. In this case,I can use function
> tracer to trace "all" kernel function in the write() time window.However,I
> want to know is it possible that lttng can be useful in this case.
>
> Thanks
> zhenyu.ren
>
>
> ------------------------------------------------------------------
> 发件人:Francis Deslauriers <francis.deslauriers@mail.utoronto.ca>
> 发送时间:2015年2月17日(星期二) 00:53
> 收件人:zhenyu.ren <zhenyu.ren@aliyun.com>
> 抄 送:lttng-dev <lttng-dev@lists.lttng.org>
> 主 题:Re: [lttng-dev] Can lttng support kernel function tracer
>
> Hi Zhenyu,
>
> If I understandd your question correctly, I can think of two ways to
> trace an arbitrary kernel function. First, you can hook the tracer on
> a dynamic probe[1] using something like this:
> "lttng enable-event customEventName -k --probe kernelFunctionName".
> You can also hook the tracer on both entry and exit of a function
> using "--function" instead of "--probe".
> To list your kernel symbols use "cat /proc/kallsyms"
> Second, you can create custom kernel tracepoints and compile them in
> you kernel. Have a look at the online documentation [2].
>
> Don't hesitate to explain further if this doesn't answer your question.
>
> Cheers!
> Francis
>
> [1]
> http://git.lttng.org/?p=lttng-tools.git;a=blob;f=doc/quickstart.txt;h=018c27b2b939ef7cd075255fd01bcfd8b2b21b1e;hb=HEAD#l93
> [2] http://lttng.org/docs/#doc-instrumenting-linux-kernel-itself
>
> On Thu, Feb 12, 2015 at 7:49 PM, zhenyu.ren <zhenyu.ren@aliyun.com> wrote:
>> Hi,
>>
>> It's well known that lttng can make use of kernel tracepoints to do block
>> tracing ,system call tracing etc.Is it possible that lttng can produce
>> anything like kernel function tracer does?
>>
>> Thanks
>> zhenyu.ren
>>
>> _______________________________________________
>> lttng-dev mailing list
>> lttng-dev@lists.lttng.org
>> http://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev

_______________________________________________
lttng-dev mailing list
lttng-dev@lists.lttng.org
http://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: 答复:答复: Can lttng support kernel function tracer
       [not found]   ` <bde879bd-bc81-40a0-98ae-705947c3f5b6@aliyun.com>
@ 2015-02-19 19:14     ` Francis Deslauriers
  0 siblings, 0 replies; 6+ messages in thread
From: Francis Deslauriers @ 2015-02-19 19:14 UTC (permalink / raw)
  To: zhenyu.ren; +Cc: lttng-dev

You can use the snapshot feature to start recording whenever you
witness a significant latency[1].
You can use the system() function to trigger a record from your app.
e.g. system("lttng snapshot record");

[1] http://lttng.org/docs/#doc-taking-a-snapshot

I hope it helps.

Francis

On Wed, Feb 18, 2015 at 1:29 AM, zhenyu.ren <zhenyu.ren@aliyun.com> wrote:
>> I think that might be a usecase for a profiler rather than a usecase for a tracer
>
> I am sorry that I have misled you.Not all write instances(a chance in a million) take 100ms+ to complete.So I have to trace all write instances to capture the deviant ones.
>
> Thanks
> zhenyu.ren
>
>
>
>
>
>
> ------------------------------------------------------------------
> 发件人:Francis Deslauriers <francis.deslauriers@mail.utoronto.ca>
>
>
> 发送时间:2015年2月17日(星期二) 23:09
> 收件人:zhenyu.ren <zhenyu.ren@aliyun.com>
> 抄 送:lttng-dev@lists.lttng.org <lttng-dev@lists.lttng.org>
> 主 题:Re: 答复:[lttng-dev] Can lttng support kernel function tracer
>
>
> CCing lttng-dev back in the thread.
>
> I might be wrong but I think that might be a usecase for a profiler
> rather than a usecase for a tracer. Can someone else confirm?
> To do that kind of work, you could compile your kernel with gprof support.
>
> Thanks,
> Francis
>
>
> On Tue, Feb 17, 2015 at 3:38 AM, zhenyu.ren <zhenyu.ren@aliyun.com> wrote:
>> Hi,Francis
>>    In fact, I want to trace all kernel functions related to some
>> behavior.For example,I write()  and it returns 100ms later ,so  I want to
>> know which kernel  function is too slow. In this case,I can use function
>> tracer to trace "all" kernel function in the write() time window.However,I
>> want to know is it possible that lttng can be useful in this case.
>>
>> Thanks
>> zhenyu.ren
>>
>>
>> ------------------------------------------------------------------
>> 发件人:Francis Deslauriers <francis.deslauriers@mail.utoronto.ca>
>> 发送时间:2015年2月17日(星期二) 00:53
>> 收件人:zhenyu.ren <zhenyu.ren@aliyun.com>
>> 抄 送:lttng-dev <lttng-dev@lists.lttng.org>
>> 主 题:Re: [lttng-dev] Can lttng support kernel function tracer
>>
>> Hi Zhenyu,
>>
>> If I understandd your question correctly, I can think of two ways to
>> trace an arbitrary kernel function. First, you can hook the tracer on
>> a dynamic probe[1] using something like this:
>> "lttng enable-event customEventName -k --probe kernelFunctionName".
>> You can also hook the tracer on both entry and exit of a function
>> using "--function" instead of "--probe".
>> To list your kernel symbols use "cat /proc/kallsyms"
>> Second, you can create custom kernel tracepoints and compile them in
>> you kernel. Have a look at the online documentation [2].
>>
>> Don't hesitate to explain further if this doesn't answer your question.
>>
>> Cheers!
>> Francis
>>
>> [1]
>> http://git.lttng.org/?p=lttng-tools.git;a=blob;f=doc/quickstart.txt;h=018c27b2b939ef7cd075255fd01bcfd8b2b21b1e;hb=HEAD#l93
>> [2] http://lttng.org/docs/#doc-instrumenting-linux-kernel-itself
>>
>> On Thu, Feb 12, 2015 at 7:49 PM, zhenyu.ren <zhenyu.ren@aliyun.com> wrote:
>>> Hi,
>>>
>>> It's well known that lttng can make use of kernel tracepoints to do block
>>> tracing ,system call tracing etc.Is it possible that lttng can produce
>>> anything like kernel function tracer does?
>>>
>>> Thanks
>>> zhenyu.ren
>>>
>>> _______________________________________________
>>> lttng-dev mailing list
>>> lttng-dev@lists.lttng.org
>>> http://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev

_______________________________________________
lttng-dev mailing list
lttng-dev@lists.lttng.org
http://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev

^ permalink raw reply	[flat|nested] 6+ messages in thread

* 答复:答复: Can lttng support kernel function tracer
       [not found] ` <0ecb9733-2e6d-4778-a764-48e139d116f0@aliyun.com>
                     ` (2 preceding siblings ...)
       [not found]   ` <bde879bd-bc81-40a0-98ae-705947c3f5b6@aliyun.com>
@ 2015-02-25  1:26   ` zhenyu.ren
  3 siblings, 0 replies; 6+ messages in thread
From: zhenyu.ren @ 2015-02-25  1:26 UTC (permalink / raw)
  To: Francis Deslauriers; +Cc: lttng-dev

Oh,What I want is something like "lttng enable-event -a -k --function " to enable ALL function trace.

Thanks
zhenyu.ren






------------------------------------------------------------------
发件人:zhenyu.ren <zhenyu.ren@aliyun.com>
发送时间:2015年2月18日(星期三) 14:29
收件人:Francis Deslauriers <francis.deslauriers@mail.utoronto.ca>
抄 送:lttng-dev@lists.lttng.org <lttng-dev@lists.lttng.org>
主 题:答复:答复:[lttng-dev] Can lttng support kernel function tracer


> I think that might be a usecase for a profiler rather than a usecase for a tracer

I am sorry that I have misled you.Not all write instances(a chance in a million) take 100ms+ to complete.So I have to trace all write instances to capture the deviant ones.

Thanks
zhenyu.ren






------------------------------------------------------------------
发件人:Francis Deslauriers <francis.deslauriers@mail.utoronto.ca>


发送时间:2015年2月17日(星期二) 23:09
收件人:zhenyu.ren <zhenyu.ren@aliyun.com>
抄 送:lttng-dev@lists.lttng.org <lttng-dev@lists.lttng.org>
主 题:Re: 答复:[lttng-dev] Can lttng support kernel function tracer


CCing lttng-dev back in the thread.

I might be wrong but I think that might be a usecase for a profiler
rather than a usecase for a tracer. Can someone else confirm?
To do that kind of work, you could compile your kernel with gprof support.

Thanks,
Francis


On Tue, Feb 17, 2015 at 3:38 AM, zhenyu.ren <zhenyu.ren@aliyun.com> wrote:
> Hi,Francis
>    In fact, I want to trace all kernel functions related to some
> behavior.For example,I write()  and it returns 100ms later ,so  I want to
> know which kernel  function is too slow. In this case,I can use function
> tracer to trace "all" kernel function in the write() time window.However,I
> want to know is it possible that lttng can be useful in this case.
>
> Thanks
> zhenyu.ren
>
>
> ------------------------------------------------------------------
> 发件人:Francis Deslauriers <francis.deslauriers@mail.utoronto.ca>
> 发送时间:2015年2月17日(星期二) 00:53
> 收件人:zhenyu.ren <zhenyu.ren@aliyun.com>
> 抄 送:lttng-dev <lttng-dev@lists.lttng.org>
> 主 题:Re: [lttng-dev] Can lttng support kernel function tracer
>
> Hi Zhenyu,
>
> If I understandd your question correctly, I can think of two ways to
> trace an arbitrary kernel function. First, you can hook the tracer on
> a dynamic probe[1] using something like this:
> "lttng enable-event customEventName -k --probe kernelFunctionName".
> You can also hook the tracer on both entry and exit of a function
> using "--function" instead of "--probe".
> To list your kernel symbols use "cat /proc/kallsyms"
> Second, you can create custom kernel tracepoints and compile them in
> you kernel. Have a look at the online documentation [2].
>
> Don't hesitate to explain further if this doesn't answer your question.
>
> Cheers!
> Francis
>
> [1]
> http://git.lttng.org/?p=lttng-tools.git;a=blob;f=doc/quickstart.txt;h=018c27b2b939ef7cd075255fd01bcfd8b2b21b1e;hb=HEAD#l93
> [2] http://lttng.org/docs/#doc-instrumenting-linux-kernel-itself
>
> On Thu, Feb 12, 2015 at 7:49 PM, zhenyu.ren <zhenyu.ren@aliyun.com> wrote:
>> Hi,
>>
>> It's well known that lttng can make use of kernel tracepoints to do block
>> tracing ,system call tracing etc.Is it possible that lttng can produce
>> anything like kernel function tracer does?
>>
>> Thanks
>> zhenyu.ren
>>
>> _______________________________________________
>> lttng-dev mailing list
>> lttng-dev@lists.lttng.org
>> http://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev

_______________________________________________
lttng-dev mailing list
lttng-dev@lists.lttng.org
http://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Can lttng support kernel function tracer
@ 2015-02-13  0:49 zhenyu.ren
  0 siblings, 0 replies; 6+ messages in thread
From: zhenyu.ren @ 2015-02-13  0:49 UTC (permalink / raw)
  To: lttng-dev

Hi,

   It's well known that lttng can make use of kernel tracepoints to do block tracing ,system call tracing etc.Is it possible that  lttng can produce anything like kernel function tracer does?

Thanks
zhenyu.ren

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2015-02-25  1:26 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <5a55c10f-2991-4d2c-ae9f-71bf32a96867@aliyun.com>
2015-02-16 16:53 ` Can lttng support kernel function tracer Francis Deslauriers
     [not found] ` <0ecb9733-2e6d-4778-a764-48e139d116f0@aliyun.com>
2015-02-17 15:09   ` 答复: " Francis Deslauriers
2015-02-18  6:29   ` 答复:答复: " zhenyu.ren
     [not found]   ` <bde879bd-bc81-40a0-98ae-705947c3f5b6@aliyun.com>
2015-02-19 19:14     ` Francis Deslauriers
2015-02-25  1:26   ` zhenyu.ren
2015-02-13  0:49 zhenyu.ren

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.