- 27 6月, 2018 1 次提交
-
-
由 Stefan Hajnoczi 提交于
Only one existing trace event uses a floating point type. Unfortunately float and double cannot be supported since SystemTap does not have floating point types. Remove float and double from the whitelist and document this limitation. Update the migrate_transferred trace event to use uint64_t instead of double. Cc: Dr. David Alan Gilbert <dgilbert@redhat.com> Cc: Daniel P. Berrangé <berrange@redhat.com> Cc: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: NStefan Hajnoczi <stefanha@redhat.com> Reviewed-by: NPhilippe Mathieu-Daudé <f4bug@amsat.org> Reviewed-by: NJuan Quintela <quintela@redhat.com> Message-id: 20180621150254.4922-1-stefanha@redhat.com Signed-off-by: NStefan Hajnoczi <stefanha@redhat.com>
-
- 12 3月, 2018 2 次提交
-
-
由 Daniel P. Berrangé 提交于
Some trace backends will compile code based on the declared trace events. It should not be assumed that the backends can resolve any QEMU specific typedefs. So trace events should restrict their argument types to the standard C types and fixed size integer types. Any complex pointer types can be declared as "void *" for purposes of trace events, since nothing will be dereferencing these pointer arguments. Signed-off-by: NDaniel P. Berrangé <berrange@redhat.com> Message-id: 20180308155524.5082-3-berrange@redhat.com Signed-off-by: NStefan Hajnoczi <stefanha@redhat.com>
-
由 Daniel P. Berrangé 提交于
Improves error messages from: ValueError: Error on line 72: need more than 1 value to unpack To ValueError: Error at /home/berrange/src/virt/qemu/trace-events:72: need more than 1 value to unpack Signed-off-by: NDaniel P. Berrangé <berrange@redhat.com> Reviewed-by: NPhilippe Mathieu-Daudé <f4bug@amsat.org> Message-id: 20180306154650.24075-1-berrange@redhat.com Signed-off-by: NStefan Hajnoczi <stefanha@redhat.com>
-
- 19 2月, 2018 1 次提交
-
-
由 Jon Emil Jahren 提交于
Using the greedy star matching, arguments like "...%"PRIx64 caused issues for functions with multiple PRI formats. The issue was only seen with the ust backend, as it is the only one using the format regex. The result for many functions was that the arguments coming after the greedy star end was left out of the tracepoint, and in some cases some of the arguments that was traced had the wrong format. Signed-off-by: NJon Emil Jahren <jonemilj@gmail.com> Message-id: 20180129041648.30884-2-jonemilj@gmail.com Signed-off-by: NStefan Hajnoczi <stefanha@redhat.com>
-
- 29 1月, 2018 3 次提交
-
-
由 Stefan Hajnoczi 提交于
C functions with no arguments must be declared foo(void) instead of foo(). The tracetool argument list parser has never accepted an empty argument list. This patch adds a clear error message for this error case. Signed-off-by: NStefan Hajnoczi <stefanha@redhat.com> Reviewed-by: NEric Blake <eblake@redhat.com> Message-id: 20180110202553.31889-4-stefanha@redhat.com Signed-off-by: NStefan Hajnoczi <stefanha@redhat.com>
-
由 Stefan Hajnoczi 提交于
The terminology used by tracetool is not consistent with C sprintf or docs/devel/tracing.txt. The word "formats" is sometimes used to mean "format strings". This patch clarifies comments and error messages that contain this word. Note that the error message lines are longer than 80 characters but I have not wrapped them to aid grepping. Signed-off-by: NStefan Hajnoczi <stefanha@redhat.com> Reviewed-by: NEric Blake <eblake@redhat.com> Message-id: 20180110202553.31889-3-stefanha@redhat.com Signed-off-by: NStefan Hajnoczi <stefanha@redhat.com>
-
由 Stefan Hajnoczi 提交于
Include the file line number in the message that is printed when trace-events parse errors are raised. [Use enumerate(fobj, 1) to avoid having to increment a 0-based index later, as suggested by Eric Blake. --Stefan] Suggested-by: NDr. David Alan Gilbert <dgilbert@redhat.com> Signed-off-by: NStefan Hajnoczi <stefanha@redhat.com> Reviewed-by: NEric Blake <eblake@redhat.com> Message-id: 20180110202553.31889-2-stefanha@redhat.com Signed-off-by: NStefan Hajnoczi <stefanha@redhat.com>
-
- 01 8月, 2017 1 次提交
-
-
由 Stefan Hajnoczi 提交于
QEMU keeps track of trace event enabled/disabled state and provides monitor commands to inspect and modify the "dstate". SystemTap and LTTng UST maintain independent enabled/disabled states for each trace event, the other backends rely on QEMU dstate. Introduce a new per-event macro that combines backend-specific dstate like this: #define TRACE_MY_EVENT_BACKEND_DSTATE() ( \ QEMU_MY_EVENT_ENABLED() || /* SystemTap */ \ tracepoint_enabled(qemu, my_event) /* LTTng UST */ || \ false) This will be used to extend trace_event_get_state() in the next patch. [Daniel Berrange pointed out that QEMU_MY_EVENT_ENABLED() must be true by default, not false. This way events will fire even if the DTrace implementation does not implement the SystemTap semaphores feature. Ubuntu Precise uses lttng-ust-dev 2.0.2 which does not have tracepoint_enabled(), so we need a compatibility wrapper to keep Travis builds passing. --Stefan] Signed-off-by: NStefan Hajnoczi <stefanha@redhat.com> Message-id: 20170731140718.22010-2-stefanha@redhat.com Signed-off-by: NStefan Hajnoczi <stefanha@redhat.com> fixup! trace: add TRACE_<event>_BACKEND_DSTATE()
-
- 17 7月, 2017 1 次提交
-
-
由 Lluís Vilanova 提交于
If an event is dynamically disabled, the TCG code that calls the execution-time tracer is not generated. Removes the overheads of execution-time tracers for dynamically disabled events. As a bonus, also avoids checking the event state when the execution-time tracer is called from TCG-generated code (since otherwise TCG would simply not call it). Signed-off-by: NLluís Vilanova <vilanova@ac.upc.edu> Signed-off-by: NEmilio G. Cota <cota@braap.org> Message-id: 149915799921.6295.13067154430923434035.stgit@frigg.lan Signed-off-by: NStefan Hajnoczi <stefanha@redhat.com>
-
- 08 5月, 2017 1 次提交
-
-
由 Daniel P. Berrange 提交于
The UST trace backend can only cope with upto 10 arguments. To ensure we don't exceed the limit when UST is not compiled in, disallow more than 10 arguments upfront. This prevents the case where: commit 0fc8aec7 Author: Zhang Chen <zhangchen.fnst@cn.fujitsu.com> Date: Tue Apr 18 10:20:20 2017 +0800 COLO-compare: Optimize tcp compare trace event Optimize two trace events as one, adjust print format make it easy to read. rename trace_colo_compare_pkt_info_src/dst to trace_colo_compare_tcp_info. regressed the fix done in commit 2dfe5113 Author: Alex Bennée <alex.bennee@linaro.org> Date: Fri Oct 28 14:25:59 2016 +0100 net: split colo_compare_pkt_info into two trace events It seems there is a limit to the number of arguments a UST trace event can take and at 11 the previous trace command broke the build. Split the trace into a src pkt and dst pkt trace to fix this. Signed-off-by: NAlex Bennée <alex.bennee@linaro.org> Message-id: 20161028132559.8324-1-alex.bennee@linaro.org Reviewed-by: NPeter Maydell <peter.maydell@linaro.org> Signed-off-by: NPeter Maydell <peter.maydell@linaro.org> Now we get an immediate fail even when UST is disabled: GEN net/trace.h Traceback (most recent call last): File "/home/berrange/src/virt/qemu/scripts/tracetool.py", line 154, in <module> main(sys.argv) File "/home/berrange/src/virt/qemu/scripts/tracetool.py", line 145, in main events.extend(tracetool.read_events(fh)) File "/home/berrange/src/virt/qemu/scripts/tracetool/__init__.py", line 307, in read_events event = Event.build(line) File "/home/berrange/src/virt/qemu/scripts/tracetool/__init__.py", line 244, in build event = Event(name, props, fmt, args) File "/home/berrange/src/virt/qemu/scripts/tracetool/__init__.py", line 196, in __init__ "argument count" % name) ValueError: Event 'colo_compare_tcp_info' has more than maximum permitted argument count Makefile:96: recipe for target 'net/trace.h-timestamp' failed Signed-off-by: NDaniel P. Berrange <berrange@redhat.com> Reviewed-by: NEric Blake <eblake@redhat.com> Message-id: 20170426153900.21066-1-berrange@redhat.com Signed-off-by: NStefan Hajnoczi <stefanha@redhat.com>
-
- 12 10月, 2016 5 次提交
-
-
由 Daniel P. Berrange 提交于
The declarations in the generated-tracers.h file are assuming there's only ever going to be one instance of this header, as they are not namespaced. When we have one header per event group, if a single source file needs to include multiple sets of trace events, the symbols will all clash. This change thus introduces a '--group NAME' arg to the 'tracetool' program. This will cause all the symbols in the generated header files to be given a unique namespace. If no group is given, the group name 'common' is used, which is suitable for the current usage where there is only one global trace-events file used for code generation. Reviewed-by: NStefan Hajnoczi <stefanha@redhat.com> Signed-off-by: NDaniel P. Berrange <berrange@redhat.com> Reviewed-by: NLluís Vilanova <vilanova@ac.upc.edu> Message-id: 1475588159-30598-21-git-send-email-berrange@redhat.com Signed-off-by: NStefan Hajnoczi <stefanha@redhat.com>
-
由 Daniel P. Berrange 提交于
Move the reading of events out of the 'tracetool.generate' method and into tracetool.main, so that the latter is not tied to generating from a single source of events. Reviewed-by: NStefan Hajnoczi <stefanha@redhat.com> Reviewed-by: NLluís Vilanova <vilanova@ac.upc.edu> Signed-off-by: NDaniel P. Berrange <berrange@redhat.com> Message-id: 1475588159-30598-19-git-send-email-berrange@redhat.com Signed-off-by: NStefan Hajnoczi <stefanha@redhat.com>
-
由 Daniel P. Berrange 提交于
The _read_events method is used by callers outside of its module, so should be a public method, not private. Reviewed-by: NStefan Hajnoczi <stefanha@redhat.com> Reviewed-by: NLluís Vilanova <vilanova@ac.upc.edu> Signed-off-by: NDaniel P. Berrange <berrange@redhat.com> Message-id: 1475588159-30598-18-git-send-email-berrange@redhat.com Signed-off-by: NStefan Hajnoczi <stefanha@redhat.com>
-
由 Daniel P. Berrange 提交于
Currently we only expose a TraceEvent array, which must be indexed via the TraceEventID enum constants. This changes the generator to expose a named TraceEvent instance for each event, with an _EVENT suffix. Reviewed-by: NLluís Vilanova <vilanova@ac.upc.edu> Reviewed-by: NStefan Hajnoczi <stefanha@redhat.com> Signed-off-by: NDaniel P. Berrange <berrange@redhat.com> Message-id: 1475588159-30598-10-git-send-email-berrange@redhat.com Signed-off-by: NStefan Hajnoczi <stefanha@redhat.com>
-
由 Daniel P. Berrange 提交于
Instead of having a global dstate array, declare a single 'uint16 TRACE_${EVENT_NAME}_DSTATE' variable for each trace event. Record a pointer to this variable in the TraceEvent struct too. By turning trace_event_get_state_dynamic_by_id into a macro, this still hits the fast path, and cache affinity is ensured by declaring all the uint16 vars adjacent to each other. Reviewed-by: NStefan Hajnoczi <stefanha@redhat.com> Reviewed-by: NLluís Vilanova <vilanova@ac.upc.edu> Signed-off-by: NDaniel P. Berrange <berrange@redhat.com> Message-id: 1475588159-30598-7-git-send-email-berrange@redhat.com Signed-off-by: NStefan Hajnoczi <stefanha@redhat.com>
-
- 01 3月, 2016 5 次提交
-
-
由 Lluís Vilanova 提交于
Formalizes the existence of the 'event_trans' and 'event_exec' event attributes, which until now were monkey-patched only when necessary. Signed-off-by: NLluís Vilanova <vilanova@ac.upc.edu> Message-id: 145640558759.20978.6374959404425591089.stgit@localhost Signed-off-by: NStefan Hajnoczi <stefanha@redhat.com>
-
由 Lluís Vilanova 提交于
This property identifies events that trace vCPU-specific information. It adds a "CPUState*" argument to events with the property, identifying the vCPU raising the event. TCG translation events also have a "TCGv_env" implicit argument that is later used as the "CPUState*" argument at execution time. Signed-off-by: NLluís Vilanova <vilanova@ac.upc.edu> Message-id: 145641861797.30295.6991314023181842105.stgit@localhost Signed-off-by: NStefan Hajnoczi <stefanha@redhat.com>
-
由 Lluís Vilanova 提交于
Signed-off-by: NLluís Vilanova <vilanova@ac.upc.edu> Message-id: 145641860680.30295.1873612736245870753.stgit@localhost Signed-off-by: NStefan Hajnoczi <stefanha@redhat.com>
-
由 Lluís Vilanova 提交于
The current code forces the use of a chain of ".original" dereferences, which looks odd. Signed-off-by: NLluís Vilanova <vilanova@ac.upc.edu> Message-id: 145641858988.30295.7223459456488075843.stgit@localhost Signed-off-by: NStefan Hajnoczi <stefanha@redhat.com>
-
由 Lluís Vilanova 提交于
Lets the user manage event arguments as a list, and simplifies argument concatenation. Signed-off-by: NLluís Vilanova <vilanova@ac.upc.edu> Reviewed-by: NEric Blake <eblake@redhat.com> Message-id: 145641858432.30295.3069911069472672646.stgit@localhost Signed-off-by: NStefan Hajnoczi <stefanha@redhat.com>
-
- 18 11月, 2014 1 次提交
-
-
由 Christoph Seifert 提交于
simpletrace.py does not recognize the tcg option while reading trace-events file. In result simpletrace does not work on binary traces and tcg enabled events. Moved transformation of tcg enabled events to _read_events() which is used by simpletrace. Signed-off-by: NChristoph Seifert <christoph.seifert@posteo.de> Signed-off-by: NStefan Hajnoczi <stefanha@redhat.com>
-
- 26 9月, 2014 3 次提交
-
-
由 Alex Bennée 提交于
This only affects lttng user space tracing at the moment. Signed-off-by: NAlex Bennée <alex.bennee@linaro.org> Signed-off-by: NStefan Hajnoczi <stefanha@redhat.com>
-
由 Stefan Hajnoczi 提交于
Use \w for properties and trace event names since they are both drawn from [a-zA-Z0-9_] character sets. The .* for matching properties was too aggressive and caused the following failure with foo(int rc) "(this is a test)": Traceback (most recent call last): File "scripts/tracetool.py", line 139, in <module> main(sys.argv) File "scripts/tracetool.py", line 134, in main binary=binary, probe_prefix=probe_prefix) File "scripts/tracetool/__init__.py", line 334, in generate events = _read_events(fevents) File "scripts/tracetool/__init__.py", line 262, in _read_events res.append(Event.build(line)) File "scripts/tracetool/__init__.py", line 225, in build return Event(name, props, fmt, args, arg_fmts) File "scripts/tracetool/__init__.py", line 185, in __init__ % ", ".join(unknown_props)) ValueError: Unknown properties: foo(int, rc) Cc: Lluís Vilanova <vilanova@ac.upc.edu> Reported-by: NEric Auger <eric.auger@linaro.org> Signed-off-by: NStefan Hajnoczi <stefanha@redhat.com> Message-id: 1411468626-20450-1-git-send-email-stefanha@redhat.com
-
由 Lluís Vilanova 提交于
TCG-enabled events start with two format strings. Delay per-argument format computation until requested ('Event.formats'). Signed-off-by: NLluís Vilanova <vilanova@ac.upc.edu> Signed-off-by: NStefan Hajnoczi <stefanha@redhat.com>
-
- 12 8月, 2014 4 次提交
-
-
由 Alex Bennée 提交于
This makes the UST backend pay attention to the format string arguments that are defined when defining payload data. With this you can now ensure integers are reported in hex mode if you want. Signed-off-by: NAlex Bennée <alex.bennee@linaro.org> Signed-off-by: NStefan Hajnoczi <stefanha@redhat.com>
-
由 Lluís Vilanova 提交于
Generates file "trace/generated-helpers.h" with TCG helper declarations to trace events in guest code at execution time ('trace_${event}_exec_proxy'). Signed-off-by: NLluís Vilanova <vilanova@ac.upc.edu> Signed-off-by: NStefan Hajnoczi <stefanha@redhat.com>
-
由 Lluís Vilanova 提交于
Transforms event: tcg name(...) "...", "..." into two internal events: tcg-trans name_trans(...) "..." tcg-exec name_exec(...) "..." Signed-off-by: NLluís Vilanova <vilanova@ac.upc.edu> Signed-off-by: NStefan Hajnoczi <stefanha@redhat.com>
-
由 Lluís Vilanova 提交于
Signed-off-by: NLluís Vilanova <vilanova@ac.upc.edu> Signed-off-by: NStefan Hajnoczi <stefanha@redhat.com>
-
- 09 6月, 2014 1 次提交
-
-
由 Lluís Vilanova 提交于
Adds support to compile QEMU with multiple tracing backends at the same time. For example, you can compile QEMU with: $ ./configure --enable-trace-backends=ftrace,dtrace Where 'ftrace' can be handy for having an in-flight record of events, and 'dtrace' can be later used to extract more information from the system. This patch allows having both available without recompiling QEMU. Signed-off-by: NLluís Vilanova <vilanova@ac.upc.edu> Signed-off-by: NStefan Hajnoczi <stefanha@redhat.com>
-
- 08 5月, 2014 5 次提交
-
-
由 Lluís Vilanova 提交于
Backends now only contain the essential backend-specific code, and most of the work is moved to frontend code. Signed-off-by: NLluís Vilanova <vilanova@ac.upc.edu> Signed-off-by: NStefan Hajnoczi <stefanha@redhat.com>
-
由 Lluís Vilanova 提交于
Signed-off-by: NLluís Vilanova <vilanova@ac.upc.edu> Signed-off-by: NStefan Hajnoczi <stefanha@redhat.com>
-
由 Lluís Vilanova 提交于
Signed-off-by: NLluís Vilanova <vilanova@ac.upc.edu> Signed-off-by: NStefan Hajnoczi <stefanha@redhat.com>
-
由 Lluís Vilanova 提交于
Signed-off-by: NLluís Vilanova <vilanova@ac.upc.edu> Signed-off-by: NStefan Hajnoczi <stefanha@redhat.com>
-
由 Lluís Vilanova 提交于
Makes it easier to ensure proper naming across the different frontends and backends. Signed-off-by: NLluís Vilanova <vilanova@ac.upc.edu> Signed-off-by: NStefan Hajnoczi <stefanha@redhat.com>
-
- 02 5月, 2012 2 次提交
-
-
由 Stefan Hajnoczi 提交于
The str.rpartition() function is related to str.split() and is used for splitting strings. It was introduced in Python 2.5 and therefore cannot be used in tracetool as Python 2.4 compatibility is required. Replace the code using str.rsplit(). Signed-off-by: NStefan Hajnoczi <stefanha@linux.vnet.ibm.com> Reviewed-by: NLluís Vilanova <vilanova@ac.upc.edu>
-
由 Stefan Hajnoczi 提交于
In Python 2.5 keyword arguments were added to __import__(). Avoid using them to achieve Python 2.4 compatibility. Signed-off-by: NStefan Hajnoczi <stefanha@linux.vnet.ibm.com> Reviewed-by: NLluís Vilanova <vilanova@ac.upc.edu>
-
- 18 4月, 2012 2 次提交
-
-
由 Lluís Vilanova 提交于
Signed-off-by: NLluís Vilanova <vilanova@ac.upc.edu> Signed-off-by: NStefan Hajnoczi <stefanha@linux.vnet.ibm.com>
-
由 Lluís Vilanova 提交于
The tracetool script is written in shell and has hit several portability problems due to shell quirks or external tools across host platforms. Additionally the amount of string processing and lack of real data structures makes it tough to implement code generator backends for tracers that are more complex. This patch replaces the shell version of tracetool with a Python version. The new tracetool design is: scripts/tracetool.py - top-level script scripts/tracetool/backend/ - tracer backends live here (simple, ust) scripts/tracetool/format/ - output formats live here (.c, .h) There is common code for trace-events definition parsing so that backends can focus on generating code rather than parsing input. Support for all existing backends (nop, stderr, simple, ust, and dtrace) is added back in follow-up patches. [Commit description written by Stefan Hajnoczi] Signed-off-by: NLluís Vilanova <vilanova@ac.upc.edu> Signed-off-by: NStefan Hajnoczi <stefanha@linux.vnet.ibm.com>
-