Re: [gem5-dev] Allocating main event queues dynamically

2013-01-22 Thread Nilay
Steve, I think things are working correctly. Note that I was just printing the help message. So simulate() will never get called. And at exit, the stats.dump function gets called which queries for the current tick. -- Nilay On Tue, January 22, 2013 9:10 pm, Steve Reinhardt wrote: > That seems st

Re: [gem5-dev] Allocating main event queues dynamically

2013-01-22 Thread Steve Reinhardt
That seems strange... atexit.register(stats.dump) should just be enqueuing a pointer to the stats.dump function to be called when the simulator exits. The stats.dump function should not actually be executed at that point in time. Steve On Tue, Jan 22, 2013 at 6:25 PM, Nilay wrote: > On Tue, J

Re: [gem5-dev] Allocating main event queues dynamically

2013-01-22 Thread Nilay
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

Re: [gem5-dev] Allocating main event queues dynamically

2013-01-22 Thread Nilay
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 calli

Re: [gem5-dev] Allocating main event queues dynamically

2013-01-22 Thread Ali Saidi
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 y

Re: [gem5-dev] Allocating main event queues dynamically

2013-01-22 Thread Steve Reinhardt
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 figu

Re: [gem5-dev] Allocating main event queues dynamically

2013-01-22 Thread Nilay
Ali, curTick() is being called from the file python/swig/core_wrap.cc. I am running the following command: ./build/X86/gem5.debug ./configs/example/ruby_network_test.py --help When I try to run the network test itself, i.e. with out the help option, I get a segmentation fault, again because of cur

Re: [gem5-dev] Allocating main event queues dynamically

2013-01-22 Thread Ali Saidi
Is something calling the curTick() method or are you saying that by virtue of wrapping curTick() it's being called somehow. I'm not sure how the latter could happen. In the case of the prior, any idea what's calling it? Ali On 22.01.2013 14:56, Nilay wrote: > I am trying to allocate the ma

[gem5-dev] Allocating main event queues dynamically

2013-01-22 Thread Nilay
I am trying to allocate the main event queue(s) dynamically, but I am running into a problem related to curTick(). In the file src/python/swig/core.i, the function curTick() has been declared. This leads SWIG to generate code that calls curTick(). It seems this function call happens before the main