implemented important CPU statistics which were used for Bochs CPU model performance analysis.
old statistics code from paging.cc and cpu.cc is replaced with new infrastructure.
In order to enale statitics collection in Bochs CPU:
- Enable statistics @ compilation time in cpu/cpustats.h
- Dump statistics periodically by adding -dumpstats N into Bochs command line
- fixed pluginlog init in non-plugin mode
- reduced logprefix length limit and use it for the related string parameter
- increase the device prefix size to 6
- TODO: change some more device prefixes
- fixed bochsrc line after a "raw byte" string parameter
- changed parameter name "macaddr" to "mac" (same as bochsrc option parameter)
- skip disabled parameters when building the bochsrc line
- added "multiline" switch to select the output format (one or multiple lines)
- renamed siminterface method and use it in the network devices code
- wxdialog: use symbols and allow log action ACT_IGNORE for LOGLEV_ERROR
- wxdialog: removed obsolete pass event
- TODO: fix win32dialog stuff in a similar way
in the config interface. Applied settings are marked as 'done' with the value
-1 to avoid unwanted modification. NOTE: Not all Bochs modules exist when
running the start menu / dialog.
option parsing to the plugin device code
- added function bx_init_usb_options() to reduce code duplication
- added log function names for 'usb_ohci' and 'usb_uhci'
- documentation updates
the device code. Added panic message to force the user to enable the plugin
with 'plugin_ctrl'.
- moved config parameter creation and bochsrc option parsing for device
'usb_xhci' to the plugin device code
- added minimal documentation for the "log action per device" feature
- added log function name for 'usb_xhci'
invalid module names, save log actions to bochsrc)
- added new member 'name' to the logfunctions class for the case the prefix
is too short. Added to some devices with longer names.
- IO intercept is not implemented yet
- MSR intercept is not implemented yet
VMX:
Fixed Bochs PANIC crash when doing I/O access crossing VMX I/O permission bitmaps.
This can happen because access_physical_read and access_physical_write cannot access memory cross 4K boundary.
directly while parsing the bochsrc or command line. If plugin support is enabled,
the option could load all optional plugins, not only the ones supported before.
NOTE #1: The old option had all plugins enabled by default and gave the user
a chance to diable them. Now the plugins are only loaded if they
appear in the config line and they are set to "1".
NOTE #2: Loading a plugin that is controlled by a bochsrc option is possible,
but it currently leads to a panic, since the load command is still
present in devices.cc.
NOTE #3: The plugin init code creates the device object and registers the
optional plugin device. As an option, it can create config parameters
and register an option parser. The device init, register state and
reset is still handled in devices.cc, but in the order the devices
have been loaded with the plugin control.
NOTE #4: If plugin support is disabled, the plugin control only accepts the
devices listed in plugin.cc.
- plugin init of core plugins now fails if they are not loaded with the expected
type. For core plugins the load order is important and they cannot be handled
with the chained devices list (used for optional and user plugins).
- some additions for calling config.cc functions from a plugin device
support compiles and links fine and the main object files for the plugin DLLs
are created. Since the gui and iodev makefiles are not ready yet, the link
stage must be done manually. Support for the search path defined in
LTDL_LIBRARY_PATH should be added when the DLL plugins compile and work.