[PATCH v3 0/3] plugins: generate list of symbols automatically

Pierrick Bouvier posted 3 patches 2 weeks, 3 days ago
There is a newer version of this series
MAINTAINERS                    |  1 +
include/qemu/qemu-plugin.h     |  1 +
plugins/meson.build            | 12 +++++--
plugins/qemu-plugins.symbols   | 59 ----------------------------------
scripts/qemu-plugin-symbols.py | 45 ++++++++++++++++++++++++++
5 files changed, 56 insertions(+), 62 deletions(-)
delete mode 100644 plugins/qemu-plugins.symbols
create mode 100755 scripts/qemu-plugin-symbols.py
[PATCH v3 0/3] plugins: generate list of symbols automatically
Posted by Pierrick Bouvier 2 weeks, 3 days ago
Now that meson build for plugins was merged, we can cleanup another part with
the symbols file.
It has to be kept in sync between the header (qemu-plugin.h) and the symbols
file. This has proved to be error prone and tedious.

We solve this by generating this list from header directly using a python
script. Dependencies are triggered correctly, and the file is regenerated if the
header is modified, as expected.

Pierrick Bouvier (3):
  plugins: add missing export for qemu_plugin_num_vcpus
  plugins: detect qemu plugin API symbols from header
  plugins: eradicate qemu-plugins.symbols static file

 MAINTAINERS                    |  1 +
 include/qemu/qemu-plugin.h     |  1 +
 plugins/meson.build            | 12 +++++--
 plugins/qemu-plugins.symbols   | 59 ----------------------------------
 scripts/qemu-plugin-symbols.py | 45 ++++++++++++++++++++++++++
 5 files changed, 56 insertions(+), 62 deletions(-)
 delete mode 100644 plugins/qemu-plugins.symbols
 create mode 100755 scripts/qemu-plugin-symbols.py

-- 
2.39.5
Re: [PATCH v3 0/3] plugins: generate list of symbols automatically
Posted by Alex Bennée 1 week, 3 days ago
Pierrick Bouvier <pierrick.bouvier@linaro.org> writes:

> Now that meson build for plugins was merged, we can cleanup another part with
> the symbols file.
> It has to be kept in sync between the header (qemu-plugin.h) and the symbols
> file. This has proved to be error prone and tedious.
>
> We solve this by generating this list from header directly using a python
> script. Dependencies are triggered correctly, and the file is regenerated if the
> header is modified, as expected.
>
> Pierrick Bouvier (3):
>   plugins: add missing export for qemu_plugin_num_vcpus
>   plugins: detect qemu plugin API symbols from header
>   plugins: eradicate qemu-plugins.symbols static file
>
>  MAINTAINERS                    |  1 +
>  include/qemu/qemu-plugin.h     |  1 +
>  plugins/meson.build            | 12 +++++--

this failed to apply cleanly. 

>  plugins/qemu-plugins.symbols   | 59 ----------------------------------
>  scripts/qemu-plugin-symbols.py | 45 ++++++++++++++++++++++++++
>  5 files changed, 56 insertions(+), 62 deletions(-)
>  delete mode 100644 plugins/qemu-plugins.symbols
>  create mode 100755 scripts/qemu-plugin-symbols.py

-- 
Alex Bennée
Virtualisation Tech Lead @ Linaro
Re: [PATCH v3 0/3] plugins: generate list of symbols automatically
Posted by Pierrick Bouvier 1 week, 3 days ago
On 11/12/24 13:08, Alex Bennée wrote:
> Pierrick Bouvier <pierrick.bouvier@linaro.org> writes:
> 
>> Now that meson build for plugins was merged, we can cleanup another part with
>> the symbols file.
>> It has to be kept in sync between the header (qemu-plugin.h) and the symbols
>> file. This has proved to be error prone and tedious.
>>
>> We solve this by generating this list from header directly using a python
>> script. Dependencies are triggered correctly, and the file is regenerated if the
>> header is modified, as expected.
>>
>> Pierrick Bouvier (3):
>>    plugins: add missing export for qemu_plugin_num_vcpus
>>    plugins: detect qemu plugin API symbols from header
>>    plugins: eradicate qemu-plugins.symbols static file
>>
>>   MAINTAINERS                    |  1 +
>>   include/qemu/qemu-plugin.h     |  1 +
>>   plugins/meson.build            | 12 +++++--
> 
> this failed to apply cleanly.

Sorry about that. The commit is correct but the patch context is 
incorrect. Fixed in v4.

> 
>>   plugins/qemu-plugins.symbols   | 59 ----------------------------------
>>   scripts/qemu-plugin-symbols.py | 45 ++++++++++++++++++++++++++
>>   5 files changed, 56 insertions(+), 62 deletions(-)
>>   delete mode 100644 plugins/qemu-plugins.symbols
>>   create mode 100755 scripts/qemu-plugin-symbols.py
>