linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [RFC] Allowing modules to control tracing subsystem
@ 2019-03-22  8:56 Felipe Balbi
  2019-04-02  5:44 ` Felipe Balbi
  0 siblings, 1 reply; 3+ messages in thread
From: Felipe Balbi @ 2019-03-22  8:56 UTC (permalink / raw)
  To: Steven Rostedt, Ingo Molnar; +Cc: linux-kernel, linux-usb

[-- Attachment #1: Type: text/plain, Size: 1746 bytes --]


Hi guys,

I've been thinking about turning my f-trace.c USB function [1] into an
implementation of the USB Debug Class [2]. In order to support all
requests, I would need means to control parts of the tracing subsystem,
for example enabling and disabling tracing, flushing the trace buffer,
changing trace buffer size, choose which trace events to enable, etc.

Some of those functions (e.g. print_trace_line()) are available for
things like trace_kdb.c [3], but they're not available for modules;
i.e. they're not exported symbols.

This will involve a rather large change to tracing subsystem however we
could rely on such infrastructure for remote debugging of e.g. IVIs,
phones, etc.

The USB Debug Class already predicts the presence of JTAG access and
Hardware tracing modules to be exported over USB. It also allows for
GDB-type access. Adding our linux kernel tracing would make it into a
complete tracing solution.

In order to fully support this we would need, not only to expose some
internal trace functions for modules, but I suppose the trace format
would have to be slightly better defined so that it be decoded remotely
give access to vmlinux.

What do you guys think about this? Would this be something that folks
would be interested in? Currently we can only export ftrace data, not
trace events or anything else. Ideally we would export raw trace buffer
entries to be decoded at a later moment.

cheers

[1] https://marc.info/?i=20190321094748.7031-1-felipe.balbi@linux.intel.com
[2] https://www.usb.org/sites/default/files/documents/usb_debug_class_rev_1_0_final_0.pdf
[3] https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/kernel/trace/trace_kdb.c#n20

-- 
balbi

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 832 bytes --]

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

* Re: [RFC] Allowing modules to control tracing subsystem
  2019-03-22  8:56 [RFC] Allowing modules to control tracing subsystem Felipe Balbi
@ 2019-04-02  5:44 ` Felipe Balbi
  2019-05-24  3:05   ` Steven Rostedt
  0 siblings, 1 reply; 3+ messages in thread
From: Felipe Balbi @ 2019-04-02  5:44 UTC (permalink / raw)
  To: Steven Rostedt, Ingo Molnar; +Cc: linux-kernel, linux-usb

[-- Attachment #1: Type: text/plain, Size: 1897 bytes --]


Hi,

Felipe Balbi <felipe.balbi@linux.intel.com> writes:
> Hi guys,
>
> I've been thinking about turning my f-trace.c USB function [1] into an
> implementation of the USB Debug Class [2]. In order to support all
> requests, I would need means to control parts of the tracing subsystem,
> for example enabling and disabling tracing, flushing the trace buffer,
> changing trace buffer size, choose which trace events to enable, etc.
>
> Some of those functions (e.g. print_trace_line()) are available for
> things like trace_kdb.c [3], but they're not available for modules;
> i.e. they're not exported symbols.
>
> This will involve a rather large change to tracing subsystem however we
> could rely on such infrastructure for remote debugging of e.g. IVIs,
> phones, etc.
>
> The USB Debug Class already predicts the presence of JTAG access and
> Hardware tracing modules to be exported over USB. It also allows for
> GDB-type access. Adding our linux kernel tracing would make it into a
> complete tracing solution.
>
> In order to fully support this we would need, not only to expose some
> internal trace functions for modules, but I suppose the trace format
> would have to be slightly better defined so that it be decoded remotely
> give access to vmlinux.
>
> What do you guys think about this? Would this be something that folks
> would be interested in? Currently we can only export ftrace data, not
> trace events or anything else. Ideally we would export raw trace buffer
> entries to be decoded at a later moment.
>
> cheers
>
> [1] https://marc.info/?i=20190321094748.7031-1-felipe.balbi@linux.intel.com
> [2] https://www.usb.org/sites/default/files/documents/usb_debug_class_rev_1_0_final_0.pdf
> [3] https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/kernel/trace/trace_kdb.c#n20

A gentle reminder here.

-- 
balbi

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 832 bytes --]

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

* Re: [RFC] Allowing modules to control tracing subsystem
  2019-04-02  5:44 ` Felipe Balbi
@ 2019-05-24  3:05   ` Steven Rostedt
  0 siblings, 0 replies; 3+ messages in thread
From: Steven Rostedt @ 2019-05-24  3:05 UTC (permalink / raw)
  To: Felipe Balbi; +Cc: Ingo Molnar, linux-kernel, linux-usb, Divya Indi

On Tue, 02 Apr 2019 08:44:31 +0300
Felipe Balbi <felipe.balbi@linux.intel.com> wrote:

> Hi,
> 
> Felipe Balbi <felipe.balbi@linux.intel.com> writes:

Hi Felipe,

I somehow missed both your original email and this gentle reminder.

> > Hi guys,
> >
> > I've been thinking about turning my f-trace.c USB function [1] into an
> > implementation of the USB Debug Class [2]. In order to support all
> > requests, I would need means to control parts of the tracing subsystem,
> > for example enabling and disabling tracing, flushing the trace buffer,
> > changing trace buffer size, choose which trace events to enable, etc.

I believe a lot of these are already available.

Also note, that Divya made it possible to have your own tracing
instance for a module.

> >
> > Some of those functions (e.g. print_trace_line()) are available for
> > things like trace_kdb.c [3], but they're not available for modules;
> > i.e. they're not exported symbols.
> >
> > This will involve a rather large change to tracing subsystem however we
> > could rely on such infrastructure for remote debugging of e.g. IVIs,
> > phones, etc.
> >
> > The USB Debug Class already predicts the presence of JTAG access and
> > Hardware tracing modules to be exported over USB. It also allows for
> > GDB-type access. Adding our linux kernel tracing would make it into a
> > complete tracing solution.
> >
> > In order to fully support this we would need, not only to expose some
> > internal trace functions for modules, but I suppose the trace format
> > would have to be slightly better defined so that it be decoded remotely
> > give access to vmlinux.
> >
> > What do you guys think about this? Would this be something that folks
> > would be interested in? Currently we can only export ftrace data, not
> > trace events or anything else. Ideally we would export raw trace buffer
> > entries to be decoded at a later moment.
> >

Let me know what changes are needed and we can work something out.

Sorry for the delay, it appears I missed quite a bit of emails in this period :-/


-- Steve

> > cheers
> >
> > [1] https://marc.info/?i=20190321094748.7031-1-felipe.balbi@linux.intel.com
> > [2] https://www.usb.org/sites/default/files/documents/usb_debug_class_rev_1_0_final_0.pdf
> > [3] https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/kernel/trace/trace_kdb.c#n20  
> 
> A gentle reminder here.
> 


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

end of thread, other threads:[~2019-05-24  3:05 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-03-22  8:56 [RFC] Allowing modules to control tracing subsystem Felipe Balbi
2019-04-02  5:44 ` Felipe Balbi
2019-05-24  3:05   ` Steven Rostedt

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).