- add BX_SCHEDULED_DIE_TIME which causes Bochs to exit automatically after a
certain number of instructions. I use it for performance testing, and it won't hurt anyone unless they are foolish enough to enable it in config.h. Of course it is disabled by default!
This commit is contained in:
parent
572fc4ed57
commit
ffc84c8be9
@ -620,4 +620,10 @@ typedef unsigned int Boolean;
|
||||
#define BX_CDROM_NAME "CD-ROM"
|
||||
#endif
|
||||
|
||||
// This is handy for certain performance testing purposes, but otherwise
|
||||
// totally useless. If you define BX_SCHEDULED_DIE_TIME then it enables code
|
||||
// in bx_pit_c::periodic that will cause Bochs to exit() after a certain number
|
||||
// of instructions.
|
||||
//#define BX_SCHEDULED_DIE_TIME 1162230000 // end of redhat6.0 boot
|
||||
|
||||
#endif // _BX_CONFIG_H
|
||||
|
@ -1,5 +1,5 @@
|
||||
/////////////////////////////////////////////////////////////////////////
|
||||
// $Id: pit_wrap.cc,v 1.20 2002-08-27 19:54:46 bdenney Exp $
|
||||
// $Id: pit_wrap.cc,v 1.21 2002-09-01 15:38:29 bdenney Exp $
|
||||
/////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Copyright (C) 2002 MandrakeSoft S.A.
|
||||
@ -404,6 +404,13 @@ bx_pit_c::periodic( Bit32u usec_delta )
|
||||
Boolean want_interrupt = 0;
|
||||
Bit32u ticks_delta = 0;
|
||||
|
||||
#ifdef BX_SCHEDULED_DIE_TIME
|
||||
if (bx_pc_system.time_ticks() > BX_SCHEDULED_DIE_TIME) {
|
||||
BX_ERROR (("ticks exceeded scheduled die time, quitting"));
|
||||
BX_EXIT (2);
|
||||
}
|
||||
#endif
|
||||
|
||||
#if BX_USE_REALTIME_PIT
|
||||
ticks_delta=(Bit32u)(USEC_TO_TICKS(usec_delta));
|
||||
if((BX_PIT_THIS s.total_ticks + ticks_delta) < (BX_PIT_THIS s.max_ticks)) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user