Re: [gem5-users] Debugging std::bad_alloc memory errors in gem5

2020-03-25 Thread Subhankar Pal
Thank you, Ciro. Turned out that by disabling most of the (classic) cache
stat handlers, I was able to free up a lot of memory.

Subhankar Pal  |  PhD Candidate, CSE  |  University of Michigan

On March 25, 2020 at 4:38:52 AM, Ciro Santilli (ciro.santi...@gmail.com)
wrote:

I would try to put prints/PDB on src/python/m5/stats/__init__.py where
enable is called.

On Wed, Mar 25, 2020 at 5:35 AM Subhankar Pal  wrote:
>
> Hi,
>
> I am trying to run simulations in SE mode with a 1000+ (simple) cores. I
get the following error once m5.instantiate() is called.
> Traceback (most recent call last):
> File "", line 1, in 
> File "/home/subh/gem5/src/python/m5/main.py", line 436, in main
> exec filecode in scope
> File “configs/se_mod.py", line 1586, in 
> m5.instantiate()
> File "/home/subh/gem5/src/python/m5/simulate.py", line 139, in
instantiate
> stats.enable()
> File "/home/subh/gem5/src/python/m5/stats/__init__.py", line 180, in
enable
> stat.enable()
> MemoryError: std::bad_alloc
>
> My system is a heavily modified se.py and I have multiple custom
memObjects, some of which allocate memory, i.e. using functions similar to
createBackingStore() in src/mem/physical.cc.
>
> Is there an easy way to track down which memObject class allocates the
most memory, or at least which memObject the allocation fails for? I have
tried invoking gem5.opt with gdb, but I don’t get a backtrace, presumably
because the failure happens in a Python function call.
>
> Thank for any help.
>
> Subhankar Pal | PhD Candidate, CSE | University of Michigan
> ___
> gem5-users mailing list
> gem5-users@gem5.org
> http://m5sim.org/cgi-bin/mailman/listinfo/gem5-users
___
gem5-users mailing list
gem5-users@gem5.org
http://m5sim.org/cgi-bin/mailman/listinfo/gem5-users

[gem5-users] Getting response packets from the slave component via CommMonitor()

2020-03-25 Thread Md Rubel Ahmed
Hi all,
>From my understanding,* master simObjects (CPUs, GPUs) generate requests *to
the slave simObjects(L1private split cache, membus, L2 cache etc.), slaves
responses to the requests.

I want to see both *requests* and *response* packets. I have attached a
communication monitor in addPrivateSplitL1Caches function of BaseCPU.py
which I believe captures packets only in one direction: CPU to L1_data_cache
.

...
#Communication Monitor between l1d cache and the CPU
#self.dcache_port = dc.cpu_side

self.monitor = CommMonitor()
self.monitor.trace =
MemTraceProbe(trace_file='CPU'+str(self)+'.trc')

self.dcache_port = self.monitor.slave
self.monitor.master = dc.cpu_side


My first question is how to get the response packets? Like the response
packets from the L1_data_cache to CPU.

My second query is, tell me if I am wrong:
I need following information from a packet:
1 . sender of the packet
2. receiver of the packet
3. command of the packet
4. physical memory address(if any)

In the decoded packets I find packet id (which I assume refers to
master/sender (1)), the place where I place the commMonitor()  tells me who
is the receiver of the packet(2), and decoding the packet gets me (3) and
(4). Please correct me if I am doing/assuming anything wrong here.

Please see the config.dot.svg to see the system I am simulating.
My 3rd query is: the communication monitor I attached has been attached
between cache(L1) and the CPU?

Thanks for reading my long email. Any help will be highly appreciated.

Regards,
*Rubel Ahmed*
___
gem5-users mailing list
gem5-users@gem5.org
http://m5sim.org/cgi-bin/mailman/listinfo/gem5-users

[gem5-users] How to Changed Commmonitor output?

2020-03-25 Thread DaHoon Park
if Commmonitor exist between L1D cache and CPU, output is Packet
information encoding protobuf.

Output file Packet Information is this link
https://www.gem5.org/documentation/general_docs/cpu_models/TraceCPU .

By changing commmonitor, I would also like to see information about the
data contained in the packet as an output file. modifying comm_monitor.cc
or commmonitor.py
___
gem5-users mailing list
gem5-users@gem5.org
http://m5sim.org/cgi-bin/mailman/listinfo/gem5-users

Re: [gem5-users] Debugging std::bad_alloc memory errors in gem5

2020-03-25 Thread Ciro Santilli
I would try to put prints/PDB on src/python/m5/stats/__init__.py where
enable is called.

On Wed, Mar 25, 2020 at 5:35 AM Subhankar Pal  wrote:
>
> Hi,
>
> I am trying to run simulations in SE mode with a 1000+ (simple) cores. I get 
> the following error once m5.instantiate() is called.
> Traceback (most recent call last):
>   File "", line 1, in 
>   File "/home/subh/gem5/src/python/m5/main.py", line 436, in main
> exec filecode in scope
>   File “configs/se_mod.py", line 1586, in 
> m5.instantiate()
>   File "/home/subh/gem5/src/python/m5/simulate.py", line 139, in instantiate
> stats.enable()
>   File "/home/subh/gem5/src/python/m5/stats/__init__.py", line 180, in enable
> stat.enable()
> MemoryError: std::bad_alloc
>
> My system is a heavily modified se.py and I have multiple custom memObjects, 
> some of which allocate memory, i.e. using functions similar to 
> createBackingStore() in src/mem/physical.cc.
>
> Is there an easy way to track down which memObject class allocates the most 
> memory, or at least which memObject the allocation fails for? I have tried 
> invoking gem5.opt with gdb, but I don’t get a backtrace, presumably because 
> the failure happens in a Python function call.
>
> Thank for any help.
>
> Subhankar Pal  |  PhD Candidate, CSE  |  University of Michigan
> ___
> gem5-users mailing list
> gem5-users@gem5.org
> http://m5sim.org/cgi-bin/mailman/listinfo/gem5-users
___
gem5-users mailing list
gem5-users@gem5.org
http://m5sim.org/cgi-bin/mailman/listinfo/gem5-users

Re: [gem5-users] Run APK on Gem5

2020-03-25 Thread Ciro Santilli
You have to either fully boot Android  on fs.py or find some userland
setup which I don't know about for SE.

I don't have a fully automated Android boot setup, so just try it out
and tell if it fails and how.

For plain Java, it is much more likely that you will be able to run in
SE: but will need to implement some missing syscalls, might be easy:
https://stackoverflow.com/questions/58399259/running-java-programs-in-gem5or-any-language-which-is-not-c
and for sure booting Ubuntu and running it there in FS will work.


On Wed, Mar 25, 2020 at 2:26 AM ABD ALRHMAN ABO ALKHEEL
 wrote:
>
> Hi All,
>
> I wanna run the apk binary files on ARM gem5 in se mode. Any help would be 
> appreciated.
>
> Best Regards
> ___
> gem5-users mailing list
> gem5-users@gem5.org
> http://m5sim.org/cgi-bin/mailman/listinfo/gem5-users
___
gem5-users mailing list
gem5-users@gem5.org
http://m5sim.org/cgi-bin/mailman/listinfo/gem5-users