Message ID | 20220125215655.3111881-7-vsementsov@virtuozzo.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | trace qmp commands | expand |
On Tue, Jan 25, 2022 at 10:56:54PM +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 | 8 ++++++++ > tests/meson.build | 8 ++++++++ > 2 files changed, 16 insertions(+) > > diff --git a/qga/meson.build b/qga/meson.build > index cfb1fbc085..79fcf91751 100644 > --- a/qga/meson.build > +++ b/qga/meson.build > @@ -15,6 +15,14 @@ qga_qapi_outputs = [ > 'qga-qapi-visit.h', > ] > > +# We don't generate trace-events, just because it's not simple. For do it, s/For/To/ > +# we also should add .trace-events file into qga_qapi_outputs, and than s/than/then/ > +# add corresponding element of qga_qapi_files into qapi_trace_events > +# global list, which is processed than in trace/meson.build. s/processed than/then processed/ > +# This means, that we'll have to move subdir('qga') above subdir('trace') > +# in root meson.build. But that in turn will break the dependency of > +# qga on qemuutil (which depends on trace_ss). > +# So, resolving these dependencies and drop --no-trace-events is a TODO. > 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..21857d8b01 100644 > --- a/tests/meson.build > +++ b/tests/meson.build > @@ -31,6 +31,14 @@ test_qapi_outputs = [ > 'test-qapi-visit.h', > ] > > +# We don't generate trace-events, just because it's not simple. For do it, > +# we also should add .trace-events file into test_qapi_outputs, and than > +# add corresponding element of test_qapi_files into qapi_trace_events > +# global list, which is processed than in trace/meson.build. > +# This means, that we'll have to move subdir('tests') above subdir('trace') > +# in root meson.build. But that in turn will break the dependency of > +# tests on qemuutil (which depends on trace_ss). > +# So, resolving these dependencies and drop --no-trace-events is a TODO. Similar changes as those above. I can do it when merging the patches. > test_qapi_files = custom_target('Test QAPI files', > output: test_qapi_outputs, > input: files('qapi-schema/qapi-schema-test.json', > -- > 2.31.1 >
Come to think of it, this is more of a QAPI code generator series so Markus is probably the one merging, not me. Sorry for the confusion :). Markus: Please see the small fixups I've suggested. They could be applied when merging this series. Stefan
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 | 8 ++++++++ > tests/meson.build | 8 ++++++++ > 2 files changed, 16 insertions(+) > > diff --git a/qga/meson.build b/qga/meson.build > index cfb1fbc085..79fcf91751 100644 > --- a/qga/meson.build > +++ b/qga/meson.build > @@ -15,6 +15,14 @@ qga_qapi_outputs = [ > 'qga-qapi-visit.h', > ] > > +# We don't generate trace-events, just because it's not simple. For do it, > +# we also should add .trace-events file into qga_qapi_outputs, and than > +# add corresponding element of qga_qapi_files into qapi_trace_events > +# global list, which is processed than in trace/meson.build. > +# This means, that we'll have to move subdir('qga') above subdir('trace') > +# in root meson.build. But that in turn will break the dependency of > +# qga on qemuutil (which depends on trace_ss). > +# So, resolving these dependencies and drop --no-trace-events is a TODO. The option is still called --gen-trace at this point. Easy fix: squash into the next commit. Suggest # 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..21857d8b01 100644 > --- a/tests/meson.build > +++ b/tests/meson.build > @@ -31,6 +31,14 @@ test_qapi_outputs = [ > 'test-qapi-visit.h', > ] > > +# We don't generate trace-events, just because it's not simple. For do it, > +# we also should add .trace-events file into test_qapi_outputs, and than > +# add corresponding element of test_qapi_files into qapi_trace_events > +# global list, which is processed than in trace/meson.build. > +# This means, that we'll have to move subdir('tests') above subdir('trace') > +# in root meson.build. But that in turn will break the dependency of > +# tests on qemuutil (which depends on trace_ss). > +# So, resolving these dependencies and drop --no-trace-events is a TODO. > test_qapi_files = custom_target('Test QAPI files', > output: test_qapi_outputs, > input: files('qapi-schema/qapi-schema-test.json', Likewise.
diff --git a/qga/meson.build b/qga/meson.build index cfb1fbc085..79fcf91751 100644 --- a/qga/meson.build +++ b/qga/meson.build @@ -15,6 +15,14 @@ qga_qapi_outputs = [ 'qga-qapi-visit.h', ] +# We don't generate trace-events, just because it's not simple. For do it, +# we also should add .trace-events file into qga_qapi_outputs, and than +# add corresponding element of qga_qapi_files into qapi_trace_events +# global list, which is processed than in trace/meson.build. +# This means, that we'll have to move subdir('qga') above subdir('trace') +# in root meson.build. But that in turn will break the dependency of +# qga on qemuutil (which depends on trace_ss). +# So, resolving these dependencies and drop --no-trace-events is a TODO. 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..21857d8b01 100644 --- a/tests/meson.build +++ b/tests/meson.build @@ -31,6 +31,14 @@ test_qapi_outputs = [ 'test-qapi-visit.h', ] +# We don't generate trace-events, just because it's not simple. For do it, +# we also should add .trace-events file into test_qapi_outputs, and than +# add corresponding element of test_qapi_files into qapi_trace_events +# global list, which is processed than in trace/meson.build. +# This means, that we'll have to move subdir('tests') above subdir('trace') +# in root meson.build. But that in turn will break the dependency of +# tests on qemuutil (which depends on trace_ss). +# So, resolving these dependencies and drop --no-trace-events is a TODO. test_qapi_files = custom_target('Test QAPI files', output: test_qapi_outputs, input: files('qapi-schema/qapi-schema-test.json',
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 | 8 ++++++++ tests/meson.build | 8 ++++++++ 2 files changed, 16 insertions(+)