Added indication of idle/throttling capabilities and the OS clock tick size to the SHOW VERSION output

This commit is contained in:
Mark Pizzolato 2013-03-14 11:37:31 -07:00
parent 28f645aeab
commit b31dc88d0d
3 changed files with 15 additions and 0 deletions

5
scp.c
View file

@ -2745,10 +2745,14 @@ if (vdelt)
fprintf (st, " %s", SIM_VERSION_MODE);
#endif
if (flag) {
uint32 idle_capable, os_tick_size;
fprintf (st, "\n\tSimulator Framework Capabilities:");
fprintf (st, "\n\t\t%s", sim_si64);
fprintf (st, "\n\t\t%s", sim_sa64);
fprintf (st, "\n\t\t%s", sim_snet);
idle_capable = sim_timer_idle_capable (&os_tick_size);
fprintf (st, "\n\t\tIdle/Throttling support is %savailable", ((idle_capable == 0) ? "NOT " : ""));
fprintf (st, "\n\t\t%s", sim_taddr_64 ? "Large File (>2GB) support" : "No Large File support");
if (sim_disk_vhd_support())
fprintf (st, "\n\t\tVirtual Hard Disk (VHD) support");
@ -2775,6 +2779,7 @@ if (flag) {
fflush (st);
system ("uname -a");
#endif
fprintf (st, "\n\t\tOS clock tick size: %dms", os_tick_size);
}
#if defined(SIM_GIT_COMMIT_ID)
#define S_xstr(a) S_str(a)

View file

@ -699,6 +699,15 @@ sim_idle_rate_ms = sim_os_ms_sleep_init (); /* get OS timer rate */
return (sim_idle_rate_ms != 0);
}
/* sim_timer_idle_capable - tell if the host is Idle capable and what the host OS tick size is */
uint32 sim_timer_idle_capable (uint32 *hoat_tick_ms)
{
if (hoat_tick_ms)
*hoat_tick_ms = sim_os_sleep_min_ms;
return sim_idle_rate_ms;
}
/* sim_show_timers - show running timer information */
t_stat sim_show_timers (FILE* st, DEVICE *dptr, UNIT* uptr, int32 val, char* desc)

View file

@ -115,6 +115,7 @@ t_stat sim_timer_activate_after (UNIT *uptr, int32 usec_delay);
t_stat sim_register_clock_unit (UNIT *uptr);
t_stat sim_clock_coschedule (UNIT *uptr, int32 interval);
double sim_timer_inst_per_sec (void);
uint32 sim_timer_idle_capable (uint32 *hoat_tick_ms);
extern t_bool sim_idle_enab; /* idle enabled flag */
extern volatile t_bool sim_idle_wait; /* idle waiting flag */