Let's drop the dynamic allocation of queues for the time being. Assume that we have N event queues, N threads. Here N is known statically. Each thread will operate on one event queue. The curTick() function when called, will return the tick value of the event queue associated with the thread calling the function. For this, we modify the curTick() function to query a thread local event queue variable. The question is how soon and where should we set the thread local variable for the main thread. We would set the thread local variable for others when the threads themselves are created.
-- Nilay On Tue, January 22, 2013 3:39 pm, Ali Saidi wrote: > > > And the second part of the question is what information do you need > to make a sensible decision about event queues? I'm not quite sure what > you're doing, so I'm not completely sure. If you want to create one per > physical core on the machine, you should be able to do that as early as > main(), if you want it to by dynamic based on some simobjects it will > need to be later, but then were back to the question below. > > Thanks, > > > Ali > > On 22.01.2013 16:35, 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. >> _______________________________________________ gem5-dev mailing list gem5-dev@gem5.org http://m5sim.org/mailman/listinfo/gem5-dev