[Cocci] Excluding a function from Coccinelle transformation
peff at peff.net
Sat Aug 25 10:22:51 CEST 2018
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.
More information about the Cocci