From: "Arend van Spriel" <arend@broadcom.com>
To: "Sarah Sharp" <sarah.a.sharp@linux.intel.com>
Cc: "Xenia Ragiadakou" <burzalodowa@gmail.com>,
"OPW Kernel Interns List" <opw-kernel-interns@googlegroups.com>,
linux-usb@vger.kernel.org, linux-wireless@vger.kernel.org,
"Kalle Valo" <kvalo@qca.qualcomm.com>
Subject: Re: Help adding trace events to xHCI
Date: Thu, 11 Jul 2013 19:08:31 +0200 [thread overview]
Message-ID: <51DEE68F.4060705@broadcom.com> (raw)
In-Reply-To: <20130711162002.GA5240@xanatos>
On 07/11/2013 06:20 PM, Sarah Sharp wrote:
> On Mon, Jul 08, 2013 at 09:17:59PM +0300, Xenia Ragiadakou wrote:
>> But when there are other function calls before the callback call, I don't
>> no why but i cannot track anymore the position of the args following the
>> fmt argumenent in the stack with the pointer to fmt.
>
> I'm actually wondering if the call to ath6kl_printk is somehow necessary
> in order to be able to pass arguments on the stack. Perhaps you should
> try defining a similar function for xHCI and see if that helps?
The ath6klk_printk() is not related to the trace function. It is a
separate code path to get the message in the kernel log. I have seen
these constructs before (and implemented it in brcmfmac) but it seems
not very efficient when tracing as the printk can affect run-time behaviour.
> int ath6kl_printk(const char *level, const char *fmt, ...)
> {
> struct va_format vaf;
> va_list args;
> int rtn;
>
> va_start(args, fmt);
>
> vaf.fmt = fmt;
> vaf.va = &args;
>
> rtn = printk("%sath6kl: %pV", level, &vaf);
>
> va_end(args);
>
> return rtn;
> }
> EXPORT_SYMBOL(ath6kl_printk);
>
>> Anyway, something dirty like that will not enter the kernel but i will try
>> to do stack debugging on an example program to see why that happens.
>
> I would suggest just copy-pasting parts of the ath6kl trace code into
> the xHCI driver, and changing one of the xhci_dbg() calls to use that
> code, and see if it works. If it doesn't work, send out an RFC patch
> (using the Cc list I've used), and we'll try to figure out what's going
> wrong.
The biggest challenge in adding tracepoints is identifying what you want
to trace. While tracing debug messages can be convenient the real
strength is in tracing code artifacts like for USB the thing that comes
to my mind first is defining tracepoint for the urb and there are
probably other internals that are informational.
Regards,
Arend
next prev parent reply other threads:[~2013-07-11 17:08 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <51DB0257.1010709@gmail.com>
2013-07-11 16:20 ` Help adding trace events to xHCI Sarah Sharp
2013-07-11 17:08 ` Arend van Spriel [this message]
2013-07-11 17:08 ` Johannes Berg
2013-07-11 19:00 ` Sarah Sharp
2013-07-12 4:25 ` Kalle Valo
2013-07-12 16:41 ` Sarah Sharp
2013-07-12 16:55 ` Steven Rostedt
2013-07-15 13:47 ` Jiri Olsa
2013-07-12 17:08 ` Mathieu Desnoyers
2013-07-12 19:35 ` Mark Wielaard
2013-07-15 12:55 ` Mathieu Desnoyers
2013-07-12 19:35 ` Mark Wielaard
2013-07-12 19:35 ` Mark Wielaard
2013-07-12 18:59 ` Kalle Valo
2013-07-26 9:16 ` Johannes Berg
2013-07-11 19:29 ` Steven Rostedt
2013-07-26 9:19 ` Johannes Berg
2013-07-26 12:28 ` Steven Rostedt
2013-07-26 13:06 ` Johannes Berg
2013-07-26 13:17 ` Steven Rostedt
2013-07-26 13:45 ` Johannes Berg
2013-07-26 14:05 ` Steven Rostedt
2013-07-12 4:23 ` Kalle Valo
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=51DEE68F.4060705@broadcom.com \
--to=arend@broadcom.com \
--cc=burzalodowa@gmail.com \
--cc=kvalo@qca.qualcomm.com \
--cc=linux-usb@vger.kernel.org \
--cc=linux-wireless@vger.kernel.org \
--cc=opw-kernel-interns@googlegroups.com \
--cc=sarah.a.sharp@linux.intel.com \
/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.