Re: [lttng-dev] Can lttng support kernel function tracer

2015-02-16 Thread Francis Deslauriers
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@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


Re: [lttng-dev] Babel trace is throwing error while trying with -i lttng-live option

2015-02-16 Thread Jérémie Galarneau
On Mon, Feb 16, 2015 at 5:33 AM, Ranganadh Kanitmahanti 
ranganadh1...@yahoo.com wrote:

 hi,
 We are using babeltrace 1.2.4 and LTTng Trace Control 2.5.3.  Continously
 giving babeltrace is throwing this error. Sorry about previous
 conversation. I am actually getting this reading a snapshot session . I
 have given continously babeltrace and path to read the traces . Then I am
 getting this error.
 We see below mentioned error while reading out traces using babeltrace…


Okay, so live is not involved at all here?
Would it be possible to share the trace?

Also, can you provide the commands issued to capture this trace?

Thanks,
Jérémie




 
 [error] Unexpected end of packet. Either the trace data stream is
 corrupted or metadata description does not match data layout.
 [error] Reading event failed.
 Error printing trace.

 

 Thanks  Regards,
 K.V.Ranganadh.


   On Monday, 16 February 2015 2:26 PM, Ranganadh Kanitmahanti 
 ranganadh1...@yahoo.com wrote:


 Hi,

 We are using BabelTrace Trace Viewer and Converter 1.2.4 

 Thanks  Regards,
 K.V.Ranganadh.


   On Friday, 13 February 2015 8:19 PM, Jérémie Galarneau 
 jeremie.galarn...@efficios.com wrote:




 On Fri, Feb 13, 2015 at 12:47 AM, Ranganadh Kanitmahanti 
 ranganadh1...@yahoo.com wrote:

 Hi,

 
 [error] Unexpected end of packet. Either the trace data stream is
 corrupted or metadata description does not match data layout.
 [error] Reading event failed.
 Error printing trace.

 

 Can any body tell about this significance. I have seen a similar bug
 resolved Bug #686: stream parser should have a clearer error message when
 encountering cross-packet fields - Babeltrace - LTTng bugs repository
 https://bugs.lttng.org/issues/686
 Can anybody tell in which version the fix was released.


 The fix only clarifies the error message. The corrupted stream probably
 can't be handled by Babeltrace anymore at that point. To answer your
 question, that fix was introduced in v1.1.2 and is part of all v1.2.x
 releases.

 Can you give us more information to reproduce the problem? Which version
 of LTTng-Tools and Babeltrace are you using?

 Thanks,
 Jérémie








 Bug #686: stream parser should have a clearer error message when
 encountering cross-packet fields -... https://bugs.lttng.org/issues/686
 Redmine
 View on bugs.lttng.org https://bugs.lttng.org/issues/686
 Preview by Yahoo



 ___
 lttng-dev mailing list
 lttng-dev@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
___
lttng-dev mailing list
lttng-dev@lists.lttng.org
http://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev


Re: [lttng-dev] Babel trace is throwing error while trying with -i lttng-live option

2015-02-16 Thread Ranganadh Kanitmahanti
hi,We are using babeltrace 1.2.4 and LTTng Trace Control 2.5.3.  Continously 
giving babeltrace is throwing this error. Sorry about previous conversation. I 
am actually getting this reading a snapshot session . I have given continously 
babeltrace and path to read the traces . Then I am getting this error.We see 
below mentioned error while reading out traces using babeltrace… 
 
 
[error] Unexpected end of packet. Either the trace data stream is corrupted or 
metadata description does not match data layout. 
[error] Reading event failed. 
Error printing trace. 
 
 

Thanks  Regards,K.V.Ranganadh.
 

 On Monday, 16 February 2015 2:26 PM, Ranganadh Kanitmahanti 
ranganadh1...@yahoo.com wrote:
   

 Hi,
We are using BabelTrace Trace Viewer and Converter 1.2.4 

Thanks  Regards,K.V.Ranganadh. 

 On Friday, 13 February 2015 8:19 PM, Jérémie Galarneau 
jeremie.galarn...@efficios.com wrote:
   

 

On Fri, Feb 13, 2015 at 12:47 AM, Ranganadh Kanitmahanti 
ranganadh1...@yahoo.com wrote:

Hi,
[error] Unexpected end of 
packet. Either the trace data stream is corrupted or metadata description does 
not match data layout.[error] Reading event failed.Error printing trace. 

Can any body tell about this significance. I have seen a similar bug resolved 
Bug #686: stream parser should have a clearer error message when encountering 
cross-packet fields - Babeltrace - LTTng bugs repositoryCan anybody tell in 
which version the fix was released.


The fix only clarifies the error message. The corrupted stream probably can't 
be handled by Babeltrace anymore at that point. To answer your question, that 
fix was introduced in v1.1.2 and is part of all v1.2.x releases.
Can you give us more information to reproduce the problem? Which version of 
LTTng-Tools and Babeltrace are you using?
Thanks,Jérémie 

|   |
|   |   |   |   |   |
| Bug #686: stream parser should have a clearer error message when encountering 
cross-packet fields -...Redmine |
|  |
| View on bugs.lttng.org | Preview by Yahoo |
|  |
|   |



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





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



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


Re: [lttng-dev] Babel trace is throwing error while trying with -i lttng-live option

2015-02-16 Thread Ranganadh Kanitmahanti
Hi,
We are using BabelTrace Trace Viewer and Converter 1.2.4 

Thanks  Regards,K.V.Ranganadh. 

 On Friday, 13 February 2015 8:19 PM, Jérémie Galarneau 
jeremie.galarn...@efficios.com wrote:
   

 

On Fri, Feb 13, 2015 at 12:47 AM, Ranganadh Kanitmahanti 
ranganadh1...@yahoo.com wrote:

Hi,
[error] Unexpected end of 
packet. Either the trace data stream is corrupted or metadata description does 
not match data layout.[error] Reading event failed.Error printing trace. 

Can any body tell about this significance. I have seen a similar bug resolved 
Bug #686: stream parser should have a clearer error message when encountering 
cross-packet fields - Babeltrace - LTTng bugs repositoryCan anybody tell in 
which version the fix was released.


The fix only clarifies the error message. The corrupted stream probably can't 
be handled by Babeltrace anymore at that point. To answer your question, that 
fix was introduced in v1.1.2 and is part of all v1.2.x releases.
Can you give us more information to reproduce the problem? Which version of 
LTTng-Tools and Babeltrace are you using?
Thanks,Jérémie 

|   |
|   |   |   |   |   |
| Bug #686: stream parser should have a clearer error message when encountering 
cross-packet fields -...Redmine |
|  |
| View on bugs.lttng.org | Preview by Yahoo |
|  |
|   |



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





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

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