* [Qemu-devel] [PATCH] show register info for all cpus
@ 2008-07-24 18:25 Glauber Costa
2008-07-24 18:39 ` Anthony Liguori
0 siblings, 1 reply; 4+ messages in thread
From: Glauber Costa @ 2008-07-24 18:25 UTC (permalink / raw)
To: qemu-devel
Currently, we only do a register dump for mon_cpu().
Modify do_info_registers() in order to show what's
going on in all of them.
Signed-off-by: Glauber Costa <gcosta@redhat.com>
---
qemu/monitor.c | 18 +++++++++++-------
1 files changed, 11 insertions(+), 7 deletions(-)
diff --git a/qemu/monitor.c b/qemu/monitor.c
index 20dcca6..045eecb 100644
--- a/qemu/monitor.c
+++ b/qemu/monitor.c
@@ -292,16 +292,20 @@ static CPUState *mon_get_cpu(void)
static void do_info_registers(void)
{
CPUState *env;
- env = mon_get_cpu();
- if (!env)
- return;
+
+ mon_get_cpu();
+
+ for(env = first_cpu; env != NULL; env = env->next_cpu) {
+ term_printf("CPU: %d\n", env->cpu_index);
#ifdef TARGET_I386
- cpu_dump_state(env, NULL, monitor_fprintf,
- X86_DUMP_FPU);
+ cpu_dump_state(env, NULL, monitor_fprintf,
+ X86_DUMP_FPU);
#else
- cpu_dump_state(env, NULL, monitor_fprintf,
- 0);
+ cpu_dump_state(env, NULL, monitor_fprintf,
+ 0);
#endif
+ }
+ term_printf("\n");
}
static void do_info_cpus(void)
--
1.5.5.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [Qemu-devel] [PATCH] show register info for all cpus
2008-07-24 18:25 [Qemu-devel] [PATCH] show register info for all cpus Glauber Costa
@ 2008-07-24 18:39 ` Anthony Liguori
2008-07-24 19:28 ` Glauber Costa
0 siblings, 1 reply; 4+ messages in thread
From: Anthony Liguori @ 2008-07-24 18:39 UTC (permalink / raw)
To: qemu-devel
Glauber Costa wrote:
> Currently, we only do a register dump for mon_cpu().
> Modify do_info_registers() in order to show what's
> going on in all of them.
>
The currently implemented behaviour is to allow the 'cpu' command to
determine which CPU the various monitor commands operate with (including
info registers). This is pretty consistent throughout the monitor.
Do you disagree with this behaviour or were you just not aware of it?
It's unclear from the description in your patch.
Regards,
Anthony Liguori
> Signed-off-by: Glauber Costa <gcosta@redhat.com>
> ---
> qemu/monitor.c | 18 +++++++++++-------
> 1 files changed, 11 insertions(+), 7 deletions(-)
>
> diff --git a/qemu/monitor.c b/qemu/monitor.c
> index 20dcca6..045eecb 100644
> --- a/qemu/monitor.c
> +++ b/qemu/monitor.c
> @@ -292,16 +292,20 @@ static CPUState *mon_get_cpu(void)
> static void do_info_registers(void)
> {
> CPUState *env;
> - env = mon_get_cpu();
> - if (!env)
> - return;
> +
> + mon_get_cpu();
> +
> + for(env = first_cpu; env != NULL; env = env->next_cpu) {
> + term_printf("CPU: %d\n", env->cpu_index);
> #ifdef TARGET_I386
> - cpu_dump_state(env, NULL, monitor_fprintf,
> - X86_DUMP_FPU);
> + cpu_dump_state(env, NULL, monitor_fprintf,
> + X86_DUMP_FPU);
> #else
> - cpu_dump_state(env, NULL, monitor_fprintf,
> - 0);
> + cpu_dump_state(env, NULL, monitor_fprintf,
> + 0);
> #endif
> + }
> + term_printf("\n");
> }
>
> static void do_info_cpus(void)
>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [Qemu-devel] [PATCH] show register info for all cpus
2008-07-24 18:39 ` Anthony Liguori
@ 2008-07-24 19:28 ` Glauber Costa
2008-07-24 19:51 ` Anthony Liguori
0 siblings, 1 reply; 4+ messages in thread
From: Glauber Costa @ 2008-07-24 19:28 UTC (permalink / raw)
To: qemu-devel
On Thu, Jul 24, 2008 at 3:39 PM, Anthony Liguori <anthony@codemonkey.ws> wrote:
> Glauber Costa wrote:
>>
>> Currently, we only do a register dump for mon_cpu().
>> Modify do_info_registers() in order to show what's
>> going on in all of them.
>>
>
> The currently implemented behaviour is to allow the 'cpu' command to
> determine which CPU the various monitor commands operate with (including
> info registers). This is pretty consistent throughout the monitor.
>
> Do you disagree with this behaviour or were you just not aware of it? It's
> unclear from the description in your patch.
More like not aware. Although I did know about it (in the past), I was
short termed influenced by "info cpus" output. Maybe we should show
just one of them at info cpus, for consistency ?
> Regards,
>
> Anthony Liguori
>
>> Signed-off-by: Glauber Costa <gcosta@redhat.com>
>> ---
>> qemu/monitor.c | 18 +++++++++++-------
>> 1 files changed, 11 insertions(+), 7 deletions(-)
>>
>> diff --git a/qemu/monitor.c b/qemu/monitor.c
>> index 20dcca6..045eecb 100644
>> --- a/qemu/monitor.c
>> +++ b/qemu/monitor.c
>> @@ -292,16 +292,20 @@ static CPUState *mon_get_cpu(void)
>> static void do_info_registers(void)
>> {
>> CPUState *env;
>> - env = mon_get_cpu();
>> - if (!env)
>> - return;
>> +
>> + mon_get_cpu();
>> +
>> + for(env = first_cpu; env != NULL; env = env->next_cpu) {
>> + term_printf("CPU: %d\n", env->cpu_index);
>> #ifdef TARGET_I386
>> - cpu_dump_state(env, NULL, monitor_fprintf,
>> - X86_DUMP_FPU);
>> + cpu_dump_state(env, NULL, monitor_fprintf,
>> + X86_DUMP_FPU);
>> #else
>> - cpu_dump_state(env, NULL, monitor_fprintf,
>> - 0);
>> + cpu_dump_state(env, NULL, monitor_fprintf,
>> + 0);
>> #endif
>> + }
>> + term_printf("\n");
>> }
>> static void do_info_cpus(void)
>>
>
>
>
>
--
Glauber Costa.
"Free as in Freedom"
http://glommer.net
"The less confident you are, the more serious you have to act."
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [Qemu-devel] [PATCH] show register info for all cpus
2008-07-24 19:28 ` Glauber Costa
@ 2008-07-24 19:51 ` Anthony Liguori
0 siblings, 0 replies; 4+ messages in thread
From: Anthony Liguori @ 2008-07-24 19:51 UTC (permalink / raw)
To: qemu-devel
Glauber Costa wrote:
> On Thu, Jul 24, 2008 at 3:39 PM, Anthony Liguori <anthony@codemonkey.ws> wrote:
>
>> Do you disagree with this behaviour or were you just not aware of it? It's
>> unclear from the description in your patch.
>>
>
> More like not aware. Although I did know about it (in the past), I was
> short termed influenced by "info cpus" output. Maybe we should show
> just one of them at info cpus, for consistency ?
>
I would be afraid of breaking management applications that rely on the
output. Plus, 'info cpus' implies information about multiple cpus :-)
Regards,
Anthony Liguori
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2008-07-24 19:52 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-07-24 18:25 [Qemu-devel] [PATCH] show register info for all cpus Glauber Costa
2008-07-24 18:39 ` Anthony Liguori
2008-07-24 19:28 ` Glauber Costa
2008-07-24 19:51 ` Anthony Liguori
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).