> On April 30, 2014, 3:13 a.m., Ali Saidi wrote:
> > Thanks for the patch Andrew.
> > 
> > My only hesitation is that this does seem to create another issue (probably 
> > a less likely one) where the simulator could try to really exit here and 
> > fail. That said it's probably good to fix this for now as the other issue 
> > is more hypothetical.
> 
> Andrew Lukefahr wrote:
>     Would it be better to just raise an exception?

no, this is probably fine. Just please add a comment in the code about what 
you're doing and it's limitations. 


- Ali


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
http://reviews.gem5.org/r/2228/#review5058
-----------------------------------------------------------


On April 22, 2014, 2:44 p.m., Andrew Lukefahr wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> http://reviews.gem5.org/r/2228/
> -----------------------------------------------------------
> 
> (Updated April 22, 2014, 2:44 p.m.)
> 
> 
> Review request for Default.
> 
> 
> Repository: gem5
> 
> 
> Description
> -------
> 
> Changeset 10169:059294941a1b
> ---------------------------
> fix draining bug where multiple cores hit max_insts_any_thread simultaneously
> 
> This can occur when using fast-forwarding for two cores.  Both cores hit 
> max_insts_any_thread simultaneously, the first causes an event that drops 
> back to python, but then second event stays in the queue.  If this occurs 
> while trying to switch cores, drain's simulate() returns with the second 
> max_insts event, rather than the Drain Finished event.  This just adds a loop 
> to wait until the Drain Finished event occurs.
> 
> 
> =======================
> Unmodified test case
> =======================
> 
> ./build/ARM/gem5.debug configs/example/se.py -n2 --cpu-type=detailed --caches 
> -F 100 --maxinsts=10000 --cmd="sjeng;sjeng"
> gem5 Simulator System.  http://gem5.org
> gem5 is copyrighted software; use the --copyright option for details.
> 
> gem5 compiled Apr 16 2014 09:34:34
> gem5 started Apr 22 2014 09:16:09
> gem5 executing on morgoth
> command line: ./build/ARM/gem5.debug configs/example/se.py -n2 
> --cpu-type=detailed --caches -F 100 --maxinsts=10000 --cmd=sjeng;sjeng
> Global frequency set at 1000000000000 ticks per second
>       0: system.switch_cpus0.isa: ISA system set to: 0 0x5707680
>       0: system.switch_cpus1.isa: ISA system set to: 0 0x5707680
>       0: system.cpu0.isa: ISA system set to: 0 0x5707680
>       0: system.cpu1.isa: ISA system set to: 0 0x5707680
> 0: system.remote_gdb.listener: listening for remote gdb #0 on port 7000
> 0: system.remote_gdb.listener: listening for remote gdb #1 on port 7001
> Switch at instruction count:100
> info: Entering event queue @ 0.  Starting simulation...
> Switched CPUS @ tick 61500
> switching cpus
> info: Entering event queue @ 61500.  Starting simulation...
> gem5.debug: build/ARM/python/swig/drain_wrap.cc:3233: void 
> cleanupDrainManager(DrainManager*): Assertion `drain_manager->getCount() == 
> 0' failed.
> Program aborted at cycle 61500
> Aborted (core dumped)
> 
> 
> =======================
> Modified test case
> =======================
> 
> ./build/ARM/gem5.debug configs/example/se.py -n2 --cpu-type=detailed --caches 
> -F 100 --maxinsts=10000 --cmd="sjeng;sjeng"
> gem5 Simulator System.  http://gem5.org
> gem5 is copyrighted software; use the --copyright option for details.
> 
> gem5 compiled Apr 22 2014 09:48:20
> gem5 started Apr 22 2014 09:54:03
> gem5 executing on morgoth
> command line: ./build/ARM/gem5.debug configs/example/se.py -n2 
> --cpu-type=detailed --caches -F 100 --maxinsts=10000 --cmd=sjeng;sjeng
> Global frequency set at 1000000000000 ticks per second
>       0: system.switch_cpus0.isa: ISA system set to: 0 0x51f4680
>       0: system.switch_cpus1.isa: ISA system set to: 0 0x51f4680
>       0: system.cpu0.isa: ISA system set to: 0 0x51f4680
>       0: system.cpu1.isa: ISA system set to: 0 0x51f4680
> 0: system.remote_gdb.listener: listening for remote gdb #0 on port 7000
> 0: system.remote_gdb.listener: listening for remote gdb #1 on port 7001
> Switch at instruction count:100
> info: Entering event queue @ 0.  Starting simulation...
> Switched CPUS @ tick 61500
> switching cpus
> info: Entering event queue @ 61500.  Starting simulation...
> info: Entering event queue @ 61500.  Starting simulation...
> warn: User mode does not have SPSR
> warn: User mode does not have SPSR
> warn: User mode does not have SPSR
> warn: User mode does not have SPSR
> warn: User mode does not have SPSR
> warn: User mode does not have SPSR
> warn: User mode does not have SPSR
> warn: User mode does not have SPSR
> **** REAL SIMULATION ****
> info: Entering event queue @ 62000.  Starting simulation...
> warn: CP14 unimplemented crn[14], opc1[7], crm[15], opc2[7]
> info: Increasing stack size by one page.
> info: Increasing stack size by one page.
> info: Increasing stack size by one page.
> info: Increasing stack size by one page.
> info: Increasing stack size by one page.
> info: Increasing stack size by one page.
> info: Increasing stack size by one page.
> info: Increasing stack size by one page.
> info: Increasing stack size by one page.
> info: Increasing stack size by one page.
> info: Increasing stack size by one page.
> info: Increasing stack size by one page.
> Exiting @ tick 16120500 because a thread reached the max instruction count
> 
> 
> Diffs
> -----
> 
>   src/python/m5/simulate.py 7d7f635e7447 
> 
> Diff: http://reviews.gem5.org/r/2228/diff/
> 
> 
> Testing
> -------
> 
> passes build/ARM/tests/debug/quick/se
> 
> 
> Thanks,
> 
> Andrew Lukefahr
> 
>

_______________________________________________
gem5-dev mailing list
[email protected]
http://m5sim.org/mailman/listinfo/gem5-dev

Reply via email to