[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH v9 11/21] replay: introduce info hmp/qmp command
From: |
Pavel Dovgalyuk |
Subject: |
Re: [Qemu-devel] [PATCH v9 11/21] replay: introduce info hmp/qmp command |
Date: |
Mon, 14 Jan 2019 12:01:21 +0300 |
> From: Markus Armbruster [mailto:address@hidden
> Pavel Dovgalyuk <address@hidden> writes:
> > diff --git a/replay/replay-debugging.c b/replay/replay-debugging.c
> > new file mode 100644
> > index 0000000..9956405
> > --- /dev/null
> > +++ b/replay/replay-debugging.c
>
> The file name suggests the instruction count is just for debugging. If
> that's true, the documentation should mention it. Else, the file should
> be named less misleadingly, perhaps replay-control.c.
The main purpose of this file is providing an implementation of reverse
debugging methods.
Querying the rr information is mostly for debugging/problem solving too.
(until someone suggests any other manner of using these functions)
>
> > @@ -0,0 +1,42 @@
> > +/*
> > + * replay-debugging.c
> > + *
> > + * Copyright (c) 2010-2018 Institute for System Programming
> > + * of the Russian Academy of Sciences.
> > + *
> > + * This work is licensed under the terms of the GNU GPL, version 2 or
> > later.
> > + * See the COPYING file in the top-level directory.
> > + *
> > + */
> > +
> > +#include "qemu/osdep.h"
> > +#include "qapi/error.h"
> > +#include "sysemu/replay.h"
> > +#include "replay-internal.h"
> > +#include "hmp.h"
> > +#include "monitor/monitor.h"
> > +#include "qapi/qapi-commands-replay.h"
> > +
> > +void hmp_info_replay(Monitor *mon, const QDict *qdict)
> > +{
> > + if (replay_mode == REPLAY_MODE_NONE) {
> > + monitor_printf(mon, "No record/replay\n");
>
> Perhaps something like "Record/replay not active" would be friendlier.
>
> > + } else {
> > + monitor_printf(mon, "%s execution '%s': current step =
> > %"PRId64"\n",
> > + replay_mode == REPLAY_MODE_RECORD ? "Recording" : "Replaying",
> > + replay_get_filename(), replay_get_current_step());
>
> You improved documentation to consistently say "instruction count". The
> code still calls it current_step. So does the HMP UI here. In your
> shoes, I'd go all the way. Consistent terminology really helps
> readers. Advice, not demand.
Sounds reasonable. I'll probably refactor replay_get_current_step() too.
Pavel Dovgalyuk
- [Qemu-devel] [PATCH v9 07/21] qcow2: introduce icount field for snapshots, (continued)
- [Qemu-devel] [PATCH v9 07/21] qcow2: introduce icount field for snapshots, Pavel Dovgalyuk, 2019/01/09
- [Qemu-devel] [PATCH v9 08/21] migration: introduce icount field for snapshots, Pavel Dovgalyuk, 2019/01/09
- [Qemu-devel] [PATCH v9 09/21] replay: provide and accessor for rr filename, Pavel Dovgalyuk, 2019/01/09
- [Qemu-devel] [PATCH v9 10/21] qapi: introduce replay.json for record/replay-related stuff, Pavel Dovgalyuk, 2019/01/09
- [Qemu-devel] [PATCH v9 11/21] replay: introduce info hmp/qmp command, Pavel Dovgalyuk, 2019/01/09
- [Qemu-devel] [PATCH v9 12/21] replay: introduce breakpoint at the specified step, Pavel Dovgalyuk, 2019/01/09
- [Qemu-devel] [PATCH v9 13/21] replay: implement replay-seek command to proceed to the desired step, Pavel Dovgalyuk, 2019/01/09
- [Qemu-devel] [PATCH v9 14/21] replay: refine replay-time module, Pavel Dovgalyuk, 2019/01/09
- [Qemu-devel] [PATCH v9 15/21] replay: flush rr queue before loading the vmstate, Pavel Dovgalyuk, 2019/01/09
- [Qemu-devel] [PATCH v9 16/21] gdbstub: add reverse step support in replay mode, Pavel Dovgalyuk, 2019/01/09
- [Qemu-devel] [PATCH v9 17/21] gdbstub: add reverse continue support in replay mode, Pavel Dovgalyuk, 2019/01/09
- [Qemu-devel] [PATCH v9 18/21] replay: describe reverse debugging in docs/replay.txt, Pavel Dovgalyuk, 2019/01/09