qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] meson: Only generate trace files for selected targets
@ 2021-02-24 12:09 Philippe Mathieu-Daudé
  2021-02-24 12:26 ` Paolo Bonzini
  2021-02-24 13:11 ` Peter Maydell
  0 siblings, 2 replies; 6+ messages in thread
From: Philippe Mathieu-Daudé @ 2021-02-24 12:09 UTC (permalink / raw)
  To: qemu-devel
  Cc: qemu-trivial, Paolo Bonzini, Philippe Mathieu-Daudé,
	Stefan Hajnoczi

We don't need to generate trace files for targets we
are not building. Restrict the the ones selected.

Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
---
 meson.build | 10 +---------
 1 file changed, 1 insertion(+), 9 deletions(-)

diff --git a/meson.build b/meson.build
index 05a67c20d93..c9b0433667d 100644
--- a/meson.build
+++ b/meson.build
@@ -1826,15 +1826,6 @@
   trace_events_subdirs += [
     'accel/tcg',
     'hw/core',
-    'target/arm',
-    'target/hppa',
-    'target/i386',
-    'target/i386/kvm',
-    'target/mips',
-    'target/ppc',
-    'target/riscv',
-    'target/s390x',
-    'target/sparc',
   ]
 endif
 
@@ -2166,6 +2157,7 @@
   t = target_arch[arch].apply(config_target, strict: false)
   arch_srcs += t.sources()
   arch_deps += t.dependencies()
+  trace_events_subdirs += ['target' / arch]
 
   target_common = common_ss.apply(config_target, strict: false)
   objects = common_all.extract_objects(target_common.sources())
-- 
2.26.2



^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: [PATCH] meson: Only generate trace files for selected targets
  2021-02-24 12:09 [PATCH] meson: Only generate trace files for selected targets Philippe Mathieu-Daudé
@ 2021-02-24 12:26 ` Paolo Bonzini
  2021-02-24 12:51   ` Philippe Mathieu-Daudé
  2021-02-24 13:11 ` Peter Maydell
  1 sibling, 1 reply; 6+ messages in thread
From: Paolo Bonzini @ 2021-02-24 12:26 UTC (permalink / raw)
  To: Philippe Mathieu-Daudé, qemu-devel; +Cc: qemu-trivial, Stefan Hajnoczi

On 24/02/21 13:09, Philippe Mathieu-Daudé wrote:
> We don't need to generate trace files for targets we
> are not building. Restrict the the ones selected.
> 
> Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
> ---
>   meson.build | 10 +---------
>   1 file changed, 1 insertion(+), 9 deletions(-)
> 
> diff --git a/meson.build b/meson.build
> index 05a67c20d93..c9b0433667d 100644
> --- a/meson.build
> +++ b/meson.build
> @@ -1826,15 +1826,6 @@
>     trace_events_subdirs += [
>       'accel/tcg',
>       'hw/core',
> -    'target/arm',
> -    'target/hppa',
> -    'target/i386',
> -    'target/i386/kvm',
> -    'target/mips',
> -    'target/ppc',
> -    'target/riscv',
> -    'target/s390x',
> -    'target/sparc',
>     ]
>   endif
>   
> @@ -2166,6 +2157,7 @@
>     t = target_arch[arch].apply(config_target, strict: false)
>     arch_srcs += t.sources()
>     arch_deps += t.dependencies()
> +  trace_events_subdirs += ['target' / arch]
>   
>     target_common = common_ss.apply(config_target, strict: false)
>     objects = common_all.extract_objects(target_common.sources())
> 

Is this still okay if there is no trace-events file for a given arch?

Paolo



^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] meson: Only generate trace files for selected targets
  2021-02-24 12:26 ` Paolo Bonzini
@ 2021-02-24 12:51   ` Philippe Mathieu-Daudé
  2021-02-24 18:02     ` Philippe Mathieu-Daudé
  0 siblings, 1 reply; 6+ messages in thread
From: Philippe Mathieu-Daudé @ 2021-02-24 12:51 UTC (permalink / raw)
  To: Paolo Bonzini, qemu-devel; +Cc: qemu-trivial, Stefan Hajnoczi

On 2/24/21 1:26 PM, Paolo Bonzini wrote:
> On 24/02/21 13:09, Philippe Mathieu-Daudé wrote:
>> We don't need to generate trace files for targets we
>> are not building. Restrict the the ones selected.
>>
>> Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
>> ---
>>   meson.build | 10 +---------
>>   1 file changed, 1 insertion(+), 9 deletions(-)
>>
>> diff --git a/meson.build b/meson.build
>> index 05a67c20d93..c9b0433667d 100644
>> --- a/meson.build
>> +++ b/meson.build
>> @@ -1826,15 +1826,6 @@
>>     trace_events_subdirs += [
>>       'accel/tcg',
>>       'hw/core',
>> -    'target/arm',
>> -    'target/hppa',
>> -    'target/i386',
>> -    'target/i386/kvm',
>> -    'target/mips',
>> -    'target/ppc',
>> -    'target/riscv',
>> -    'target/s390x',
>> -    'target/sparc',
>>     ]
>>   endif
>>   @@ -2166,6 +2157,7 @@
>>     t = target_arch[arch].apply(config_target, strict: false)
>>     arch_srcs += t.sources()
>>     arch_deps += t.dependencies()
>> +  trace_events_subdirs += ['target' / arch]
>>       target_common = common_ss.apply(config_target, strict: false)
>>     objects = common_all.extract_objects(target_common.sources())
>>
> 
> Is this still okay if there is no trace-events file for a given arch?

No problem in my usual build configs, but I kicked a CI build to check
the all of them and be sure.



^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] meson: Only generate trace files for selected targets
  2021-02-24 12:09 [PATCH] meson: Only generate trace files for selected targets Philippe Mathieu-Daudé
  2021-02-24 12:26 ` Paolo Bonzini
@ 2021-02-24 13:11 ` Peter Maydell
  2021-02-24 13:30   ` Philippe Mathieu-Daudé
  1 sibling, 1 reply; 6+ messages in thread
From: Peter Maydell @ 2021-02-24 13:11 UTC (permalink / raw)
  To: Philippe Mathieu-Daudé
  Cc: QEMU Trivial, Paolo Bonzini, QEMU Developers, Stefan Hajnoczi

On Wed, 24 Feb 2021 at 12:11, Philippe Mathieu-Daudé <philmd@redhat.com> wrote:
>
> We don't need to generate trace files for targets we
> are not building. Restrict the the ones selected.
>
> Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
> ---
>  meson.build | 10 +---------
>  1 file changed, 1 insertion(+), 9 deletions(-)
>
> diff --git a/meson.build b/meson.build
> index 05a67c20d93..c9b0433667d 100644
> --- a/meson.build
> +++ b/meson.build
> @@ -1826,15 +1826,6 @@
>    trace_events_subdirs += [
>      'accel/tcg',
>      'hw/core',
> -    'target/arm',
> -    'target/hppa',
> -    'target/i386',
> -    'target/i386/kvm',
> -    'target/mips',
> -    'target/ppc',
> -    'target/riscv',
> -    'target/s390x',
> -    'target/sparc',
>    ]
>  endif
>
> @@ -2166,6 +2157,7 @@
>    t = target_arch[arch].apply(config_target, strict: false)
>    arch_srcs += t.sources()
>    arch_deps += t.dependencies()
> +  trace_events_subdirs += ['target' / arch]

This will catch all the 'target/foo' entries deleted above,
but what about 'target/i386/kvm' ?

thanks
-- PMM


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] meson: Only generate trace files for selected targets
  2021-02-24 13:11 ` Peter Maydell
@ 2021-02-24 13:30   ` Philippe Mathieu-Daudé
  0 siblings, 0 replies; 6+ messages in thread
From: Philippe Mathieu-Daudé @ 2021-02-24 13:30 UTC (permalink / raw)
  To: Peter Maydell
  Cc: QEMU Trivial, Paolo Bonzini, QEMU Developers, Stefan Hajnoczi

On 2/24/21 2:11 PM, Peter Maydell wrote:
> On Wed, 24 Feb 2021 at 12:11, Philippe Mathieu-Daudé <philmd@redhat.com> wrote:
>>
>> We don't need to generate trace files for targets we
>> are not building. Restrict the the ones selected.
>>
>> Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
>> ---
>>  meson.build | 10 +---------
>>  1 file changed, 1 insertion(+), 9 deletions(-)
>>
>> diff --git a/meson.build b/meson.build
>> index 05a67c20d93..c9b0433667d 100644
>> --- a/meson.build
>> +++ b/meson.build
>> @@ -1826,15 +1826,6 @@
>>    trace_events_subdirs += [
>>      'accel/tcg',
>>      'hw/core',
>> -    'target/arm',
>> -    'target/hppa',
>> -    'target/i386',
>> -    'target/i386/kvm',
>> -    'target/mips',
>> -    'target/ppc',
>> -    'target/riscv',
>> -    'target/s390x',
>> -    'target/sparc',
>>    ]
>>  endif
>>
>> @@ -2166,6 +2157,7 @@
>>    t = target_arch[arch].apply(config_target, strict: false)
>>    arch_srcs += t.sources()
>>    arch_deps += t.dependencies()
>> +  trace_events_subdirs += ['target' / arch]
> 
> This will catch all the 'target/foo' entries deleted above,
> but what about 'target/i386/kvm' ?

Yes, this doesn't work as expected... I just figured it was
working in my build directories because the trace header
previously generated are still present. I should have tested
in an empty directory before posting.

Regards,

Phil.



^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] meson: Only generate trace files for selected targets
  2021-02-24 12:51   ` Philippe Mathieu-Daudé
@ 2021-02-24 18:02     ` Philippe Mathieu-Daudé
  0 siblings, 0 replies; 6+ messages in thread
From: Philippe Mathieu-Daudé @ 2021-02-24 18:02 UTC (permalink / raw)
  To: Paolo Bonzini, qemu-devel; +Cc: qemu-trivial, Stefan Hajnoczi

On 2/24/21 1:51 PM, Philippe Mathieu-Daudé wrote:
> On 2/24/21 1:26 PM, Paolo Bonzini wrote:
>> On 24/02/21 13:09, Philippe Mathieu-Daudé wrote:
>>> We don't need to generate trace files for targets we
>>> are not building. Restrict the the ones selected.
>>>
>>> Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
>>> ---
>>>   meson.build | 10 +---------
>>>   1 file changed, 1 insertion(+), 9 deletions(-)
>>>
>>> diff --git a/meson.build b/meson.build
>>> index 05a67c20d93..c9b0433667d 100644
>>> --- a/meson.build
>>> +++ b/meson.build
>>> @@ -1826,15 +1826,6 @@
>>>     trace_events_subdirs += [
>>>       'accel/tcg',
>>>       'hw/core',
>>> -    'target/arm',
>>> -    'target/hppa',
>>> -    'target/i386',
>>> -    'target/i386/kvm',
>>> -    'target/mips',
>>> -    'target/ppc',
>>> -    'target/riscv',
>>> -    'target/s390x',
>>> -    'target/sparc',
>>>     ]
>>>   endif
>>>   @@ -2166,6 +2157,7 @@
>>>     t = target_arch[arch].apply(config_target, strict: false)
>>>     arch_srcs += t.sources()
>>>     arch_deps += t.dependencies()
>>> +  trace_events_subdirs += ['target' / arch]
>>>       target_common = common_ss.apply(config_target, strict: false)
>>>     objects = common_all.extract_objects(target_common.sources())
>>>
>>
>> Is this still okay if there is no trace-events file for a given arch?

No, it is *not* Okay :>

> 
> No problem in my usual build configs, but I kicked a CI build to check
> the all of them and be sure.



^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2021-02-24 18:04 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-02-24 12:09 [PATCH] meson: Only generate trace files for selected targets Philippe Mathieu-Daudé
2021-02-24 12:26 ` Paolo Bonzini
2021-02-24 12:51   ` Philippe Mathieu-Daudé
2021-02-24 18:02     ` Philippe Mathieu-Daudé
2021-02-24 13:11 ` Peter Maydell
2021-02-24 13:30   ` Philippe Mathieu-Daudé

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).