diff mbox series

[v6,6/7] meson: document, why we don't generate trace events for tests/ and qga/

Message ID 20220126161130.3240892-7-vsementsov@virtuozzo.com (mailing list archive)
State New, archived
Headers show
Series trace qmp commands | expand

Commit Message

Vladimir Sementsov-Ogievskiy Jan. 26, 2022, 4:11 p.m. UTC
Making trace generation work for tests/ and qga/ would involve some
Meson hackery to ensure we generate the trace-events files before
trace-tool uses them. Since we don't actually support tracing there
anyway, we bypass that problem.

Let's add corresponding comments.

Signed-off-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
---
 qga/meson.build   | 7 +++++++
 tests/meson.build | 7 +++++++
 2 files changed, 14 insertions(+)

Comments

Markus Armbruster Jan. 27, 2022, 6:50 a.m. UTC | #1
Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com> writes:

> Making trace generation work for tests/ and qga/ would involve some
> Meson hackery to ensure we generate the trace-events files before
> trace-tool uses them. Since we don't actually support tracing there
> anyway, we bypass that problem.
>
> Let's add corresponding comments.
>
> Signed-off-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
> ---
>  qga/meson.build   | 7 +++++++
>  tests/meson.build | 7 +++++++
>  2 files changed, 14 insertions(+)
>
> diff --git a/qga/meson.build b/qga/meson.build
> index cfb1fbc085..724d5a667b 100644
> --- a/qga/meson.build
> +++ b/qga/meson.build
> @@ -15,6 +15,13 @@ qga_qapi_outputs = [
>    'qga-qapi-visit.h',
>  ]
>  
> +# Problem: to generate trace events, we'd have to add the .trace-events
> +# file to qapi_trace_events like we do in qapi/meson.build.  Since
> +# qapi_trace_events is used by trace/meson.build, we'd have to move
> +# subdir('qga') above subdir('trace') in the top-level meson.build.
> +# Can't, because it would break the dependency of qga on qemuutil (which
> +# depends on trace_ss).  Not worth solving now; simply suppress trace
> +# event generation instead.
>  qga_qapi_files = custom_target('QGA QAPI files',
>                                 output: qga_qapi_outputs,
>                                 input: 'qapi-schema.json',
> diff --git a/tests/meson.build b/tests/meson.build
> index 3f3882748a..af8f5b1746 100644
> --- a/tests/meson.build
> +++ b/tests/meson.build
> @@ -31,6 +31,13 @@ test_qapi_outputs = [
>    'test-qapi-visit.h',
>  ]
>  
> +# Problem: to generate trace events, we'd have to add the .trace-events
> +# file to qapi_trace_events like we do in qapi/meson.build.  Since
> +# qapi_trace_events is used by trace/meson.build, we'd have to move
> +# subdir('qga') above subdir('trace') in the top-level meson.build.

Shouldn't this be subdir('tests')?

> +# Can't, because it would break the dependency of qga on qemuutil (which
> +# depends on trace_ss).  Not worth solving now; simply suppress trace
> +# event generation instead.
>  test_qapi_files = custom_target('Test QAPI files',
>                                  output: test_qapi_outputs,
>                                  input: files('qapi-schema/qapi-schema-test.json',
Markus Armbruster Jan. 27, 2022, 6:51 a.m. UTC | #2
Nitpick: drop the comma in the title.
Stefan Hajnoczi Jan. 27, 2022, 8:21 a.m. UTC | #3
On Wed, Jan 26, 2022 at 05:11:29PM +0100, Vladimir Sementsov-Ogievskiy wrote:
> Making trace generation work for tests/ and qga/ would involve some
> Meson hackery to ensure we generate the trace-events files before
> trace-tool uses them. Since we don't actually support tracing there
> anyway, we bypass that problem.
> 
> Let's add corresponding comments.
> 
> Signed-off-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
> ---
>  qga/meson.build   | 7 +++++++
>  tests/meson.build | 7 +++++++
>  2 files changed, 14 insertions(+)

Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
Vladimir Sementsov-Ogievskiy Jan. 27, 2022, 9:26 a.m. UTC | #4
27.01.2022 09:50, Markus Armbruster wrote:
> Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com> writes:
> 
>> Making trace generation work for tests/ and qga/ would involve some
>> Meson hackery to ensure we generate the trace-events files before
>> trace-tool uses them. Since we don't actually support tracing there
>> anyway, we bypass that problem.
>>
>> Let's add corresponding comments.
>>
>> Signed-off-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
>> ---
>>   qga/meson.build   | 7 +++++++
>>   tests/meson.build | 7 +++++++
>>   2 files changed, 14 insertions(+)
>>
>> diff --git a/qga/meson.build b/qga/meson.build
>> index cfb1fbc085..724d5a667b 100644
>> --- a/qga/meson.build
>> +++ b/qga/meson.build
>> @@ -15,6 +15,13 @@ qga_qapi_outputs = [
>>     'qga-qapi-visit.h',
>>   ]
>>   
>> +# Problem: to generate trace events, we'd have to add the .trace-events
>> +# file to qapi_trace_events like we do in qapi/meson.build.  Since
>> +# qapi_trace_events is used by trace/meson.build, we'd have to move
>> +# subdir('qga') above subdir('trace') in the top-level meson.build.
>> +# Can't, because it would break the dependency of qga on qemuutil (which
>> +# depends on trace_ss).  Not worth solving now; simply suppress trace
>> +# event generation instead.
>>   qga_qapi_files = custom_target('QGA QAPI files',
>>                                  output: qga_qapi_outputs,
>>                                  input: 'qapi-schema.json',
>> diff --git a/tests/meson.build b/tests/meson.build
>> index 3f3882748a..af8f5b1746 100644
>> --- a/tests/meson.build
>> +++ b/tests/meson.build
>> @@ -31,6 +31,13 @@ test_qapi_outputs = [
>>     'test-qapi-visit.h',
>>   ]
>>   
>> +# Problem: to generate trace events, we'd have to add the .trace-events
>> +# file to qapi_trace_events like we do in qapi/meson.build.  Since
>> +# qapi_trace_events is used by trace/meson.build, we'd have to move
>> +# subdir('qga') above subdir('trace') in the top-level meson.build.
> 
> Shouldn't this be subdir('tests')?

Oops right.

> 
>> +# Can't, because it would break the dependency of qga on qemuutil (which
>> +# depends on trace_ss).  Not worth solving now; simply suppress trace
>> +# event generation instead.
>>   test_qapi_files = custom_target('Test QAPI files',
>>                                   output: test_qapi_outputs,
>>                                   input: files('qapi-schema/qapi-schema-test.json',
>
diff mbox series

Patch

diff --git a/qga/meson.build b/qga/meson.build
index cfb1fbc085..724d5a667b 100644
--- a/qga/meson.build
+++ b/qga/meson.build
@@ -15,6 +15,13 @@  qga_qapi_outputs = [
   'qga-qapi-visit.h',
 ]
 
+# Problem: to generate trace events, we'd have to add the .trace-events
+# file to qapi_trace_events like we do in qapi/meson.build.  Since
+# qapi_trace_events is used by trace/meson.build, we'd have to move
+# subdir('qga') above subdir('trace') in the top-level meson.build.
+# Can't, because it would break the dependency of qga on qemuutil (which
+# depends on trace_ss).  Not worth solving now; simply suppress trace
+# event generation instead.
 qga_qapi_files = custom_target('QGA QAPI files',
                                output: qga_qapi_outputs,
                                input: 'qapi-schema.json',
diff --git a/tests/meson.build b/tests/meson.build
index 3f3882748a..af8f5b1746 100644
--- a/tests/meson.build
+++ b/tests/meson.build
@@ -31,6 +31,13 @@  test_qapi_outputs = [
   'test-qapi-visit.h',
 ]
 
+# Problem: to generate trace events, we'd have to add the .trace-events
+# file to qapi_trace_events like we do in qapi/meson.build.  Since
+# qapi_trace_events is used by trace/meson.build, we'd have to move
+# subdir('qga') above subdir('trace') in the top-level meson.build.
+# Can't, because it would break the dependency of qga on qemuutil (which
+# depends on trace_ss).  Not worth solving now; simply suppress trace
+# event generation instead.
 test_qapi_files = custom_target('Test QAPI files',
                                 output: test_qapi_outputs,
                                 input: files('qapi-schema/qapi-schema-test.json',