mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Joe Perches <joe@perches.com>
To: Andrew Morton <akpm@linux-foundation.org>
Cc: "Du, Changbin" <changbin.du@gmail.com>,
	jbaron@akamai.com, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2] dynamic_debug: add wildcard support to filter files/functions/modules
Date: Thu, 31 Oct 2013 16:30:55 -0700	[thread overview]
Message-ID: <1383262255.2769.11.camel@joe-AO722> (raw)
In-Reply-To: <20131031155253.79a21d6a126be11a64153d8b@linux-foundation.org>

On Thu, 2013-10-31 at 15:52 -0700, Andrew Morton wrote:
> On Mon, 28 Oct 2013 23:29:10 +0800 "Du, Changbin" <changbin.du@gmail.com> wrote:
[]
> > +/* check if the string matches given pattern which includes wildcards */
> > +static int match_pattern(const char *pattern, const char *string)
[]
> No, something like this should be in lib/ so that other callers can use
> it.  We already have at least one copy handy in
> drivers/ata/libata-core.c:glob_match().  A better approach would be to
> move that glob_match() into lib/glob_match.c then teach dynamic_debug
> to use it.
> 
> There are probably other private globbing functions lying around the
> kernel, but it's rather a hard thing to grep for...

Maybe use lib/parser.c where the other match_<foo> functions
are already.

match_glob has the disadvantage that it's recursive too.

trace has:

kernel/trace/trace_events_filter.c:static int regex_match_full(char *str, struct regex *r, int len)
kernel/trace/trace_events_filter.c:static int regex_match_front(char *str, struct regex *r, int len)
kernel/trace/trace_events_filter.c:static int regex_match_middle(char *str, struct regex *r, int len)
kernel/trace/trace_events_filter.c:static int regex_match_end(char *str, struct regex *r, int len)

but there probably aren't many more that could be converted.


  reply	other threads:[~2013-10-31 23:31 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-07-25 13:02 [PATCH] " Du, Changbin
2013-07-25 16:47 ` Joe Perches
2013-07-30  3:59   ` Jason Baron
2013-10-28 15:29     ` [PATCH v2] " Du, Changbin
2013-10-28 16:30       ` Joe Perches
2013-10-29  8:04         ` Changbin Du
2013-10-29 13:33           ` [PATCH v3] " Du, Changbin
2013-10-29 16:20             ` Joe Perches
2013-10-30  6:58               ` Changbin Du
2013-10-30 13:57                 ` Changbin Du
2013-10-30 14:21                   ` [PATCH v4 1/2] " Du, Changbin
2013-10-30 14:21                   ` [PATCH v4 2/2] dynamic-debug-howto.txt: update since new wildcard support Du, Changbin
2013-10-29 20:21             ` [PATCH v3] dynamic_debug: add wildcard support to filter files/functions/modules Marcel Holtmann
2013-10-30  6:24               ` Changbin Du
2013-10-31 22:52       ` [PATCH v2] " Andrew Morton
2013-10-31 23:30         ` Joe Perches [this message]
2013-11-07  3:04           ` Changbin Du
2013-11-07  3:11           ` Changbin Du
2013-11-07  6:12             ` Joe Perches
2013-11-15  4:01               ` Changbin Du
2013-11-16  8:24                 ` [PATCH v5 0/3] add wildcard support for dynamic debug Du, Changbin
2013-11-16  8:24                 ` [PATCH v5 1/3] lib/parser.c: add match_wildcard function Du, Changbin
2013-11-16  8:24                 ` [PATCH v5 2/3] dynamic_debug: add wildcard support to filter files/functions/modules Du, Changbin
2013-11-16  8:24                 ` [PATCH v5 3/3] dynamic-debug-howto.txt: update since new wildcard support Du, Changbin

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=1383262255.2769.11.camel@joe-AO722 \
    --to=joe@perches.com \
    --cc=akpm@linux-foundation.org \
    --cc=changbin.du@gmail.com \
    --cc=jbaron@akamai.com \
    --cc=linux-kernel@vger.kernel.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

all inboxes | Powered by JetHome®