cocci.inria.fr archive mirror
 help / color / mirror / Atom feed
From: peff@peff.net (Jeff King)
To: cocci@systeme.lip6.fr
Subject: [Cocci] Excluding a function from Coccinelle transformation
Date: Sat, 25 Aug 2018 04:22:51 -0400	[thread overview]
Message-ID: <20180825082251.GA1672@sigill.intra.peff.net> (raw)
In-Reply-To: <20d4a3cf-d7b6-81e6-25b0-94535795242b@users.sourceforge.net>

On Sat, Aug 25, 2018 at 10:08:30AM +0200, SF Markus Elfring wrote:

> >> However, this can all be very expensive, because you are matching paths
> >> through the function definition which you don't really care about.
> >> All you care about here is the name.  So another approach is
> >
> > Yeah, it is. Using the pre-1.0.7 version, the original patch runs in
> > ~1.3 minutes on my machine. With "<... P ...>" it's almost 4 minutes.
> > Your python suggestion runs in about 1.5 minutes.
> >
> > Curiously, 1.0.4 runs the original patch in only 24 seconds, and the
> > angle-bracket one takes 52 seconds. I'm not sure if something changed in
> > coccinelle, or if my build is simply less optimized (my 1.0.4 is from
> > the Debian package, and I'm building 1.0.7 from source; ?
> 
> I guess that such run time comparisons are interesting for further software
> development considerations.
> 
> * How often would you run discussed SmPL scripts?

We run them as part of every automated CI build, and some people run
them manually periodically (I'd guess once every few days or so).

I don't think speed is critical for our use case. I mostly wanted to see
if the angle-bracket approach was intolerably slow (it's not, which
makes it an acceptable tradeoff against the need to have spatch built
with python support). And I found the speed difference between the two
versions mostly a curiosity.

-Peff

  parent reply	other threads:[~2018-08-25  8:22 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-08-24  6:42 [Cocci] excluding a function from coccinelle transformation Jeff King
2018-08-24 11:04 ` Julia Lawall
2018-08-24 20:53   ` Jeff King
2018-08-24 21:00     ` Julia Lawall
     [not found]     ` <20d4a3cf-d7b6-81e6-25b0-94535795242b@users.sourceforge.net>
2018-08-25  8:22       ` Jeff King [this message]
     [not found]         ` <20408ad4-672d-0b59-7f18-0c28bcf86adc@users.sourceforge.net>
2018-08-26  6:36           ` [Cocci] Excluding a function from Coccinelle transformation Jeff King

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=20180825082251.GA1672@sigill.intra.peff.net \
    --to=peff@peff.net \
    --cc=cocci@systeme.lip6.fr \
    /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).