mbox series

[v3,0/1] qga: add command 'guest-get-cpustats'

Message ID 20220706095111.686295-1-pizhenwei@bytedance.com (mailing list archive)
Headers show
Series qga: add command 'guest-get-cpustats' | expand

Message

zhenwei pi July 6, 2022, 9:51 a.m. UTC
v2 -> v3:
- Rename 'GuestOsType' to 'GuestCpuStatsType'.
- Add 'linux' into polluted_words, rename 'linuxos' to 'linux'. Remove
  'windows' from 'GuestCpuStatsType', because currently we don't use it.

v1 -> v2:
- Konstantin & Marc-André pointed out that the structure 'GuestCpuStats'
  is too *linux style*, so re-define it to 'GuestLinuxCpuStats', and use
  an union type of 'GuestCpuStats'.

- Modify comment info from 'man proc', also add linux version infomation.

- Test sscanf return value by '(i == EOF)' (To Marc-André: name is declared
  as 'char name[64];', so we can't test '!name').

- Suggested by Marc-André, use 'int clk_tck = sysconf(_SC_CLK_TCK);'
  instead of hard code.

v1:
- Implement guest agent command 'guest-get-cpustats'

Zhenwei Pi (1):
  qga: add command 'guest-get-cpustats'

 qga/commands-posix.c   | 89 ++++++++++++++++++++++++++++++++++++++++++
 qga/commands-win32.c   |  6 +++
 qga/qapi-schema.json   | 81 ++++++++++++++++++++++++++++++++++++++
 scripts/qapi/common.py |  2 +-
 4 files changed, 177 insertions(+), 1 deletion(-)