Skip to contentSkip to conversation

Makefile: Keep trace-events-subdirs ordered

PATCH Superseded Philippe Mathieu-Daudé 2 participants 3 messages Jan 16, 2020 Kbuild

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Makefile: Keep trace-events-subdirs ordered

To ease review and reduce likelihood of merge failures (see [*]), keep trace-events-subdirs ordered when possible, following eb7ccb3c0.

[*] https://www.mail-archive.com/[email protected]/msg671007.html
Duplicate trace-events-subdirs entries generates duplicated symbols when using the LTTng Userspace Tracer library.

---
"Fixes: 26b8e6dc & 8d5d515a0"

To be even safer we should use $(sort $(trace-events-subdirs))

---
 Makefile.objs | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
Makefile.objs +2 -2
index 7c1e50f9d6..d62f908965 100644
@@ -142,8 +142,8 @@ trace-events-subdirs += nbd
 trace-events-subdirs += scsi
 endif
 ifeq ($(CONFIG_SOFTMMU),y)
-trace-events-subdirs += chardev
 trace-events-subdirs += audio
+trace-events-subdirs += chardev
 trace-events-subdirs += hw/9pfs
 trace-events-subdirs += hw/acpi
 trace-events-subdirs += hw/alpha
@@ -191,6 +191,7 @@ trace-events-subdirs += migration
 trace-events-subdirs += net
 trace-events-subdirs += ui
 endif
+trace-events-subdirs += hw/core
 trace-events-subdirs += hw/display
 trace-events-subdirs += qapi
 trace-events-subdirs += qom
@@ -203,7 +204,6 @@ trace-events-subdirs += target/riscv
 trace-events-subdirs += target/s390x
 trace-events-subdirs += target/sparc
 trace-events-subdirs += util
-trace-events-subdirs += hw/core
 
 trace-events-files = $(SRC_PATH)/trace-events $(trace-events-subdirs:%=$(SRC_PATH)/%/trace-events)
 
Signature · 1 line
2.21.1
Reviewed-by on v1 1/1
#1 lore raw
Quoted 40 lines · Philippe Mathieu-Daudé

To ease review and reduce likelihood of merge failures (see [*]), keep trace-events-subdirs ordered when possible, following eb7ccb3c0.

[*] https://www.mail-archive.com/[email protected]/msg671007.html
Duplicate trace-events-subdirs entries generates duplicated symbols when using the LTTng Userspace Tracer library.

---
"Fixes: 26b8e6dc & 8d5d515a0"

To be even safer we should use $(sort $(trace-events-subdirs))

---
 Makefile.objs | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
Makefile.objs +2 -1
index 7c1e50f9d6..d62f908965 100644
@@ -142,8 +142,8 @@ trace-events-subdirs += nbd
 trace-events-subdirs += scsi
 endif
 ifeq ($(CONFIG_SOFTMMU),y)
-trace-events-subdirs += chardev
 trace-events-subdirs += audio
+trace-events-subdirs += chardev
 trace-events-subdirs += hw/9pfs
 trace-events-subdirs += hw/acpi
 trace-events-subdirs += hw/alpha
@@ -191,6 +191,7 @@ trace-events-subdirs += migration
 trace-events-subdirs += net
 trace-events-subdirs += ui
 endif
+trace-events-subdirs += hw/core
 trace-events-subdirs += hw/display
 trace-events-subdirs += qapi
 trace-events-subdirs += qom

Makefile.objs trace-events-subdirs += target/riscv · line 209

Quoted 7 lines
Makefile.objs +0 -1
@@ -203,7 +204,6 @@ trace-events-subdirs += target/riscv
 trace-events-subdirs += target/s390x
 trace-events-subdirs += target/sparc
 trace-events-subdirs += util
-trace-events-subdirs += hw/core
 
 trace-events-files = $(SRC_PATH)/trace-events $(trace-events-subdirs:%=$(SRC_PATH)/%/trace-events)
 
#2 lore raw
In reply to Philippe Mathieu-Daudé
Quoted 6 lines · Philippe Mathieu-Daudé

To ease review and reduce likelihood of merge failures (see [*]), keep trace-events-subdirs ordered when possible, following eb7ccb3c0.

[*] https://www.mail-archive.com/[email protected]/msg671007.html
Duplicate trace-events-subdirs entries generates duplicated symbols when using the LTTng Userspace Tracer library.

If it seems useful/relevant we can add to this description UST backend config and the error when using duplicate entries:

  $ ./configure --enable-trace-backends=ust && make
  [...]
    CC      trace-ust-all.o
  In file included from trace-ust-all.h:13,
                   from trace-ust-all.c:13:
  trace-ust-all.h:35151:1: error: redefinition of 
‘__tracepoint_cb_qemu___loader_write_rom’
  35151 | TRACEPOINT_EVENT(
        | ^~~~~~~~~~~~~~~~
  trace-ust-all.h:31791:1: note: previous definition of 
‘__tracepoint_cb_qemu___loader_write_rom’ was here
  31791 | TRACEPOINT_EVENT(
        | ^~~~~~~~~~~~~~~~
Quoted 41 lines

---
"Fixes: 26b8e6dc & 8d5d515a0"

To be even safer we should use $(sort $(trace-events-subdirs))

---
  Makefile.objs | 4 ++--
  1 file changed, 2 insertions(+), 2 deletions(-)
Makefile.objs +2 -2
index 7c1e50f9d6..d62f908965 100644
@@ -142,8 +142,8 @@ trace-events-subdirs += nbd
  trace-events-subdirs += scsi
  endif
  ifeq ($(CONFIG_SOFTMMU),y)
-trace-events-subdirs += chardev
  trace-events-subdirs += audio
+trace-events-subdirs += chardev
  trace-events-subdirs += hw/9pfs
  trace-events-subdirs += hw/acpi
  trace-events-subdirs += hw/alpha
@@ -191,6 +191,7 @@ trace-events-subdirs += migration
  trace-events-subdirs += net
  trace-events-subdirs += ui
  endif
+trace-events-subdirs += hw/core
  trace-events-subdirs += hw/display
  trace-events-subdirs += qapi
  trace-events-subdirs += qom
@@ -203,7 +204,6 @@ trace-events-subdirs += target/riscv
  trace-events-subdirs += target/s390x
  trace-events-subdirs += target/sparc
  trace-events-subdirs += util
-trace-events-subdirs += hw/core
 
  trace-events-files = $(SRC_PATH)/trace-events $(trace-events-subdirs:%=$(SRC_PATH)/%/trace-events)