All of lore.kernel.org
 help / color / mirror / Atom feed
From: Liam Girdwood <liam.r.girdwood@linux.intel.com>
To: Mark Brown <broonie@kernel.org>
Cc: Takashi Iwai <tiwai@suse.de>, alsa-devel@alsa-project.org
Subject: Re: [PATCH v2 07/12] ASoC: SOF: Add DSP firmware trace event support
Date: Thu, 20 Sep 2018 17:02:42 +0100	[thread overview]
Message-ID: <20f3315373b30624dd9ab83f3c909cbc9afe0b0c.camel@linux.intel.com> (raw)
In-Reply-To: <20180904154639.GG12993@sirena.org.uk>

On Tue, 2018-09-04 at 16:46 +0100, Mark Brown wrote:
> On Tue, Sep 04, 2018 at 04:28:49PM +0100, Liam Girdwood wrote:
> > On Tue, 2018-09-04 at 16:03 +0100, Mark Brown wrote:
> > > I was thinking the code could read it like it's doing now and then just
> > > have a trace event to dump it into the core trace infrastructure as it
> > > reads things in.
> > Most of the data is binary atm, so we were decoding in userspace. Any
> > objection
> > to decoding in the kernel as different trace events ?
> 
> I wouldn't think so.
> 

I was initially thinking about a partial decode. The FW has many subsystems for
trace that can be individually switched on/off via IPC. e.g. driver would read
the trace packet class and then call the appropriate trace event for that class
(note that class is not decoded any further). But I'm not so sure now as these
classes can change at runtime based on topologies. 

> The way the trace stuff works is that the writer dumps blocks of data
> into the trace buffer in raw binary form in a structured block tagged
> with the event type and then later on when something reads out the
> buffer they can be formatted as desired, including things like hex dumps
> (IIRC there's facilities to just get the raw buffer entries too, I've
> only ever used the human readable interface myself, writing software is
> hard). 

Yeah, I'm just reading up on this now, human readable is easy.

>  This gives very fast writes which is really nice for anything
> performance sensitive and means you can leave trace on a lot more than
> you would otherwise.  I'd guess if you were decoding it'd just be
> splitting the buffer up into per message chunks.

So I think now we will trace the driver side (easy) and then trace event
firmware trace packets as ASCII text (which userspace would decode).

I will delay upstreaming the trace part so v4 will be sent minus trace.

I will probably have some debugFS interface that would export dynamic firmware
trace tuning controls.

Liam

> _______________________________________________
> Alsa-devel mailing list
> Alsa-devel@alsa-project.org
> http://mailman.alsa-project.org/mailman/listinfo/alsa-devel

  reply	other threads:[~2018-09-20 16:02 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-08-31 15:18 [PATCH v2 00/12] Sound Open Firmware Core Liam Girdwood
2018-08-31 15:18 ` [PATCH v2 01/12] ASoC: SOF: Add Sound Open Firmware driver core Liam Girdwood
2018-09-03 15:07   ` Mark Brown
2018-08-31 15:19 ` [PATCH v2 02/12] ASoC: SOF: Add Sound Open Firmware KControl support Liam Girdwood
2018-08-31 15:19 ` [PATCH v2 03/12] ASoC: SOF: Add driver debug support Liam Girdwood
2018-08-31 15:19 ` [PATCH v2 04/12] ASoC: SOF: Add support for IPC IO between DSP and Host Liam Girdwood
2018-09-03 15:53   ` Mark Brown
2018-09-04 13:15     ` Liam Girdwood
2018-08-31 15:19 ` [PATCH v2 05/12] ASoC: SOF: Add PCM operations support Liam Girdwood
2018-08-31 15:19 ` [PATCH v2 06/12] ASoC: SOF: Add support for loading topologies Liam Girdwood
2018-09-03 16:19   ` Mark Brown
2018-08-31 15:19 ` [PATCH v2 07/12] ASoC: SOF: Add DSP firmware trace event support Liam Girdwood
2018-09-03 16:25   ` Mark Brown
2018-09-04 13:21     ` Liam Girdwood
2018-09-04 15:03       ` Mark Brown
2018-09-04 15:28         ` Liam Girdwood
2018-09-04 15:46           ` Mark Brown
2018-09-20 16:02             ` Liam Girdwood [this message]
2018-08-31 15:19 ` [PATCH v2 08/12] ASoC: SOF: Add DSP HW abstraction operations Liam Girdwood
2018-08-31 15:19 ` [PATCH v2 09/12] ASoC: SOF: Add firmware loader support Liam Girdwood
2018-08-31 15:19 ` [PATCH v2 10/12] ASoC: SOF: Add PM support Liam Girdwood
2018-08-31 15:19 ` [PATCH v2 11/12] ASoC: SOF: Add userspace ABI support Liam Girdwood
2018-08-31 15:19 ` [PATCH v2 12/12] ASoC: SOF: Add Build support for SOF core Liam Girdwood

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20f3315373b30624dd9ab83f3c909cbc9afe0b0c.camel@linux.intel.com \
    --to=liam.r.girdwood@linux.intel.com \
    --cc=alsa-devel@alsa-project.org \
    --cc=broonie@kernel.org \
    --cc=tiwai@suse.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.