- Jan 04, 2021
-
-
Stefan Hajnoczi authored
The tracetool.py script writes to stdout. This means the output filename is not available to the script. Add the output filename to the command-line so that the script has access to the filename. This also simplifies the tracetool.py invocation. It's no longer necessary to use meson's custom_build(capture : true) to save output. Signed-off-by:
Stefan Hajnoczi <stefanha@redhat.com> Reviewed-by:
Philippe Mathieu-Daudé <f4bug@amsat.org> Reviewed-by:
Peter Maydell <peter.maydell@linaro.org> Message-Id: <20200827142915.108730-2-stefanha@redhat.com>
-
Doug Evans authored
... for consistency with "-d help". Signed-off-by:
Doug Evans <dje@google.com> Message-id: 20201125215245.3514695-1-dje@google.com Signed-off-by:
Stefan Hajnoczi <stefanha@redhat.com>
-
- Jan 02, 2021
-
-
Paolo Bonzini authored
Signed-off-by:
Paolo Bonzini <pbonzini@redhat.com>
-
- Dec 19, 2020
-
-
Eric Blake authored
Anywhere we create a list of just one item or by prepending items (typically because order doesn't matter), we can use QAPI_LIST_PREPEND(). But places where we must keep the list in order by appending remain open-coded until later patches. Note that as a side effect, this also performs a cleanup of two minor issues in qga/commands-posix.c: the old code was performing new = g_malloc0(sizeof(*ret)); which 1) is confusing because you have to verify whether 'new' and 'ret' are variables with the same type, and 2) would conflict with C++ compilation (not an actual problem for this file, but makes copy-and-paste harder). Signed-off-by:
Eric Blake <eblake@redhat.com> Message-Id: <20201113011340.463563-5-eblake@redhat.com> Reviewed-by:
Markus Armbruster <armbru@redhat.com> Acked-by:
Stefan Hajnoczi <stefanha@redhat.com> [Straightforward conflicts due to commit a8aa94b5 "qga: update schema for guest-get-disks 'dependents' field" and commit a10b453a "target/mips: Move mips_cpu_add_definition() from helper.c to cpu.c" resolved. Commit message tweaked.] Signed-off-by:
Markus Armbruster <armbru@redhat.com>
-
- Nov 19, 2020
-
-
Stefan Hajnoczi authored
QEMU binaries no longer launch successfully with recent SystemTap releases. This is because modular QEMU builds link the sdt semaphores into the main binary instead of into the shared objects where they are used. The symbol visibility of semaphores is 'hidden' and the dynamic linker prints an error during module loading: $ ./configure --enable-trace-backends=dtrace --enable-modules ... ... Failed to open module: /builddir/build/BUILD/qemu-4.2.0/s390x-softmmu/../block-curl.so: undefined symbol: qemu_curl_close_semaphore The long-term solution is to generate per-module dtrace .o files and link them into the module instead of the main binary. In the short term we can define STAP_SDT_V2 so dtrace(1) produces a .o file with 'default' symbol visibility instead of 'hidden'. This workaround is small and easier to merge for QEMU 5.2 and downstream backports. Buglink: https://bugzilla.redhat.com/show_bug.cgi?id=1898700 Cc: wcohen@redhat.com Cc: fche@redhat.com Cc: kraxel@redhat.com Cc: rjones@redhat.com Cc: ddepaula@redhat.com Signed-off-by:
Stefan Hajnoczi <stefanha@redhat.com> Reviewed-by:
Daniel P. Berrangé <berrange@redhat.com> Reviewed-by:
Philippe Mathieu-Daudé <philmd@redhat.com> Reviewed-by:
Miroslav Rezanina <mrezanin@redhat.com> Message-id: 20201119141457.844452-1-stefanha@redhat.com Signed-off-by:
Stefan Hajnoczi <stefanha@redhat.com>
-
- Nov 11, 2020
-
-
Paolo Bonzini authored
It is not needed, all the callers are just saving what was retrieved from -trace and trace_init_file can retrieve it on its own. Signed-off-by:
Paolo Bonzini <pbonzini@redhat.com> Message-id: 20201102115841.4017692-1-pbonzini@redhat.com Signed-off-by:
Stefan Hajnoczi <stefanha@redhat.com>
-
- Oct 26, 2020
-
-
Josh DuBois authored
Tracing can be enabled at the command line or via the monitor. Command-line trace options are recorded during trace_opt_parse(), but tracing is not enabled until the various front-ends later call trace_init_file(). If the user passes a trace option on the command-line, remember that and enable tracing during trace_init_file(). Otherwise, trace_init_file() should record the trace file specified by the frontend and avoid enabling traces until the user requests them via the monitor. This fixes 1b7157be and also db25d56c, by allowing the user to enable traces on the command line and also avoiding unwanted trace-<pid> files when the user has not asked for them. Fixes: 1b7157be Signed-off-by:
Josh DuBois <josh@joshdubois.com> Message-id: 20200816174610.20253-1-josh@joshdubois.com Signed-off-by:
Stefan Hajnoczi <stefanha@redhat.com>
-
- Oct 09, 2020
-
-
Kevin Wolf authored
cur_mon really needs to be coroutine-local as soon as we move monitor command handlers to coroutines and let them yield. As a first step, just remove all direct accesses to cur_mon so that we can implement this in the getter function later. Signed-off-by:
Kevin Wolf <kwolf@redhat.com> Message-Id: <20201005155855.256490-4-kwolf@redhat.com> Reviewed-by:
Markus Armbruster <armbru@redhat.com> Reviewed-by:
Stefan Hajnoczi <stefanha@redhat.com> Signed-off-by:
Markus Armbruster <armbru@redhat.com>
-
- Sep 30, 2020
-
-
Paolo Bonzini authored
Build all executables by default except for the known-broken ones. This also allows running qemu-iotests without manually building socket_scm_helper. Reported-by:
Max Reitz <mreitz@redhat.com> Tested-by:
Max Reitz <mreitz@redhat.com> Signed-off-by:
Paolo Bonzini <pbonzini@redhat.com>
-
- Sep 01, 2020
-
-
Marc-André Lureau authored
When cross-compiling, by default qemu_datadir is 'c:\Program Files\QEMU', which is not recognized as being an absolute path, and meson will end up adding the prefix again. Signed-off-by:
Marc-André Lureau <marcandre.lureau@redhat.com> Message-Id: <20200826110419.528931-6-marcandre.lureau@redhat.com> Signed-off-by:
Paolo Bonzini <pbonzini@redhat.com>
-
- Aug 27, 2020
-
-
Roman Bolshakov authored
dtrace on macOS uses unresolved symbols with a special prefix to define probes [1], only headers should be generated for USDT (dtrace(1)). But it doesn't support backwards compatible no-op -G flag [2] and implicit build rules fail. 1. https://markmail.org/message/6grq2ygr5nwdwsnb 2. https://markmail.org/message/5xrxt2w5m42nojkz Cc: Daniel P. Berrangé <berrange@redhat.com> Cc: Cameron Esfahani <dirty@apple.com> Signed-off-by:
Roman Bolshakov <r.bolshakov@yadro.com> Reviewed-by:
Daniel P. Berrangé <berrange@redhat.com> Signed-off-by:
Paolo Bonzini <pbonzini@redhat.com>
-
- Aug 21, 2020
-
-
Marc-André Lureau authored
Signed-off-by:
Marc-André Lureau <marcandre.lureau@redhat.com> Signed-off-by:
Paolo Bonzini <pbonzini@redhat.com>
-
Marc-André Lureau authored
Signed-off-by:
Marc-André Lureau <marcandre.lureau@redhat.com> Signed-off-by:
Paolo Bonzini <pbonzini@redhat.com>
-
Marc-André Lureau authored
Signed-off-by:
Marc-André Lureau <marcandre.lureau@redhat.com> Signed-off-by:
Paolo Bonzini <pbonzini@redhat.com>
-
Paolo Bonzini authored
This shows how to do some "computations" in meson.build using its array and dictionary data structures, and also a basic usage of the sourceset module for conditional compilation. Notice the new "if have_system" part of util/meson.build, which fixes a bug in the old build system was buggy: util/dbus.c was built even for non-softmmu builds, but the dependency on -lgio was lost when the linking was done through libqemuutil.a. Because all of its users required gio otherwise, the bug was hidden. Meson instead propagates libqemuutil's dependencies down to its users, and shows the problem. Signed-off-by:
Paolo Bonzini <pbonzini@redhat.com>
-
Paolo Bonzini authored
Meson doesn't enjoy the same flexibility we have with Make in choosing the include path. In particular the tracing headers are using $(build_root)/$(<D). In order to keep the include directives unchanged, the simplest solution is to generate headers with patterns like "trace/trace-audio.h" and place forwarding headers in the source tree such that for example "audio/trace.h" includes "trace/trace-audio.h". This patch is too ugly to be applied to the Makefiles now. It's only a way to separate the changes to the tracing header files from the Meson rewrite of the tracing logic. Signed-off-by:
Paolo Bonzini <pbonzini@redhat.com>
-
- Jul 29, 2020
-
-
Josh DuBois authored
The simple trace backend is enabled / disabled with a call to st_set_trace_file_enabled(). When initializing tracing from the command-line, this must be enabled on startup. (Prior to db25d56c, command-line initialization of simple trace worked because every call to st_set_trace_file enabled tracing.) Fixes: db25d56c Signed-off-by:
Josh DuBois <josh@joshdubois.com> Message-id: 20200723053359.256928-1-josh@joshdubois.com Signed-off-by:
Stefan Hajnoczi <stefanha@redhat.com>
-
- Jun 24, 2020
-
-
Markus Armbruster authored
st_set_trace_file() accidentally enables tracing. It's called unconditionally during startup, which is why QEMU built with the simple trace backend always writes a trace file "trace-$PID". This has been broken for quite a while. I didn't track down the exact commit. Fix st_set_trace_file() to restore the state. Signed-off-by:
Markus Armbruster <armbru@redhat.com> Reviewed-by:
Philippe Mathieu-Daudé <philmd@redhat.com> Message-id: 20200527065613.25322-1-armbru@redhat.com Signed-off-by:
Stefan Hajnoczi <stefanha@redhat.com>
-
- Feb 25, 2020
-
-
Alex Bennée authored
Otherwise any -D settings the user may have made get ignored. Signed-off-by:
Alex Bennée <alex.bennee@linaro.org> Tested-by:
Laurent Vivier <laurent@vivier.eu> Reviewed-by:
Robert Foley <robert.foley@linaro.org> Message-Id: <20200225124710.14152-10-alex.bennee@linaro.org>
-
- Jan 30, 2020
-
-
Salvador Fandino authored
NULL is a valid log filename used to indicate we want to use stderr but qemu_set_log_filename (which is called by bsd-user/main.c) was not handling it correctly. That also made redundant a couple of NULL checks in calling code which have been removed. Signed-off-by:
Salvador Fandino <salvador@qindel.com> Message-Id: <20200123193626.19956-1-salvador@qindel.com> Signed-off-by:
Stefan Hajnoczi <stefanha@redhat.com>
-
- Jan 16, 2020
-
-
Richard Henderson authored
It is easy for the atomic helpers to use trace_mem_build_info directly, without resorting to symbol pasting. For this usage, we cannot use trace_mem_get_info, because the MemOp does not support 16-byte accesses. Tested-by:
Philippe Mathieu-Daudé <philmd@redhat.com> Reviewed-by:
Alex Bennée <alex.bennee@linaro.org> Signed-off-by:
Richard Henderson <richard.henderson@linaro.org>
-
- Dec 19, 2019
-
-
Alex Bennée authored
We already use g_pattern_match elsewhere so remove the duplication. Signed-off-by:
Alex Bennée <alex.bennee@linaro.org> Reviewed-by:
Richard Henderson <richard.henderson@linaro.org> Reviewed-by:
Stefan Hajnoczi <stefanha@redhat.com> Message-Id: <20191205122518.10010-7-alex.bennee@linaro.org>
-
- Oct 28, 2019
-
-
Alex Bennée authored
We are going to re-use mem_info later for plugins and will need to track the mmu_idx for softmmu code. Signed-off-by:
Alex Bennée <alex.bennee@linaro.org>
-
Emilio G. Cota authored
This will allow us to trace 32k-long memory accesses (although our maximum is something like 256 bytes at the moment). Reviewed-by:
Alex Bennée <alex.bennee@linaro.org> Signed-off-by:
Emilio G. Cota <cota@braap.org> [AJB: expanded to 3->4 bits] Signed-off-by:
Alex Bennée <alex.bennee@linaro.org> Reviewed-by:
Richard Henderson <richard.henderson@linaro.org>
-
- Sep 03, 2019
-
-
Tony Nguyen authored
Preparation for collapsing the two byte swaps, adjust_endianness and handle_bswap, along the I/O path. Target dependant attributes are conditionalized upon NEED_CPU_H. Signed-off-by:
Tony Nguyen <tony.nguyen@bt.com> Acked-by:
David Gibson <david@gibson.dropbear.id.au> Reviewed-by:
Richard Henderson <richard.henderson@linaro.org> Acked-by:
Cornelia Huck <cohuck@redhat.com> Message-Id: <81d9cd7d7f5aaadfa772d6c48ecee834e9cf7882.1566466906.git.tony.nguyen@bt.com> Signed-off-by:
Richard Henderson <richard.henderson@linaro.org>
-
- Aug 27, 2019
-
-
Philippe Mathieu-Daudé authored
Most tracing backends are implemented within QEMU, except the DTrace/SystemTap backends. One side effect is when running 'qemu -trace help', an incomplete list of trace events is displayed when using the DTrace/SystemTap backends. This is partly due to trace events registered as modules with trace_init(), and since the events are not used within QEMU, the linker optimize and remove the unused modules (which is OK in this particular case). Currently only the events compiled in trace-root.o and in the last trace.o member of libqemuutil.a are linked, resulting in an incomplete list of events. To avoid confusion, improve the help message, recommending to use the proper systemtap script to display the events list. Before: $ lm32-softmmu/qemu-system-lm32 -trace help 2>&1 | wc -l 70 After: $ lm32-softmmu/qemu-system-lm32 -trace help Run 'qemu-trace-stap list qemu-system-lm32' to print a list of names of trace points with the DTrace/SystemTap backends. $ qemu-trace-stap list qemu-system-lm32 | wc -l 1136 Signed-off-by:
Philippe Mathieu-Daudé <philmd@redhat.com> Message-id: 20190823142203.5210-1-philmd@redhat.com Message-Id: <20190823142203.5210-1-philmd@redhat.com> Signed-off-by:
Stefan Hajnoczi <stefanha@redhat.com>
-
- Aug 21, 2019
-
-
Markus Armbruster authored
Suggested-by:
Daniel P. Berrangé <berrange@redhat.com> Signed-off-by:
Markus Armbruster <armbru@redhat.com> Message-Id: <20190709152053.16670-2-armbru@redhat.com> Reviewed-by:
Philippe Mathieu-Daudé <philmd@redhat.com> Tested-by:
Philippe Mathieu-Daudé <philmd@redhat.com> [Rebased onto merge commit 95a9457f; missed instances of qom/cpu.h in comments replaced]
-
- Aug 16, 2019
-
-
Markus Armbruster authored
docs/devel/tracing.txt explains "since many source files include trace.h, [the generated trace.h use] a minimum of types and other header files included to keep the namespace clean and compile times and dependencies down." Commit 48151859 "trace: Add per-vCPU tracing states for events with the 'vcpu' property" made them all include qom/cpu.h via control-internal.h. qom/cpu.h in turn includes about thirty headers. Ouch. Per-vCPU tracing is currently not supported in sub-directories' trace-events. In other words, qom/cpu.h can only be used in trace-root.h, not in any trace.h. Split trace/control-vcpu.h off trace/control.h and trace/control-internal.h. Have the generated trace.h include trace/control.h (which no longer includes qom/cpu.h), and trace-root.h include trace/control-vcpu.h (which includes it). The resulting improvement is a bit disappointing: in my "build everything" tree, some 1100 out of 6600 objects (not counting tests and objects that don't depend on qemu/osdep.h) depend on a trace.h, and about 600 of them no longer depend on qom/cpu.h. But more than 1300 others depend on trace-root.h. More work is clearly needed. Left for another day. Cc: Stefan Hajnoczi <stefanha@redhat.com> Signed-off-by:
Markus Armbruster <armbru@redhat.com> Reviewed-by:
Stefan Hajnoczi <stefanha@redhat.com> Reviewed-by:
Philippe Mathieu-Daudé <philmd@redhat.com> Tested-by:
Philippe Mathieu-Daudé <philmd@redhat.com> Message-Id: <20190812052359.30071-8-armbru@redhat.com>
-
- Jun 12, 2019
-
-
Markus Armbruster authored
No header includes qemu-common.h after this commit, as prescribed by qemu-common.h's file comment. Signed-off-by:
Markus Armbruster <armbru@redhat.com> Message-Id: <20190523143508.25387-5-armbru@redhat.com> [Rebased with conflicts resolved automatically, except for include/hw/arm/xlnx-zynqmp.h hw/arm/nrf51_soc.c hw/arm/msf2-soc.c block/qcow2-refcount.c block/qcow2-cluster.c block/qcow2-cache.c target/arm/cpu.h target/lm32/cpu.h target/m68k/cpu.h target/mips/cpu.h target/moxie/cpu.h target/nios2/cpu.h target/openrisc/cpu.h target/riscv/cpu.h target/tilegx/cpu.h target/tricore/cpu.h target/unicore32/cpu.h target/xtensa/cpu.h; bsd-user/main.c and net/tap-bsd.c fixed up]
-
- Apr 18, 2019
-
-
Markus Armbruster authored
st_print_trace_file_status() takes an fprintf()-like callback and a FILE * to pass to it. Its only caller hmp_trace_file() passes monitor_fprintf() and the current monitor cast to FILE *. monitor_fprintf() casts it right back, and is otherwise identical to monitor_printf(). The type-punning is ugly. Drop the callback, and call qemu_printf() instead. Signed-off-by:
Markus Armbruster <armbru@redhat.com> Reviewed-by:
Dr. David Alan Gilbert <dgilbert@redhat.com> Message-Id: <20190417191805.28198-3-armbru@redhat.com>
-
- Mar 22, 2019
-
-
Stefan Hajnoczi authored
If the tracefs mountpoint has a very long path we may exceed PATH_MAX. This is a system misconfiguration and the user must resolve it so that applications can perform path-based system calls successfully. This issue does not occur on real-world systems since tracefs is mounted on /sys/kernel/debug/tracing/, but the compiler is smart enough to foresee the possibility and warn about the unchecked snprintf(3) return value. This patch fixes the compiler warning. Reported-by:
Markus Armbruster <armbru@redhat.com> Signed-off-by:
Stefan Hajnoczi <stefanha@redhat.com> Reviewed-by:
Markus Armbruster <armbru@redhat.com> Reviewed-by:
Liam Merwick <liam.merwick@oracle.com> Message-id: 20190321170831.6539-2-stefanha@redhat.com Message-Id: <20190321170831.6539-2-stefanha@redhat.com> Signed-off-by:
Stefan Hajnoczi <stefanha@redhat.com>
-
- Mar 11, 2019
-
-
Paolo Bonzini authored
It is possible to specify the trace/ directory already in objs-y; there is no need to have a separate unnest-vars invocation. Signed-off-by:
Paolo Bonzini <pbonzini@redhat.com>
-
- Dec 12, 2018
-
-
Larry Dewey authored
This changes two lines in simple.c that end with a comma, and replaces them with a semi-colon. Signed-off-by:
Larry Dewey <ldewey@suse.com> Reviewed-by:
John Snow <jsnow@redhat.com> Message-id: 20181127190849.10558-1-ldewey@suse.com Signed-off-by:
Stefan Hajnoczi <stefanha@redhat.com>
-
- Jul 19, 2018
-
-
Yaowei Bai authored
The '-trace' and '--trace' spellings are only both supported in qemu binary, while for qemu-nbd or qemu-img only '--trace' spelling is supported. So for the consistency of trace option invocation, we should use double-dash spelling in our documentation. This's also mentioned in https://wiki.qemu.org/BiteSizedTasks#Consistent_option_usage_in_documentation . Signed-off-by:
Yaowei Bai <baiyaowei@cmss.chinamobile.com> Reviewed-by:
Eric Blake <eblake@redhat.com> Message-id: 1530674247-31200-1-git-send-email-baiyaowei@cmss.chinamobile.com Signed-off-by:
Stefan Hajnoczi <stefanha@redhat.com>
-
- Jun 29, 2018
-
-
Daniel P. Berrangé authored
Per supported platforms doc[1], the various min glib on relevant distros is: RHEL-7: 2.50.3 Debian (Stretch): 2.50.3 Debian (Jessie): 2.42.1 OpenBSD (Ports): 2.54.3 FreeBSD (Ports): 2.50.3 OpenSUSE Leap 15: 2.54.3 SLE12-SP2: 2.48.2 Ubuntu (Xenial): 2.48.0 macOS (Homebrew): 2.56.0 This suggests that a minimum glib of 2.42 is a reasonable target. The GLibC compile farm, however, uses Ubuntu 14.04 (Trusty) which only has glib 2.40.0, and this is needed for testing during merge. Thus an exception is made to the documented platform support policy to allow for all three current LTS releases to be supported. Docker jobs that not longer satisfy this new min version are removed. [1] https://qemu.weilnetz.de/doc/qemu-doc.html#Supported-build-platforms Reviewed-by:
Thomas Huth <thuth@redhat.com> Signed-off-by:
Daniel P. Berrangé <berrange@redhat.com>
-
- Jun 28, 2018
-
-
Paolo Bonzini authored
Place them in exec.c, exec-all.h and ram_addr.h. This removes knowledge of translate-all.h (which is an internal header) from several files outside accel/tcg and removes knowledge of AddressSpace from translate-all.c (as it only operates on ram_addr_t). Signed-off-by:
Paolo Bonzini <pbonzini@redhat.com>
-
- Jun 27, 2018
-
-
Emilio G. Cota authored
These will be used by the following commit. Signed-off-by:
Emilio G. Cota <cota@braap.org> Message-id: 1527028012-21888-5-git-send-email-cota@braap.org Signed-off-by:
Stefan Hajnoczi <stefanha@redhat.com>
-
Emilio G. Cota authored
This will allow us to trace 16B-long memory accesses. Signed-off-by:
Emilio G. Cota <cota@braap.org> Message-id: 1527028012-21888-4-git-send-email-cota@braap.org Signed-off-by:
Stefan Hajnoczi <stefanha@redhat.com>
-
Emilio G. Cota authored
Add some defines for the mem_info bits, simplify trace_mem_build_info, and also simplify trace_mem_get_info by making it a wrapper around trace_mem_build_info. This paves the way for increasing size_shift by one bit. Signed-off-by:
Emilio G. Cota <cota@braap.org> Message-id: 1527028012-21888-3-git-send-email-cota@braap.org Signed-off-by:
Stefan Hajnoczi <stefanha@redhat.com>
-
- Jun 01, 2018
-
-
Michael S. Tsirkin authored
When pulling in headers that are in the same directory as the C file (as opposed to one in include/), we should use its relative path, without a directory. Signed-off-by:
Michael S. Tsirkin <mst@redhat.com> Reviewed-by:
Stefan Hajnoczi <stefanha@redhat.com> Reviewed-by:
Philippe Mathieu-Daudé <f4bug@amsat.org> Tested-by:
Philippe Mathieu-Daudé <f4bug@amsat.org>
-