hmp: Add "calc_dirty_rate" and "info dirty_rate" cmds
PATCH v2 1/1 hmp: Add "calc_dirty_rate" and "info dirty_rate" cmds
These two commands are missing when adding the QMP sister commands. Add them, so developers can play with them easier.
---
v2:
- rebase to "migration/dirtyrate: make sample page count configurable"
--- hmp-commands-info.hx | 13 ++++++++++++ hmp-commands.hx | 14 +++++++++++++ include/monitor/hmp.h | 2 ++ migration/dirtyrate.c | 47 +++++++++++++++++++++++++++++++++++++++++++ 4 files changed, 76 insertions(+)
hmp-commands-info.hx +13 -0
@@ -880,3 +880,16 @@ SRST ``info replay`` Display the record/replay information: mode and the current icount. ERST + + { + .name = "dirty_rate", + .args_type = "", + .params = "", + .help = "show dirty rate information", + .cmd = hmp_info_dirty_rate, + }, + +SRST + ``info dirty_rate`` + Display the vcpu dirty rate information. +ERST
hmp-commands.hx +14 -0
@@ -1727,3 +1727,17 @@ ERST .flags = "p", }, +SRST +``calc_dirty_rate`` *second* + Start a round of dirty rate measurement with the period specified in *second*. + The result of the dirty rate measurement may be observed with ``info + dirty_rate`` command. +ERST + + { + .name = "calc_dirty_rate", + .args_type = "second:l,sample_pages_per_GB:l?", + .params = "second [sample_pages_per_GB]", + .help = "start a round of guest dirty rate measurement", + .cmd = hmp_calc_dirty_rate, + },
include/monitor/hmp.h +2 -0
@@ -129,5 +129,7 @@ void hmp_info_replay(Monitor *mon, const QDict *qdict);void hmp_replay_break (Monitor *mon,const QDict *qdict);void hmp_replay_delete_break (Monitor *mon,const QDict *qdict);void hmp_replay_seek (Monitor *mon,const QDict *qdict); +void hmp_info_dirty_rate (Monitor *mon,const QDict *qdict); +void hmp_calc_dirty_rate (Monitor *mon,const QDict *qdict);#endif
migration/dirtyrate.c +47 -0
56 lines not on this page · raw message
Signature · 1 line
2.31.1
Quoted 9 lines · Peter Xu
These two commands are missing when adding the QMP sister commands. Add them, so developers can play with them easier.
Cc Dr. David Alan Gilbert <[email protected]>Cc Juan Quintela <[email protected]>Cc Leonardo Bras Soares Passos <[email protected]>Cc Chuan Zheng <[email protected]>Signed-off-by Peter Xu <[email protected]>
Quoted 3 lines
---
v2:
- rebase to "migration/dirtyrate: make sample page count configurable"
Quoted 14 lines · Juan Quintela
Quoted 9 lines · Peter Xu
These two commands are missing when adding the QMP sister commands. Add them, so developers can play with them easier.
Cc Dr. David Alan Gilbert <[email protected]>Cc Juan Quintela <[email protected]>Cc Leonardo Bras Soares Passos <[email protected]>Cc Chuan Zheng <[email protected]>Signed-off-by Peter Xu <[email protected]>Quoted 3 lines
---
v2:
- rebase to "migration/dirtyrate: make sample page count configurable"
Quoted 1 line
Reviewed-by Juan Quintela <[email protected]>
It turns out this patch has landed upstream already. :-) but still thanks for the review (and welcome back)!
Signature · 1 line
Peter Xu