kernelnewbies.kernelnewbies.org archive mirror
 help / color / mirror / Atom feed
* Need help with tracepoints
@ 2017-04-29 10:52 Matwey V. Kornilov
  2017-04-29 11:46 ` Peter Senna Tschudin
  2017-04-29 12:50 ` Matwey V. Kornilov
  0 siblings, 2 replies; 4+ messages in thread
From: Matwey V. Kornilov @ 2017-04-29 10:52 UTC (permalink / raw)
  To: kernelnewbies

Hello,

I am following trace/tracepoints.txt guide to add some tracepoints to
already existing kernel module.

I've created include/trace/events/mysubsys.h
and added

#include <trace/events/mysubsys.h>

#define CREATE_TRACE_POINTS
DEFINE_TRACE(mysubsys_event1);
EXPORT_TRACEPOINT_SYMBOL_GPL(mysubsys_event1);

to the module sources. There are symbols *_mysubsys_event1 in module ko
file.

The issue is that I don't see my events in /sys/kernel/debug/tracing/events
Not even ./mysubsys path here.

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

* Need help with tracepoints
  2017-04-29 10:52 Need help with tracepoints Matwey V. Kornilov
@ 2017-04-29 11:46 ` Peter Senna Tschudin
  2017-04-29 11:47   ` Peter Senna Tschudin
  2017-04-29 12:50 ` Matwey V. Kornilov
  1 sibling, 1 reply; 4+ messages in thread
From: Peter Senna Tschudin @ 2017-04-29 11:46 UTC (permalink / raw)
  To: kernelnewbies

Hello Matwey,

This doesn't answer your question, but did you take a look at perf and
it's ability to do trace points?

See this link: http://www.brendangregg.com/perf.html#Tracepoints

On Sat, Apr 29, 2017 at 12:52 PM, Matwey V. Kornilov
<matwey.kornilov@gmail.com> wrote:
> Hello,
>
> I am following trace/tracepoints.txt guide to add some tracepoints to
> already existing kernel module.
>
> I've created include/trace/events/mysubsys.h
> and added
>
> #include <trace/events/mysubsys.h>
>
> #define CREATE_TRACE_POINTS
> DEFINE_TRACE(mysubsys_event1);
> EXPORT_TRACEPOINT_SYMBOL_GPL(mysubsys_event1);
>
> to the module sources. There are symbols *_mysubsys_event1 in module ko
> file.
>
> The issue is that I don't see my events in /sys/kernel/debug/tracing/events
> Not even ./mysubsys path here.
>
>
> _______________________________________________
> Kernelnewbies mailing list
> Kernelnewbies at kernelnewbies.org
> https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies



-- 
Peter

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

* Need help with tracepoints
  2017-04-29 11:46 ` Peter Senna Tschudin
@ 2017-04-29 11:47   ` Peter Senna Tschudin
  0 siblings, 0 replies; 4+ messages in thread
From: Peter Senna Tschudin @ 2017-04-29 11:47 UTC (permalink / raw)
  To: kernelnewbies

On Sat, Apr 29, 2017 at 1:46 PM, Peter Senna Tschudin
<peter.senna@gmail.com> wrote:
> Hello Matwey,
>
> This doesn't answer your question, but did you take a look at perf and
> it's ability to do trace points?
>
> See this link: http://www.brendangregg.com/perf.html#Tracepoints

I actually meant this one here:

http://www.brendangregg.com/perf.html#DynamicTracingEg


>
> On Sat, Apr 29, 2017 at 12:52 PM, Matwey V. Kornilov
> <matwey.kornilov@gmail.com> wrote:
>> Hello,
>>
>> I am following trace/tracepoints.txt guide to add some tracepoints to
>> already existing kernel module.
>>
>> I've created include/trace/events/mysubsys.h
>> and added
>>
>> #include <trace/events/mysubsys.h>
>>
>> #define CREATE_TRACE_POINTS
>> DEFINE_TRACE(mysubsys_event1);
>> EXPORT_TRACEPOINT_SYMBOL_GPL(mysubsys_event1);
>>
>> to the module sources. There are symbols *_mysubsys_event1 in module ko
>> file.
>>
>> The issue is that I don't see my events in /sys/kernel/debug/tracing/events
>> Not even ./mysubsys path here.
>>
>>
>> _______________________________________________
>> Kernelnewbies mailing list
>> Kernelnewbies at kernelnewbies.org
>> https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
>
>
>
> --
> Peter



-- 
Peter

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

* Need help with tracepoints
  2017-04-29 10:52 Need help with tracepoints Matwey V. Kornilov
  2017-04-29 11:46 ` Peter Senna Tschudin
@ 2017-04-29 12:50 ` Matwey V. Kornilov
  1 sibling, 0 replies; 4+ messages in thread
From: Matwey V. Kornilov @ 2017-04-29 12:50 UTC (permalink / raw)
  To: kernelnewbies

29.04.2017 13:52, Matwey V. Kornilov ?????:
> Hello,
> 
> I am following trace/tracepoints.txt guide to add some tracepoints to
> already existing kernel module.
> 
> I've created include/trace/events/mysubsys.h
> and added
> 
> #include <trace/events/mysubsys.h>
> 
> #define CREATE_TRACE_POINTS
> DEFINE_TRACE(mysubsys_event1);
> EXPORT_TRACEPOINT_SYMBOL_GPL(mysubsys_event1);
> 
> to the module sources. There are symbols *_mysubsys_event1 in module ko
> file.
> 
> The issue is that I don't see my events in /sys/kernel/debug/tracing/events
> Not even ./mysubsys path here.
> 

Ok. I found. I had to use TRACE_EVENT() macro to use
/sys/kernel/debug/tracing/events interface

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

end of thread, other threads:[~2017-04-29 12:50 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-04-29 10:52 Need help with tracepoints Matwey V. Kornilov
2017-04-29 11:46 ` Peter Senna Tschudin
2017-04-29 11:47   ` Peter Senna Tschudin
2017-04-29 12:50 ` Matwey V. Kornilov

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).