Revision 4a1418e0 monitor.c
b/monitor.c | ||
---|---|---|
1390 | 1390 |
|
1391 | 1391 |
#endif |
1392 | 1392 |
|
1393 |
static void do_info_kqemu(Monitor *mon) |
|
1394 |
{ |
|
1395 |
#ifdef CONFIG_KQEMU |
|
1396 |
CPUState *env; |
|
1397 |
int val; |
|
1398 |
val = 0; |
|
1399 |
env = mon_get_cpu(); |
|
1400 |
if (!env) { |
|
1401 |
monitor_printf(mon, "No cpu initialized yet"); |
|
1402 |
return; |
|
1403 |
} |
|
1404 |
val = env->kqemu_enabled; |
|
1405 |
monitor_printf(mon, "kqemu support: "); |
|
1406 |
switch(val) { |
|
1407 |
default: |
|
1408 |
case 0: |
|
1409 |
monitor_printf(mon, "disabled\n"); |
|
1410 |
break; |
|
1411 |
case 1: |
|
1412 |
monitor_printf(mon, "enabled for user code\n"); |
|
1413 |
break; |
|
1414 |
case 2: |
|
1415 |
monitor_printf(mon, "enabled for user and kernel code\n"); |
|
1416 |
break; |
|
1417 |
} |
|
1418 |
#else |
|
1419 |
monitor_printf(mon, "kqemu support: not compiled\n"); |
|
1420 |
#endif |
|
1421 |
} |
|
1422 |
|
|
1423 | 1393 |
static void do_info_kvm(Monitor *mon) |
1424 | 1394 |
{ |
1425 | 1395 |
#ifdef CONFIG_KVM |
... | ... | |
1454 | 1424 |
|
1455 | 1425 |
#ifdef CONFIG_PROFILER |
1456 | 1426 |
|
1457 |
int64_t kqemu_time; |
|
1458 |
int64_t qemu_time; |
|
1459 |
int64_t kqemu_exec_count; |
|
1460 |
int64_t dev_time; |
|
1461 |
int64_t kqemu_ret_int_count; |
|
1462 |
int64_t kqemu_ret_excp_count; |
|
1463 |
int64_t kqemu_ret_intr_count; |
|
1464 |
|
|
1465 | 1427 |
static void do_info_profile(Monitor *mon) |
1466 | 1428 |
{ |
1467 | 1429 |
int64_t total; |
... | ... | |
1472 | 1434 |
dev_time, dev_time / (double)ticks_per_sec); |
1473 | 1435 |
monitor_printf(mon, "qemu time %" PRId64 " (%0.3f)\n", |
1474 | 1436 |
qemu_time, qemu_time / (double)ticks_per_sec); |
1475 |
monitor_printf(mon, "kqemu time %" PRId64 " (%0.3f %0.1f%%) count=%" |
|
1476 |
PRId64 " int=%" PRId64 " excp=%" PRId64 " intr=%" |
|
1477 |
PRId64 "\n", |
|
1478 |
kqemu_time, kqemu_time / (double)ticks_per_sec, |
|
1479 |
kqemu_time / (double)total * 100.0, |
|
1480 |
kqemu_exec_count, |
|
1481 |
kqemu_ret_int_count, |
|
1482 |
kqemu_ret_excp_count, |
|
1483 |
kqemu_ret_intr_count); |
|
1484 | 1437 |
qemu_time = 0; |
1485 |
kqemu_time = 0; |
|
1486 |
kqemu_exec_count = 0; |
|
1487 | 1438 |
dev_time = 0; |
1488 |
kqemu_ret_int_count = 0; |
|
1489 |
kqemu_ret_excp_count = 0; |
|
1490 |
kqemu_ret_intr_count = 0; |
|
1491 |
#ifdef CONFIG_KQEMU |
|
1492 |
kqemu_record_dump(); |
|
1493 |
#endif |
|
1494 | 1439 |
} |
1495 | 1440 |
#else |
1496 | 1441 |
static void do_info_profile(Monitor *mon) |
... | ... | |
1841 | 1786 |
#endif |
1842 | 1787 |
{ "jit", "", do_info_jit, |
1843 | 1788 |
"", "show dynamic compiler info", }, |
1844 |
{ "kqemu", "", do_info_kqemu, |
|
1845 |
"", "show KQEMU information", }, |
|
1846 | 1789 |
{ "kvm", "", do_info_kvm, |
1847 | 1790 |
"", "show KVM information", }, |
1848 | 1791 |
{ "numa", "", do_info_numa, |
Also available in: Unified diff