Skip to content

Immutable QString, and also one JSON writer less

Markus Armbruster qemu-devel 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest20 patches 15 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/20hmp: Simplify how qmp_human_monitor_command() gets outputmonitor/misc.c+1 -51 reply
2/20monitor: Use GString instead of QString for output buffermonitor/misc.c monitor/monitor-internal.h monitor/monitor.c+10 -141 reply
3/20qobject: Make qobject_to_json_pretty() take a pretty argumentinclude/qapi/qmp/qjson.h monitor/qmp.c qemu-img.c +3 more+19 -250 replies
4/20qobject: Use GString instead of QString to accumulate JSONinclude/qapi/qmp/qstring.h qobject/qjson.c qobject/qstring.c+58 -470 replies
5/20qobject: Change qobject_to_json()'s value to GStringblock.c block/rbd.c include/qapi/qmp/qjson.h +9 more+79 -932 replies
6/20Revert "qstring: add qstring_free()"include/qapi/qmp/qstring.h qobject/qstring.c+5 -230 replies
7/20hw/rdma: Replace QList by GQueuehw/rdma/rdma_backend.c hw/rdma/rdma_backend_defs.h hw/rdma/rdma_utils.c +1 more+30 -260 replies
8/20qobject: Move internals to qobject-internal.hinclude/qapi/qmp/qbool.h include/qapi/qmp/qdict.h include/qapi/qmp/qlist.h +12 more+47 -210 replies
9/20qmp: Fix tracing of non-string command IDsmonitor/qmp.c+18 -120 replies
10/20block: Avoid qobject_get_try_str()block.c+3 -31 reply
11/20Revert "qobject: let object_property_get_str() use new API"qom/object.c+6 -31 reply
12/20qobject: Drop qobject_get_try_str()include/qapi/qmp/qstring.h qobject/qstring.c+0 -120 replies
13/20qobject: Drop qstring_get_try_str()include/qapi/qmp/qstring.h qobject/qstring.c tests/check-qjson.c+5 -170 replies
14/20qobject: Factor quoted_str() out of to_json()qobject/qjson.c+54 -560 replies
15/20qobject: Factor JSON writer out of qobject_to_json()include/qapi/qmp/json-writer.h qobject/json-writer.c qobject/meson.build +2 more+318 -1010 replies
16/20migration: Replace migration's JSON writer by the general onehw/display/virtio-gpu.c hw/intc/s390_flic_kvm.c hw/nvram/eeprom93xx.c +26 more+114 -2534 replies
17/20json: Use GString instead of QString to accumulate stringsqobject/json-parser.c+15 -150 replies
18/20keyval: Use GString to accumulate value stringsutil/keyval.c+6 -53 replies
19/20block: Use GString instead of QString to build filenamesblock.c+6 -51 reply
20/20qobject: Make QString immutableinclude/qapi/qmp/qstring.h qobject/qstring.c tests/check-qobject.c +1 more+4 -880 replies

Reviews trailers per patch

6 of 20 patches have a Reviewed-by or Acked-by.

PatchVladimir Sementsov-OgievskiyEduardo HabkostDr. David Alan Gilbert
1/20R-b
2/20R-b
3/20
4/20
5/20
6/20
7/20
8/20
9/20
10/20R-b
11/20R-b
12/20
13/20
14/20
15/20
16/20R-b
17/20
18/20
19/20R-b
20/20

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes. Scroll the table sideways for all 3 reviewers.

Read the v1 thread

Cover letter [PATCH 00/20] Immutable QString, and also one JSON writer less

Based-on: <[email protected]>

Cc Daniel P. Berrangé <[email protected]>
Cc Dr. David Alan Gilbert <[email protected]>
Cc Eduardo Habkost <[email protected]>
Cc Juan Quintela <[email protected]>
Cc Kevin Wolf <[email protected]>
Cc Marcel Apfelbaum <[email protected]>
Cc Max Reitz <[email protected]>
Cc Paolo Bonzini <[email protected]>
Cc Yuval Shaia <[email protected]>

Markus Armbruster (20):
hmp: Simplify how qmp_human_monitor_command() gets output
monitor: Use GString instead of QString for output buffer
qobject: Make qobject_to_json_pretty() take a pretty argument
qobject: Use GString instead of QString to accumulate JSON
qobject: Change qobject_to_json()'s value to GString Revert "qstring: add qstring_free()"
hw/rdma: Replace QList by GQueue
qobject: Move internals to qobject-internal.h
qmp: Fix tracing of non-string command IDs
block: Avoid qobject_get_try_str()
Revert "qobject: let object_property_get_str() use new API"
qobject: Drop qobject_get_try_str()
qobject: Drop qstring_get_try_str()
qobject: Factor quoted_str() out of to_json()
qobject: Factor JSON writer out of qobject_to_json()
migration: Replace migration's JSON writer by the general one
json: Use GString instead of QString to accumulate strings
keyval: Use GString to accumulate value strings
block: Use GString instead of QString to build filenames
qobject: Make QString immutable

 hw/rdma/rdma_backend_defs.h        |   2 +-
 hw/rdma/rdma_utils.h               |  15 +-
 include/migration/vmstate.h        |   7 +-
 include/qapi/qmp/json-writer.h     |  35 ++++
 include/qapi/qmp/qbool.h           |   2 -
 include/qapi/qmp/qdict.h           |   2 -
 include/qapi/qmp/qjson.h           |   4 +-
 include/qapi/qmp/qlist.h           |   2 -
 include/qapi/qmp/qnull.h           |   2 -
 include/qapi/qmp/qnum.h            |   3 -
 include/qapi/qmp/qobject.h         |   9 +-
 include/qapi/qmp/qstring.h         |  14 +-
 include/qemu/typedefs.h            |   4 +-
 migration/qjson.h                  |  29 ----
 monitor/monitor-internal.h         |   2 +-
 qobject/qobject-internal.h         |  39 +++++
 block.c                            |  23 +--
 block/rbd.c                        |   2 +-
 hw/display/virtio-gpu.c            |   2 +-
 hw/intc/s390_flic_kvm.c            |   2 +-
 hw/nvram/eeprom93xx.c              |   2 +-
 hw/nvram/fw_cfg.c                  |   2 +-
 hw/pci/msix.c                      |   2 +-
 hw/pci/pci.c                       |   4 +-
 hw/pci/shpc.c                      |   2 +-
 hw/rdma/rdma_backend.c             |  10 +-
 hw/rdma/rdma_utils.c               |  29 ++--
 hw/rtc/twl92230.c                  |   2 +-
 hw/scsi/scsi-bus.c                 |   2 +-
 hw/usb/redirect.c                  |   7 +-
 hw/virtio/virtio.c                 |   4 +-
 migration/qjson.c                  | 114 -------------
 migration/savevm.c                 |  53 ++++---
 migration/vmstate-types.c          |  38 ++---
 migration/vmstate.c                |  52 +++---
 monitor/misc.c                     |   6 +-
 monitor/monitor.c                  |  20 +--
 monitor/qmp.c                      |  46 +++---
 qemu-img.c                         |  33 ++--
 qga/main.c                         |  22 +--
 qobject/json-parser.c              |  30 ++--
 qobject/json-writer.c              | 247 +++++++++++++++++++++++++++++
 qobject/qbool.c                    |   1 +
 qobject/qdict.c                    |   1 +
 qobject/qjson.c                    | 144 ++++-------------
 qobject/qlist.c                    |   1 +
 qobject/qnull.c                    |   1 +
 qobject/qnum.c                     |   6 +-
 qobject/qobject.c                  |   1 +
 qobject/qstring.c                  | 117 +++-----------
 qom/object.c                       |   9 +-
 qom/object_interfaces.c            |   4 +-
 qom/qom-hmp-cmds.c                 |   7 +-
 target/alpha/machine.c             |   2 +-
 target/arm/machine.c               |   6 +-
 target/avr/machine.c               |   4 +-
 target/hppa/machine.c              |   4 +-
 target/microblaze/machine.c        |   2 +-
 target/mips/machine.c              |   4 +-
 target/openrisc/machine.c          |   2 +-
 target/ppc/machine.c               |  10 +-
 target/sparc/machine.c             |   2 +-
 tests/check-qjson.c                |  67 ++++----
 tests/check-qobject.c              |   3 +-
 tests/check-qstring.c              |  16 --
 tests/qtest/libqtest.c             |  20 ++-
 tests/test-visitor-serialization.c |   6 +-
 util/keyval.c                      |  11 +-
 migration/meson.build              |   1 -
 qobject/meson.build                |   5 +-
 70 files changed, 679 insertions(+), 705 deletions(-)
 create mode 100644 include/qapi/qmp/json-writer.h
 delete mode 100644 migration/qjson.h
 create mode 100644 qobject/qobject-internal.h
 delete mode 100644 migration/qjson.c
 create mode 100644 qobject/json-writer.c
Signature · 1 line
2.26.2