From: "Dalessandro, Dennis" <dennis.dalessandro-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
To: "leon-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org"
<leon-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
Cc: "linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org"
<linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>,
"dledford-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org"
<dledford-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
Subject: Re: VERBOSE flags
Date: Mon, 19 Sep 2016 13:34:39 +0000 [thread overview]
Message-ID: <1474292075.6520.28.camel@intel.com> (raw)
In-Reply-To: <20160919132518.GH3273-2ukJVAZIZ/Y@public.gmane.org>
On Mon, 2016-09-19 at 16:25 +0300, Leon Romanovsky wrote:
> On Mon, Sep 19, 2016 at 12:29:43PM +0000, Dalessandro, Dennis wrote:
> > On Mon, 2016-09-19 at 09:15 +0300, Leon Romanovsky wrote:
> > > The function pointers will cause us to create two similar
> > > functions
> > > (debug/regular) for every important function. It will leave to
> > > code
> > > duplication and/or introducing of new code to fill additional
> > > fields
> > > in returns to debug functions, so they will be able to print it.
> >
> > I do sort of like Doug's idea. It means you can easily instrument
> > the
> > heck out of a routine and have it always available. It provides
> > more
> > flexibility in what you can do in a debug version.
> >
> > You do make a valid point though about duplicating code. Perhaps
> > that
> > can be alleviated to some extent just by refactoring and adding
> > inlines, etc.
>
> At the end, we will invent tracepoints :)
>
> >
> > > I wanted to propose to use tracepoints to provide debug
> > > information
> > > in
> > > data paths. The tracepoints infrastructure uses hooks in the code
> > > with
> > > minimal impact on performance.
> >
> > This is so far the path we have chosen for hfi1. We have a number
> > of
> > tracepoints in various parts of the code. Again it's available on
> > demand without special kernels or boot/driver options.
>
> CONFIG_SDMA_VERBOSITY ????
Yes we do have that, which illustrates that trace points can not do
everything. I had hoped to deprecate that at some point. Regardless,
sometimes you want additional code to be added or to do something
slightly different. You can't do that with a tracepoint.
You can see we use tracepoints pretty extensively and that is our main
vehicle for debugging. Here is where all the definitions are:
$ ls trace_*
trace_ctxts.h trace_dbg.h trace_ibhdrs.h trace_misc.h trace_rc.h t
race_rx.h trace_tx.h
-Denny
> >
> > > > Then we can drop the CONFIG_*_DEBUG options out of all of the
> > > > drivers. That would be my preference. I don't want any
> > > > compile
> > > > time
> > > > options because you never will be running a debug kernel when
> > > > you
> > > > need
> > > > it. Per device, run time selectable so that you get 0 overhead
> > > > in
> > > > the
> > > > normal case is what I would like to see.
> > >
> > > Great,
> > > We are aligned on this point, so do I. I see no reason in special
> > > compiled
> > > kernel or global module parameter to print debug prints for whole
> > > driver.
> >
> > Same here.
> >
> > -Denny
next prev parent reply other threads:[~2016-09-19 13:34 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <CALq1K=KfU+N87pyfjfSd=G-thpyR0mjzuuxQ8eTuqrc2Mb+yZQ@mail.gmail.com>
[not found] ` <77cd1f09-fa39-6f75-6c01-c7ef18909f30@redhat.com>
[not found] ` <CALq1K=+0S-YnXQo5Hvc3bdOBNuEpowdSMYJThdmHqMNwOu8z1Q@mail.gmail.com>
[not found] ` <CALq1K=+0S-YnXQo5Hvc3bdOBNuEpowdSMYJThdmHqMNwOu8z1Q-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2016-09-18 20:35 ` VERBOSE flags Doug Ledford
[not found] ` <0a26585a-2e54-1c24-d212-0e2469afb8d8-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2016-09-19 6:15 ` Leon Romanovsky
[not found] ` <20160919061558.GG3273-2ukJVAZIZ/Y@public.gmane.org>
2016-09-19 12:29 ` Dalessandro, Dennis
[not found] ` <1474288178.6520.12.camel-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
2016-09-19 13:25 ` Leon Romanovsky
[not found] ` <20160919132518.GH3273-2ukJVAZIZ/Y@public.gmane.org>
2016-09-19 13:34 ` Dalessandro, Dennis [this message]
[not found] ` <1474292075.6520.28.camel-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
2016-09-20 10:56 ` Leon Romanovsky
[not found] ` <20160920105642.GI26673-2ukJVAZIZ/Y@public.gmane.org>
2016-09-20 12:11 ` Dalessandro, Dennis
[not found] ` <1474373496.12415.28.camel-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
2016-09-20 12:30 ` Leon Romanovsky
2016-09-19 16:03 ` Doug Ledford
[not found] ` <02761057-02de-d3d1-13d9-ca64e4ee9556-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2016-09-20 10:42 ` Leon Romanovsky
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=1474292075.6520.28.camel@intel.com \
--to=dennis.dalessandro-ral2jqcrhueavxtiumwx3w@public.gmane.org \
--cc=dledford-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org \
--cc=leon-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org \
--cc=linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
/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 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).