Embedded PowerPC Device Control Registers infrastructure.
[qemu] / monitor.c
index 43ebe01..86b1f38 100644 (file)
--- a/monitor.c
+++ b/monitor.c
@@ -235,6 +235,12 @@ static void do_info_version(void)
   term_printf("%s\n", QEMU_VERSION);
 }
 
+static void do_info_name(void)
+{
+    if (qemu_name)
+        term_printf("%s\n", qemu_name);
+}
+
 static void do_info_block(void)
 {
     bdrv_info();
@@ -331,6 +337,17 @@ static void do_info_history (void)
     }
 }
 
+#if defined(TARGET_PPC)
+/* XXX: not implemented in other targets */
+static void do_info_cpu_stats (void)
+{
+    CPUState *env;
+
+    env = mon_get_cpu();
+    cpu_dump_statistics(env, NULL, &monitor_fprintf, 0);
+}
+#endif
+
 static void do_quit(void)
 {
     exit(0);
@@ -1198,9 +1215,9 @@ static term_cmd_t term_cmds[] = {
     { "q|quit", "", do_quit,
       "", "quit the emulator" },
     { "eject", "-fB", do_eject,
-      "[-f] device", "eject a removable media (use -f to force it)" },
+      "[-f] device", "eject a removable medium (use -f to force it)" },
     { "change", "BF", do_change,
-      "device filename", "change a removable media" },
+      "device filename", "change a removable medium" },
     { "screendump", "F", do_screen_dump, 
       "filename", "save screen into PPM image 'filename'" },
     { "log", "s", do_log,
@@ -1303,6 +1320,12 @@ static term_cmd_t info_cmds[] = {
       "", "show which guest mouse is receiving events" },
     { "vnc", "", do_info_vnc,
       "", "show the vnc server status"},
+    { "name", "", do_info_name,
+      "", "show the current VM name" },
+#if defined(TARGET_PPC)
+    { "cpustats", "", do_info_cpu_stats,
+      "", "show CPU statistics", },
+#endif
     { NULL, NULL, },
 };