Hi Jiayi, Thanks so much for the information on Abstract Controller's Constructor. I removed the if condition for m_version and now I am getting the stats I wanted. I will let the Profiler.cc remain as it was.
Thanks a lot! Vedika ________________________________ From: Jiayi Huang <jyhuan...@gmail.com> Sent: 19 May 2021 20:11 To: gem5 users mailing list <gem5-users@gem5.org> Cc: VEDIKA JITENDRA KULKARNI <ved...@iitg.ac.in> Subject: Re: [gem5-users] L1Cache Controller Statistics Hi Vedika, You are right, if you take a look at the AbstractController's constructor (https://github.com/gem5/gem5/blob/stable/src/mem/ruby/slicc_interface/AbstractController.cc#L50-L67), only the controllers with `m_version` 0 register the collateStats() for the dump callback. The version is the ID of the controller in its machine type, specified in the protocol configuration file (e.g. configs/ruby/MESI_Three_Level.py). If you want to have the stat for all the controllers, an easy way is to register the stats in the regStats() if you are using the Stats data structure provided in gem5 (not the ones inside mem/ruby/common). If you are using others and need to process the stats before dumping, you can create another function for callback, for example, localCollateStats(), and register it as a dump callback in the constructor. Regards, Jiayi On Tue, May 18, 2021 at 11:35 AM VEDIKA JITENDRA KULKARNI via gem5-users <gem5-users@gem5.org<mailto:gem5-users@gem5.org>> wrote: Hello, I need to get values for a new statistic I have added to Abstract Controller, similar to fully_busy_cycles. In the collateStats() function in StateMachine.py , I added the code to calculate the new statistic at the end of the simulation. However, only L1CacheController-0, L2CacheController and Directory-0 shows the value of the new statistic, rest are 0. I suspect this is because the collateStats() function is called only for Node-0. However, I need to calculate the statistic at the end of the simulation for every node. I would like to know the place from where collateStats() is called so that I can call it for every node. Alternatively, is there another function that is called always for all nodes at the end of simulation? Thank you, Vedika. _______________________________________________ gem5-users mailing list -- gem5-users@gem5.org<mailto:gem5-users@gem5.org> To unsubscribe send an email to gem5-users-le...@gem5.org<mailto:gem5-users-le...@gem5.org> %(web_page_url)slistinfo%(cgiext)s/%(_internal_name)s
_______________________________________________ gem5-users mailing list -- gem5-users@gem5.org To unsubscribe send an email to gem5-users-le...@gem5.org %(web_page_url)slistinfo%(cgiext)s/%(_internal_name)s