qemu-devel
[Top][All Lists]
Advanced

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

Re: [PATCH v4 1/2] trace: Add support for recorder back-end


From: Markus Armbruster
Subject: Re: [PATCH v4 1/2] trace: Add support for recorder back-end
Date: Mon, 03 Aug 2020 13:49:50 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/26.3 (gnu/linux)

Christophe de Dinechin <dinechin@redhat.com> writes:

> The recorder library provides support for low-cost continuous
> recording of events, which can then be replayed. This makes it
> possible to collect data after the fact, for example to show the
> events that led to a crash or unexpected condition.
>
> In this series, minimal recorder support in qemu is implemented using
> the existing tracing interface. For each trace, a corresponding
> recorder is created with a generic name and a default size of 8 entries.
>
> In addition, it is possible to explicitly enable recorders that are
> not qemu traces, for example in order to use actually record events
> rather than trace them, or to use the real-time graphing capabilities.
> For that reason, a limited set of recorder-related macros are defined
> as no-ops even if the recorder trace backend is not configured.
>
> Recorder-specific features, notably the ability to perform a
> post-mortem dump and to group traces by topic, are not integrated in
> this series, as doing so would require modifying the trace
> infrastructure, which is a non-objective here. This may be the topic
> of later series if there is any interest for it.
>
> HMP COMMAND:
> The 'recorder' hmp command has been added, which supports two
> sub-commands:
> * recorder dump: Dump the current state of the recorder. You can
>   give that command a recorder name, to only dump that recorder.
> * recorder trace: Set traces using the recorder_trace_set() syntax.
>   You can use "recorder trace help" to list all available recorders.

Standard comment for patches adding HMP-only monitor commands:

In general, functionality available in HMP should also available in QMP.
Exceptions include functionality that makes no sense in QMP, or is of
use only for human users.  If you think your command is an exception,
please explain why in the commit message.

If it isn't, you need to implement it for QMP (including suitable test
cases), then rewrite the HMP version to reuse either the QMP command or
a common core.

Example for "makes no sense in QMP": setting the current CPU, because a
QMP monitor doesn't have a current CPU.

Examples for "is of use only for human users": HMP command "help", the
integrated pocket calculator.




reply via email to

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