[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAJfuBxxqO=z0rVtj9_rKnxMWF5HyWzcBPJMu2oVd74opbiGdVA@mail.gmail.com>
Date: Mon, 23 Aug 2021 12:36:01 -0600
From: jim.cromie@...il.com
To: Andy Shevchenko <andy.shevchenko@...il.com>
Cc: Jason Baron <jbaron@...mai.com>,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
Sean Paul <seanpaul@...omium.org>,
Jessica Yu <jeyu@...nel.org>,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
dri-devel <dri-devel@...ts.freedesktop.org>,
amd-gfx@...ts.freedesktop.org, intel-gvt-dev@...ts.freedesktop.org,
intel-gfx <intel-gfx@...ts.freedesktop.org>
Subject: Re: [PATCH v6 02/11] dyndbg: add DEFINE_DYNAMIC_DEBUG_CATEGORIES and callbacks
On Mon, Aug 23, 2021 at 12:41 AM Andy Shevchenko
<andy.shevchenko@...il.com> wrote:
>
> On Mon, Aug 23, 2021 at 1:21 AM Jim Cromie <jim.cromie@...il.com> wrote:
> >
> > DEFINE_DYNAMIC_DEBUG_CATEGORIES(name, var, bitmap_desc, @bit_descs)
> > allows users to define a drm.debug style (bitmap) sysfs interface, and
> > to specify the desired mapping from bits[0-N] to the format-prefix'd
> > pr_debug()s to be controlled.
> >
yes to everything, 1 question
> > + if (!bitmap) {
> > + pr_err("set_dyndbg: no bits=>queries map\n");
> > + return -EINVAL;
> > + }
> > + rc = kstrtoul(instr, 0, &inbits);
> > + if (rc) {
> > + pr_err("set_dyndbg: failed\n");
> > + return rc;
> > + }
> > + vpr_info("set_dyndbg: input 0x%lx\n", inbits);
> > +
> > + for (i = 0; bitmap->prefix; i++, bitmap++) {
> > + snprintf(query, FMT_QUERY_SIZE, "format '^%s' %cp", bitmap->prefix,
> > + test_bit(i, &inbits) ? '+' : '-');
> > +
> > + matches = ddebug_exec_queries(query, KP_MOD_NAME);
> > +
> > + v2pr_info("bit-%d: %d matches on '%s'\n", i, matches, query);
> > + totct += matches;
> > + }
>
> I'm wondering if there is a room to parse a bitmap as a bitmap.
>
I dont know what you mean here.
can you point to an example to crib from ?
thanks
> --
> With Best Regards,
> Andy Shevchenko
Powered by blists - more mailing lists