This is the mail archive of the sid@sources.redhat.com mailing list for the SID project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: [patch][RFA]: Sid scheduling for debugging multiple cpus


Approved by fche and committed along with updates to 
sid/component/sched/sid-sched.xml and .txt

Dave

Dave Brolley wrote:

> Hi,
>
> A while back I checked in a patch which allows multiple GDB debuggers 
> to be connected to multiple processors in a sid simulation (see 
> --gdbport option). This patch completes the work by modifying the 
> scheduler component to allow the system to remain coherent which under 
> the control of these multiple debuggers.
>
> The basic idea is that the target-scheduler's 'enabled?' attribute is 
> no longer a toggle (on or off) but rather is now a value which is 
> incremented or decremented. Similarly for the 'yield-host-time?' 
> attribute. In addition there are new attributes: 'enable-threshold' 
> and 'yield-host-time-threshold'. With the old boolean attributes, the 
> scheduler was enabled when the 'enabled?' attribute was non zero and 
> the scheduler could yield when 'yield-host-time' was non zero. Now 
> these activities occur when the value of the attribute is equal to, or 
> greater than the corresponding threshold.
>
> This is required for a multiple GDB simulation since we want the 
> simulation to proceed iff all of the gdb components believe that the 
> target is running. If one or more GDBs believe that the target is 
> stopped, then it will be. The others will simply believe that the 
> target is taking a long time to run. Similarly, the scheduler may 
> yield if one or more of the GDBs believe that the target is stopped.
>
> This is accomplished in the configuration by setting the 
> 'enable-threshold' to the number of GDBs controlling the simulation. 
> The 'enable?' attribute is incremented by each GDB as the user 
> instructs each to run the target in some way (i.e. continue, step, 
> etc). Similarly, 'yield-host-time-threshold' is set to 1 and 
> 'yield-host-time' initialized to the number of GDBs. This attribute is 
> decremented as each GDB tries to run the target. Thus the host 
> scheduler may yield when the target is stopped and may yield when the 
> target is actually running.
>
> The default values are enable-threshold==1 and 
> yield-host-time-threshold==1 which allow single-GDB and non-GDB 
> simulations to run as expected.
>
> This patch has been tested on m32r as well as 2 internal ports.




Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]