Skip to contentSkip to conversation

Sharing data processing resources for selected SmPL scripts?

RFC Markus Elfring 2 participants 3 messages Sep 5, 2025 Kernel janitors

lore
Share & tools
lore
#0 lore raw

Hello,

I became curious if further developers would like to try the following script out for the semantic patch language.

@display@
identifier action;
type t;
@@
*t * action(...)
{
... when any
}

I interpret such a search approach in the way that it should extract some data from a lot of source code places.
Thus I imagine that it results also in special software run time characteristics which matter especially for big codebases like Linux.

How do you think about to clarify corresponding data collections and computation resources?

Related source code analysis concerns can eventually be also clarified.

* Handling of function declarations in header files

* Relevance of some preprocessor directives

Regards,
Markus

#1 lore raw
Quoted 6 lines · Markus Elfring

Hello,

I became curious if further developers would like to try the following script out for the semantic patch language.

Quoted 7 lines

@display@
identifier action;
type t;
@@
*t * action(...)
{
... when any

when any is not useful here.

Quoted 7 lines

}

I interpret such a search approach in the way that it should extract some data from a lot of source code places.
Thus I imagine that it results also in special software run time characteristics which matter especially for big codebases like Linux.

I guess it would be quite fast, because it will just find the deader of each function.

julia

Quoted 13 lines

How do you think about to clarify corresponding data collections and computation resources?

Related source code analysis concerns can eventually be also clarified.

* Handling of function declarations in header files

* Relevance of some preprocessor directives

Regards,
Markus

#2 lore raw
Quoted 7 lines
Quoted 7 lines

@display@
identifier action;
type t;
@@
*t * action(...)
{
... when any

…>> }

Quoted 8 lines
Quoted 6 lines

I interpret such a search approach in the way that it should extract some data from a lot of source code places.
Thus I imagine that it results also in special software run time characteristics which matter especially for big codebases like Linux.

I guess it would be quite fast,

I am curious how such development views will evolve further (depending on the data processing environment you may use).

Quoted 2 lines

because it will just find the deader of
each function.

Header information should be found for several function implementations from selected directories.
If you would dare to try the shown SmPL script out on the complete Linux codebase, a huge diff output will probably be generated.
It might be more helpful to try it out on a few header/source files with a more reasonable size.

Other data structures might become also more attractive for the storage and documentation of found pointer types in combination with known functions.

Regards,
Markus