Re: [Cocci] Making conjunctions smaller

2016-06-10 Thread Julia Lawall
On Fri, 10 Jun 2016, Luis R. Rodriguez wrote: > On Fri, Jun 10, 2016 at 10:12 PM, Julia Lawall wrote: > > > > > > On Fri, 10 Jun 2016, Luis R. Rodriguez wrote: > > > >> I have a series of changes, and I want to only make a subsequent > >> change if and only if at least one of a series of previo

Re: [Cocci] Making conjunctions smaller

2016-06-10 Thread Luis R. Rodriguez
On Fri, Jun 10, 2016 at 10:12 PM, Julia Lawall wrote: > > > On Fri, 10 Jun 2016, Luis R. Rodriguez wrote: > >> I have a series of changes, and I want to only make a subsequent >> change if and only if at least one of a series of previous declared >> rules were matched. I can do this by depends on

Re: [Cocci] Making conjunctions smaller

2016-06-10 Thread SF Markus Elfring
> I can do this by depends on foo1 || foo2 || foo3|| foo4, > etc however since I have a lot of rules How many condition elements have you got in mind for your use case? Does the mentioned SmPL dependency specification become inconvenient (or challenging) occasionally? > I was hoping I could con

Re: [Cocci] [PATCH 4/4] coccicheck: add indexing enhancement options

2016-06-10 Thread Wolfram Sang
> works pretty well, and there are quite a lot of files (7514) that contain > kfree. Ah, kfree. That explains, I missed that info. signature.asc Description: PGP signature ___ Cocci mailing list Cocci@systeme.lip6.fr https://systeme.lip6.fr/mailman/

Re: [Cocci] [PATCH 4/4] coccicheck: add indexing enhancement options

2016-06-10 Thread Julia Lawall
On Sat, 11 Jun 2016, Wolfram Sang wrote: > > > It's not as efficient as glimpse because the query language is simpler. > > Interesting, what is missing compared to glimpse? Glimpse allows queries that are arbitrary formulas, up to a limited level of complexity, involving both && and ||. F

Re: [Cocci] [PATCH 4/4] coccicheck: add indexing enhancement options

2016-06-10 Thread Wolfram Sang
> It's not as efficient as glimpse because the query language is simpler. Interesting, what is missing compared to glimpse? > So more filtering has to be done at the ocaml level. But it's probably > fine in most cases. For me, it has two advantages over glimpse: a) it is in the debian pack

Re: [Cocci] [PATCH 4/4] coccicheck: add indexing enhancement options

2016-06-10 Thread SF Markus Elfring
> in practice though this seems to not perform better than > regular grep however its expected to help with some use cases > so we use that if you have no other indexing options in place > available. Would you like to fix a typo in this paragraph? Regards, Markus _

Re: [Cocci] [PATCH 2/4] coccicheck: enable paramap support

2016-06-10 Thread Julia Lawall
On Sat, 11 Jun 2016, SF Markus Elfring wrote: > > Also enable the load balancing to be dynamic, so that > > if a thread finishes early we keep feeding it. > > Is this functionality influenced by the parameter "chunksize"? Yes, without chunksize the distribution of work to processes is static.

Re: [Cocci] [PATCH 4/4] coccicheck: add indexing enhancement options

2016-06-10 Thread Julia Lawall
On Sat, 11 Jun 2016, Wolfram Sang wrote: > > > real16m11.692s > > user127m50.388s > > sys 0m2.168s > > That's better but not a magnitude, I wonder. I think that it is because the filtering that Coccinelle does already works pretty well, and there are quite a lot of files (7514) t

Re: [Cocci] [PATCH 4/4] coccicheck: add indexing enhancement options

2016-06-10 Thread Wolfram Sang
> real16m11.692s > user127m50.388s > sys 0m2.168s That's better but not a magnitude, I wonder. signature.asc Description: PGP signature ___ Cocci mailing list Cocci@systeme.lip6.fr https://systeme.lip6.fr/mailman/listinfo/cocci

Re: [Cocci] [PATCH 2/4] coccicheck: enable paramap support

2016-06-10 Thread SF Markus Elfring
> Also enable the load balancing to be dynamic, so that > if a thread finishes early we keep feeding it. Is this functionality influenced by the parameter "chunksize"? Regards, Markus ___ Cocci mailing list Cocci@systeme.lip6.fr https://systeme.lip6.fr/

Re: [Cocci] [PATCH 0/4] scripts/coccicheck: add paramap and indexing options

2016-06-10 Thread SF Markus Elfring
> we should be able to also take advantage of with coccicheck, > the most important one is paramap support. Do OCaml developers prefer to refer to the software "Parmap" here? https://rdicosmo.github.io/parmap/ Regards, Markus ___ Cocci mailing list Cocc

Re: [Cocci] [PATCH 4/4] coccicheck: add indexing enhancement options

2016-06-10 Thread Julia Lawall
On Fri, 10 Jun 2016, Wolfram Sang wrote: > > AFAICT coccinelle does not have integration support for id-utils though. > > I used it just today ;) -- "--use-idutils ./ID" > > ID was generated with simple 'mkid -s'. Coccinelle includes a script scripts/idutils_index.sh This does mkid -i C --ou

Re: [Cocci] [PATCH 4/4] coccicheck: add indexing enhancement options

2016-06-10 Thread Julia Lawall
On Sat, 11 Jun 2016, Luis R. Rodriguez wrote: > On Fri, Jun 10, 2016 at 11:51:26PM +0200, Wolfram Sang wrote: > > > AFAICT coccinelle does not have integration support for id-utils though. > > > > I used it just today ;) -- "--use-idutils ./ID" > > > > ID was generated with simple 'mkid -s'. >

Re: [Cocci] [PATCH 4/4] coccicheck: add indexing enhancement options

2016-06-10 Thread Julia Lawall
On Fri, 10 Jun 2016, Luis R. Rodriguez wrote: > On Fri, Jun 10, 2016 at 11:43:57PM +0200, Wolfram Sang wrote: > > > > Well, slightly better. > > > > > > No, it should be much better. You would have to look at the standard > > > > I use id-utils regularly and it is indeed at least a magnitude

Re: [Cocci] Making conjunctions smaller

2016-06-10 Thread Julia Lawall
On Fri, 10 Jun 2016, Luis R. Rodriguez wrote: > I have a series of changes, and I want to only make a subsequent > change if and only if at least one of a series of previous declared > rules were matched. I can do this by depends on foo1 || foo2 || foo3 > || foo4, etc however since I have a lot

[Cocci] Making conjunctions smaller

2016-06-10 Thread Luis R. Rodriguez
I have a series of changes, and I want to only make a subsequent change if and only if at least one of a series of previous declared rules were matched. I can do this by depends on foo1 || foo2 || foo3 || foo4, etc however since I have a lot of rules I was hoping I could condense these into one. Wh

Re: [Cocci] [PATCH 4/4] coccicheck: add indexing enhancement options

2016-06-10 Thread Luis R. Rodriguez
On Sat, Jun 11, 2016 at 12:08:32AM +0200, Luis R. Rodriguez wrote: > On Fri, Jun 10, 2016 at 11:51:26PM +0200, Wolfram Sang wrote: > > > AFAICT coccinelle does not have integration support for id-utils though. > > > > I used it just today ;) -- "--use-idutils ./ID" > > > > ID was generated with s

Re: [Cocci] [PATCH 4/4] coccicheck: add indexing enhancement options

2016-06-10 Thread Luis R. Rodriguez
On Fri, Jun 10, 2016 at 11:51:26PM +0200, Wolfram Sang wrote: > > AFAICT coccinelle does not have integration support for id-utils though. > > I used it just today ;) -- "--use-idutils ./ID" > > ID was generated with simple 'mkid -s'. > Sweet, testing that now. Luis _

Re: [Cocci] [PATCH 4/4] coccicheck: add indexing enhancement options

2016-06-10 Thread Wolfram Sang
> AFAICT coccinelle does not have integration support for id-utils though. I used it just today ;) -- "--use-idutils ./ID" ID was generated with simple 'mkid -s'. signature.asc Description: PGP signature ___ Cocci mailing list Cocci@systeme.lip6.fr h

Re: [Cocci] [PATCH 4/4] coccicheck: add indexing enhancement options

2016-06-10 Thread Luis R. Rodriguez
On Fri, Jun 10, 2016 at 11:43:57PM +0200, Wolfram Sang wrote: > > > Well, slightly better. > > > > No, it should be much better. You would have to look at the standard > > I use id-utils regularly and it is indeed at least a magnitude better. > The indexing often pays off already with the first

Re: [Cocci] [PATCH 4/4] coccicheck: add indexing enhancement options

2016-06-10 Thread Wolfram Sang
> > Well, slightly better. > > No, it should be much better. You would have to look at the standard I use id-utils regularly and it is indeed at least a magnitude better. The indexing often pays off already with the first coccinelle run for me. Highly recommended. signature.asc Description:

Re: [Cocci] [PATCH 4/4] coccicheck: add indexing enhancement options

2016-06-10 Thread Julia Lawall
On Fri, 10 Jun 2016, Luis R. Rodriguez wrote: > On Fri, Jun 10, 2016 at 11:02:38PM +0200, Julia Lawall wrote: > > > > > > On Fri, 10 Jun 2016, Luis R. Rodriguez wrote: > > > > > Enable indexing optimizations heuristics. Coccinelle has > > > support to make use of its own enhanced "grep" mecha

Re: [Cocci] [PATCH 4/4] coccicheck: add indexing enhancement options

2016-06-10 Thread Luis R. Rodriguez
On Fri, Jun 10, 2016 at 11:02:38PM +0200, Julia Lawall wrote: > > > On Fri, 10 Jun 2016, Luis R. Rodriguez wrote: > > > Enable indexing optimizations heuristics. Coccinelle has > > support to make use of its own enhanced "grep" mechanisms > > instead of using regular grep for searching code 'coc

Re: [Cocci] [PATCH 4/4] coccicheck: add indexing enhancement options

2016-06-10 Thread Julia Lawall
On Fri, 10 Jun 2016, Luis R. Rodriguez wrote: > Enable indexing optimizations heuristics. Coccinelle has > support to make use of its own enhanced "grep" mechanisms > instead of using regular grep for searching code 'coccigrep', > in practice though this seems to not perform better than > regula

[Cocci] [PATCH 1/4] coccicheck: move spatch binary check up

2016-06-10 Thread Luis R. Rodriguez
This has no functional changes. This is being done to enable us to later use spatch binary for some flag checking for certain features early on. Signed-off-by: Luis R. Rodriguez --- scripts/coccicheck | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/scripts/cocciche

[Cocci] [PATCH 3/4] scripts: add glimpse.sh for indexing the kernel

2016-06-10 Thread Luis R. Rodriguez
Glimpse is a tool you can use to index the kernel. The tool was recently open sourced under the ISC license and can be obtained at: https://github.com/mcgrof/glimpse.git Signed-off-by: Luis R. Rodriguez --- scripts/glimpse.sh | 12 1 file changed, 12 insertions(+) create mode 1007

[Cocci] [PATCH 0/4] scripts/coccicheck: add paramap and indexing options

2016-06-10 Thread Luis R. Rodriguez
coccicheck hasn't been updated for a while. The backports project has been using some features for a while now that we should be able to also take advantage of with coccicheck, the most important one is paramap support. glimpseindex stuff wasn't even building but today I decided to go tackle and f

[Cocci] [PATCH 2/4] coccicheck: enable paramap support

2016-06-10 Thread Luis R. Rodriguez
Coccinelle has had paramap support since 1.0.2, this means it supports --jobs, enabling built-in multithreaded functionality, instead of needing one to script it out. Just look for --jobs in the help output to determine if this is supported. Also enable the load balancing to be dynamic, so that if

[Cocci] [PATCH 4/4] coccicheck: add indexing enhancement options

2016-06-10 Thread Luis R. Rodriguez
Enable indexing optimizations heuristics. Coccinelle has support to make use of its own enhanced "grep" mechanisms instead of using regular grep for searching code 'coccigrep', in practice though this seems to not perform better than regular grep however its expected to help with some use cases so