On Tue, January 22, 2013 3:35 pm, Steve Reinhardt wrote:
> I think the question Ali was asking is where in the python is curTick()
> being called before simulate().  On the C++ side, any call from python is
> going to come through core_wrap.cc.  You might have to use the python
> debugger and put a breakpoint on the python side of the swig-generated
> code
> to figure this out.
>

I can answer this question now. In file src/python/m5/simulate.py, we
register two functions that would called on exit.

# Python exit handlers happen in reverse order.  We want to dump stats last.
atexit.register(stats.dump)

# register our C++ exit callback function with Python
atexit.register(internal.core.doExitCleanup)

The function stats.dump makes call to curTick().

While going through all the python code, I think I would like to set the
thread local queue of the main thread in main.py file. It seems the
function main() in that file is called before any other python function is
called.


--
Nilay

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

Reply via email to