Re: [Qemu-devel] [PATCH] Add interface to traverse the qmp command list by QmpCommand

2013-09-27 Thread Michael Roth
Quoting Mark Wu (2013-09-25 20:56:39) > In the original code, qmp_get_command_list is used to construct > a list of all commands' name. To get the information of all qga > commands, it traverses the name list and search the command info > with its name. So it can cause O(n^2) in the number of comm

Re: [Qemu-devel] [PATCH] Add interface to traverse the qmp command list by QmpCommand

2013-09-27 Thread Michael Roth
Quoting Eric Blake (2013-09-25 21:57:39) > On 09/25/2013 07:56 PM, Mark Wu wrote: > > In the original code, qmp_get_command_list is used to construct > > a list of all commands' name. To get the information of all qga > > commands, it traverses the name list and search the command info > > with its

Re: [Qemu-devel] [PATCH] Add interface to traverse the qmp command list by QmpCommand

2013-09-25 Thread Eric Blake
On 09/25/2013 07:56 PM, Mark Wu wrote: > In the original code, qmp_get_command_list is used to construct > a list of all commands' name. To get the information of all qga > commands, it traverses the name list and search the command info > with its name. So it can cause O(n^2) in the number of com

Re: [Qemu-devel] [PATCH] Add interface to traverse the qmp command list by QmpCommand

2013-09-25 Thread Mark Wu
It's verified by the following tests: 1. run ./qemu-ga -b help, it print a list of qga command names as expected 2. run ./guest-sync -b guest-ping, guest-sync command 'guest-info' show that guest-ping and guest-sync are disabled On Thu 26 Sep 2013 09:56:39 AM CST, Mark Wu wrote: In th

[Qemu-devel] [PATCH] Add interface to traverse the qmp command list by QmpCommand

2013-09-25 Thread Mark Wu
In the original code, qmp_get_command_list is used to construct a list of all commands' name. To get the information of all qga commands, it traverses the name list and search the command info with its name. So it can cause O(n^2) in the number of commands. This patch adds an interface to travers