qemu-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-commits] [qemu/qemu] ba78db: make: move top level dir to end of in


From: GitHub
Subject: [Qemu-commits] [qemu/qemu] ba78db: make: move top level dir to end of include search ...
Date: Thu, 02 Feb 2017 10:30:04 -0800

  Branch: refs/heads/master
  Home:   https://github.com/qemu/qemu
  Commit: ba78db44f6532d66a1e704bd44613e841baa2fc5
      
https://github.com/qemu/qemu/commit/ba78db44f6532d66a1e704bd44613e841baa2fc5
  Author: Daniel P. Berrange <address@hidden>
  Date:   2017-01-31 (Tue, 31 Jan 2017)

  Changed paths:
    M rules.mak

  Log Message:
  -----------
  make: move top level dir to end of include search path

Currently the search path is

  1. source dir corresponding to input file (implicit by compiler)
  2. top level build dir
  3. top level source dir
  4. top level source include/ dir
  5. source dir corresponding to input file
  6. build dir corresponding to output file

Search item 5 is an effective no-op, since it duplicates item 1.
When srcdir == builddir, item 6 also duplicates item 1, which
causes a semantic difference between VPATH and non-VPATH builds.

Thus to ensure consistent semantics we need item 6 to be present
immediately after item 1. e.g.

  1. source dir corresponding to input file (implicit by compiler)
  2. build dir corresponding to output file
  3. top level build dir
  4. top level source dir
  5. top level source include/ dir

When srcdir == builddir, items 1 & 2 collapse into one, and items
3 & 4 collapse into one, but the overall search order is still
consistent with srcdir != builddir

A further complication is that while most of the source files
are built with a current directory of $BUILD_DIR, target dependant
files are built with a current directory of $BUILD_DIR/$TARGET.

As a result, search item 2 resolves to a different location for
target independant vs target dependant files. For example when
building 'migration/ram.o', the use of '-I$(@D)' (which expands
to '-Imigration') would not find '$BUILD_DIR/migration', but
rather '$BUILD_DIR/$TARGET/migration'.

If there are generated headers files to be used by the migration
code in '$BUILD_DIR/migration', these will not be found by the
relative include, an absolute include is needed instead. This
has not been a problem so far, since nothing has been generating
headers in sub-dirs, but the trace code will shortly be doing
that. So it is needed to list '-I$(BUILD_DIR)/$(@D)' as well as
'-I$(@D)' to ensure both directories are searched when building
target dependant code. So the search order ends up being:

  1. source dir corresponding to input file (implicit by compiler)
  2. build dir corresponding to output file (absolute)
  3. build dir corresponding to output file (relative to cwd)
  4. top level build dir
  5. top level source dir
  6. top level source include/ dir

One final complication is that the absolute '-I$(BUILD_DIR)/$(@D)'
will sometimes end up pointing to a non-existant directory if
that sub-dir does not have any target-independant files to be
built. Rather than try to dynamically filter this, a simple
'mkdir' ensures $(BUILD_DIR)/$(@D) is guaranteed to exist at
all times.

Signed-off-by: Daniel P. Berrange <address@hidden>
Reviewed-by: Eric Blake <address@hidden>
Message-id: address@hidden
Signed-off-by: Stefan Hajnoczi <address@hidden>


  Commit: de928314aa5bdb1f0ad4c8dadc659bddaeb4c291
      
https://github.com/qemu/qemu/commit/de928314aa5bdb1f0ad4c8dadc659bddaeb4c291
  Author: Daniel P. Berrange <address@hidden>
  Date:   2017-01-31 (Tue, 31 Jan 2017)

  Changed paths:
    M Makefile.objs
    A hw/block/dataplane/trace-events
    M hw/block/trace-events

  Log Message:
  -----------
  trace: move hw/block/dataplane events to correct subdir

The trace-events for a given source file should generally
always live in the same directory as the source file.

Reviewed-by: Stefan Hajnoczi <address@hidden>
Signed-off-by: Daniel P. Berrange <address@hidden>
Message-id: address@hidden
Signed-off-by: Stefan Hajnoczi <address@hidden>


  Commit: 1416f9ea6d780e72632cccdc17721e11680b98b2
      
https://github.com/qemu/qemu/commit/1416f9ea6d780e72632cccdc17721e11680b98b2
  Author: Daniel P. Berrange <address@hidden>
  Date:   2017-01-31 (Tue, 31 Jan 2017)

  Changed paths:
    M Makefile.objs
    A hw/xen/trace-events
    M trace-events

  Log Message:
  -----------
  trace: move hw/xen events to correct subdir

The trace-events for a given source file should generally
always live in the same directory as the source file.

Reviewed-by: Stefan Hajnoczi <address@hidden>
Signed-off-by: Daniel P. Berrange <address@hidden>
Message-id: address@hidden
Signed-off-by: Stefan Hajnoczi <address@hidden>


  Commit: 9c5826306deef54003d8bc751021e95298014f32
      
https://github.com/qemu/qemu/commit/9c5826306deef54003d8bc751021e95298014f32
  Author: Daniel P. Berrange <address@hidden>
  Date:   2017-01-31 (Tue, 31 Jan 2017)

  Changed paths:
    M Makefile.objs
    M hw/i386/trace-events
    A hw/i386/xen/trace-events

  Log Message:
  -----------
  trace: move hw/i386/xen events to correct subdir

The trace-events for a given source file should generally
always live in the same directory as the source file.

Reviewed-by: Stefan Hajnoczi <address@hidden>
Signed-off-by: Daniel P. Berrange <address@hidden>
Message-id: address@hidden
Signed-off-by: Stefan Hajnoczi <address@hidden>


  Commit: 2098c56a9bc5901e145fa5d4759f075808811685
      
https://github.com/qemu/qemu/commit/2098c56a9bc5901e145fa5d4759f075808811685
  Author: Daniel P. Berrange <address@hidden>
  Date:   2017-01-31 (Tue, 31 Jan 2017)

  Changed paths:
    M Makefile.target
    M scripts/tracetool.py
    M trace/Makefile.objs

  Log Message:
  -----------
  trace: move setting of group name into Makefiles

Having tracetool.py figure out the right group name from just
the input filename is not practical when considering the
different build vs src path combinations. Instead simply take
the group name as a command line arg from the Makefile, which
can trivially provide the right name.

Reviewed-by: Stefan Hajnoczi <address@hidden>
Signed-off-by: Daniel P. Berrange <address@hidden>
Message-id: address@hidden
Signed-off-by: Stefan Hajnoczi <address@hidden>


  Commit: 0ab8ed18a6fe98bfc82705b0f041fbf2a8ca5b60
      
https://github.com/qemu/qemu/commit/0ab8ed18a6fe98bfc82705b0f041fbf2a8ca5b60
  Author: Daniel P. Berrange <address@hidden>
  Date:   2017-01-31 (Tue, 31 Jan 2017)

  Changed paths:
    M .gitignore
    M Makefile
    M Makefile.objs
    M Makefile.target
    M aio-posix.c
    M balloon.c
    M block.c
    M blockdev-nbd.c
    M blockdev.c
    M blockjob.c
    M cpu-exec.c
    M dma-helpers.c
    M exec.c
    M hw/net/fsl_etsec/etsec.c
    M include/exec/cpu_ldst_template.h
    M include/exec/cpu_ldst_useronly_template.h
    M include/hw/xen/xen_common.h
    R include/trace.h
    M ioport.c
    M kvm-all.c
    M memory.c
    M monitor.c
    M qom/cpu.c
    M scripts/tracetool.py
    M scripts/tracetool/backend/dtrace.py
    M scripts/tracetool/backend/simple.py
    M scripts/tracetool/backend/ust.py
    M scripts/tracetool/format/c.py
    M scripts/tracetool/format/tcg_h.py
    M scripts/tracetool/format/tcg_helper_c.py
    M scripts/tracetool/format/ust_events_c.py
    M scripts/tracetool/format/ust_events_h.py
    M spice-qemu-char.c
    M tests/Makefile.include
    M thread-pool.c
    M trace/Makefile.objs
    M trace/control-target.c
    M trace/control.c
    M trace/ftrace.c
    M trace/simple.c
    M translate-all.c
    M vl.c
    M xen-hvm.c
    M xen-mapcache.c

  Log Message:
  -----------
  trace: switch to modular code generation for sub-directories

Introduce rules in the top level Makefile that are able to generate
trace.[ch] files in every subdirectory which has a trace-events file.

The top level directory is handled specially, so instead of creating
trace.h, it creates trace-root.h. This allows sub-directories to
include the top level trace-root.h file, without ambiguity wrt to
the trace.g file in the current sub-dir.

Reviewed-by: Stefan Hajnoczi <address@hidden>
Signed-off-by: Daniel P. Berrange <address@hidden>
Message-id: address@hidden
Signed-off-by: Stefan Hajnoczi <address@hidden>


  Commit: d4fa8436ce37f125d29d015b06b8cd0e00d6051a
      
https://github.com/qemu/qemu/commit/d4fa8436ce37f125d29d015b06b8cd0e00d6051a
  Author: Daniel P. Berrange <address@hidden>
  Date:   2017-01-31 (Tue, 31 Jan 2017)

  Changed paths:
    M docs/tracing.txt

  Log Message:
  -----------
  trace: update docs to reflect new code generation approach

Describe use of per-subdir trace events files and how it impacts
code generation.

Reviewed-by: Stefan Hajnoczi <address@hidden>
Signed-off-by: Daniel P. Berrange <address@hidden>
Message-id: address@hidden
Signed-off-by: Stefan Hajnoczi <address@hidden>


  Commit: 25d54654da2a2d1c612c827e6155d3bec0e1201f
      
https://github.com/qemu/qemu/commit/25d54654da2a2d1c612c827e6155d3bec0e1201f
  Author: Daniel P. Berrange <address@hidden>
  Date:   2017-01-31 (Tue, 31 Jan 2017)

  Changed paths:
    M scripts/simpletrace.py

  Log Message:
  -----------
  trace: improve error reporting when parsing simpletrace header

When loading a simpletrace binary file we just report
"Not a valid trace file!" which is not very helpful. Report
exactly which field we found to be invalid.

Reviewed-by: Stefan Hajnoczi <address@hidden>
Reviewed-by: Eric Blake <address@hidden>
Signed-off-by: Daniel P. Berrange <address@hidden>
Message-id: address@hidden
Signed-off-by: Stefan Hajnoczi <address@hidden>


  Commit: 6514532f7381dfdfdf7acc9b966fd754332b88cf
      
https://github.com/qemu/qemu/commit/6514532f7381dfdfdf7acc9b966fd754332b88cf
  Author: Stefan Hajnoczi <address@hidden>
  Date:   2017-01-31 (Tue, 31 Jan 2017)

  Changed paths:
    M qapi/qapi-visit-core.c

  Log Message:
  -----------
  qapi: add missing trace_visit_type_enum() call

A trace event exists for enums but it's never called.  This patch fixes
this oversight so that enums are traced just like the other QAPI types.

Suggested-by: Daniel P. Berrange <address@hidden>
Signed-off-by: Stefan Hajnoczi <address@hidden>
Reviewed-by: Eric Blake <address@hidden>
Message-id: address@hidden
Signed-off-by: Stefan Hajnoczi <address@hidden>


  Commit: 7f4076c1bb16d0d6f81a085ecc9c9d0b9da74c7d
      
https://github.com/qemu/qemu/commit/7f4076c1bb16d0d6f81a085ecc9c9d0b9da74c7d
  Author: Stefan Hajnoczi <address@hidden>
  Date:   2017-01-31 (Tue, 31 Jan 2017)

  Changed paths:
    M block/trace-events
    M hw/block/dataplane/trace-events
    M hw/display/trace-events
    M hw/i386/trace-events
    M hw/input/trace-events
    M hw/intc/trace-events
    M hw/net/trace-events
    M hw/usb/trace-events
    M hw/vfio/trace-events
    M migration/trace-events
    M qapi/trace-events
    M trace-events

  Log Message:
  -----------
  trace: clean up trace-events files

There are a number of unused trace events that
scripts/cleanup-trace-events.pl finds.  The "hw/vfio/pci-quirks.c"
filename was typoed and "qapi/qapi-visit-core.c" was missing the qapi/
directory prefix.

Signed-off-by: Stefan Hajnoczi <address@hidden>
Reviewed-by: Eric Blake <address@hidden>
Message-id: address@hidden
Signed-off-by: Stefan Hajnoczi <address@hidden>


  Commit: 4e9f5244e1945b2852b9ddcd7f023a7d19c9ecd7
      
https://github.com/qemu/qemu/commit/4e9f5244e1945b2852b9ddcd7f023a7d19c9ecd7
  Author: Peter Maydell <address@hidden>
  Date:   2017-02-02 (Thu, 02 Feb 2017)

  Changed paths:
    M .gitignore
    M Makefile
    M Makefile.objs
    M Makefile.target
    M aio-posix.c
    M balloon.c
    M block.c
    M block/trace-events
    M blockdev-nbd.c
    M blockdev.c
    M blockjob.c
    M cpu-exec.c
    M dma-helpers.c
    M docs/tracing.txt
    M exec.c
    A hw/block/dataplane/trace-events
    M hw/block/trace-events
    M hw/display/trace-events
    M hw/i386/trace-events
    A hw/i386/xen/trace-events
    M hw/input/trace-events
    M hw/intc/trace-events
    M hw/net/fsl_etsec/etsec.c
    M hw/net/trace-events
    M hw/usb/trace-events
    M hw/vfio/trace-events
    A hw/xen/trace-events
    M include/exec/cpu_ldst_template.h
    M include/exec/cpu_ldst_useronly_template.h
    M include/hw/xen/xen_common.h
    R include/trace.h
    M ioport.c
    M kvm-all.c
    M memory.c
    M migration/trace-events
    M monitor.c
    M qapi/qapi-visit-core.c
    M qapi/trace-events
    M qom/cpu.c
    M rules.mak
    M scripts/simpletrace.py
    M scripts/tracetool.py
    M scripts/tracetool/backend/dtrace.py
    M scripts/tracetool/backend/simple.py
    M scripts/tracetool/backend/ust.py
    M scripts/tracetool/format/c.py
    M scripts/tracetool/format/tcg_h.py
    M scripts/tracetool/format/tcg_helper_c.py
    M scripts/tracetool/format/ust_events_c.py
    M scripts/tracetool/format/ust_events_h.py
    M spice-qemu-char.c
    M tests/Makefile.include
    M thread-pool.c
    M trace-events
    M trace/Makefile.objs
    M trace/control-target.c
    M trace/control.c
    M trace/ftrace.c
    M trace/simple.c
    M translate-all.c
    M vl.c
    M xen-hvm.c
    M xen-mapcache.c

  Log Message:
  -----------
  Merge remote-tracking branch 'remotes/stefanha/tags/tracing-pull-request' 
into staging

# gpg: Signature made Wed 01 Feb 2017 13:44:32 GMT
# gpg:                using RSA key 0x9CA4ABB381AB73C8
# gpg: Good signature from "Stefan Hajnoczi <address@hidden>"
# gpg:                 aka "Stefan Hajnoczi <address@hidden>"
# Primary key fingerprint: 8695 A8BF D3F9 7CDA AC35  775A 9CA4 ABB3 81AB 73C8

* remotes/stefanha/tags/tracing-pull-request:
  trace: clean up trace-events files
  qapi: add missing trace_visit_type_enum() call
  trace: improve error reporting when parsing simpletrace header
  trace: update docs to reflect new code generation approach
  trace: switch to modular code generation for sub-directories
  trace: move setting of group name into Makefiles
  trace: move hw/i386/xen events to correct subdir
  trace: move hw/xen events to correct subdir
  trace: move hw/block/dataplane events to correct subdir
  make: move top level dir to end of include search path

# Conflicts:
#       Makefile

Signed-off-by: Peter Maydell <address@hidden>


Compare: https://github.com/qemu/qemu/compare/0b17d809b08e...4e9f5244e194

reply via email to

[Prev in Thread] Current Thread [Next in Thread]