Skip to contentSkip to conversation

meson: Only generate trace files for selected targets

PATCH Superseded Philippe Mathieu-Daudé 3 participants 6 messages Feb 24, 2021 Arm/Amlogic Meson SoC support

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 meson: Only generate trace files for selected targets

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

---
 meson.build | 10 +---------
 1 file changed, 1 insertion(+), 9 deletions(-)
meson.build +1 -9
index 05a67c20d93..c9b0433667d 100644
@@ -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())
Signature · 1 line
2.26.2
#1 lore raw
Quoted 30 lines · Philippe Mathieu-Daudé

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

---
  meson.build | 10 +---------
  1 file changed, 1 insertion(+), 9 deletions(-)
meson.build +0 -9
index 05a67c20d93..c9b0433667d 100644
@@ -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
 

meson.build line 2163

Quoted 7 lines
meson.build +1 -0
@@ -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

#2 lore raw
Quoted 30 lines · Paolo Bonzini
Quoted 29 lines · Philippe Mathieu-Daudé

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

---
  meson.build | 10 +---------

  1 file changed, 1 insertion(+), 9 deletions(-)
meson.build +0 -0
index 05a67c20d93..c9b0433667d 100644
@@ -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)

Quoted 8 lines
Quoted 6 lines

    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.

#3 lore raw
Quoted 31 lines · Philippe Mathieu-Daudé
Quoted 30 lines · Paolo Bonzini
Quoted 29 lines · Philippe Mathieu-Daudé

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

---
  meson.build | 10 +---------

  1 file changed, 1 insertion(+), 9 deletions(-)
meson.build +0 -0
index 05a67c20d93..c9b0433667d 100644
@@ -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)

Quoted 8 lines
Quoted 8 lines
Quoted 6 lines

    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 :>

Quoted 3 lines

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

#4 lore raw
In reply to Philippe Mathieu-Daudé
Quoted 30 lines · Philippe Mathieu-Daudé

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

---
 meson.build | 10 +---------
 1 file changed, 1 insertion(+), 9 deletions(-)
meson.build +0 -9
index 05a67c20d93..c9b0433667d 100644
@@ -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
 

meson.build line 2160

Quoted 4 lines
meson.build +1 -0
@@ -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

#5 lore raw
Quoted 30 lines · Peter Maydell
Quoted 29 lines · Philippe Mathieu-Daudé

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

---
 meson.build | 10 +---------
 1 file changed, 1 insertion(+), 9 deletions(-)
meson.build +0 -9
index 05a67c20d93..c9b0433667d 100644
@@ -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
 
Quoted 8 lines

meson.build line 2160

Quoted 5 lines
meson.build +1 -0
@@ -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.