Okay I will take care of that,
Thanks Jiayi.
________________________________
From: Jiayi Huang <[email protected]>
Sent: 21 May 2021 23:46
To: VEDIKA JITENDRA KULKARNI <[email protected]>
Cc: gem5 users mailing list <[email protected]>
Subject: Re: [gem5-users] L1Cache Controller Statistics

Hi Vedika,

You are welcome.

You may need to check if the multiple calls of the collateStats() mess up the 
original stats of controllers after removing the m_version condition.

As far as I know, the `m_version == 0` is to make the cache controllers call 
the collateStats() exactly once. In the collateStats function definition 
(generated by the Ruby SLICC compiler), it iterates all the cache controllers 
of the same type (e.g., MachineType_L0Cache) to aggregate the stats. Take a 
look at the collateStat function in your built gem5 
build/your-gem5-build/mem/ruby/protocol/L1Cache_Controller.cc.

Best,
Jiayi

On Thu, May 20, 2021 at 1:14 PM VEDIKA JITENDRA KULKARNI 
<[email protected]<mailto:[email protected]>> wrote:
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 <[email protected]<mailto:[email protected]>>
Sent: 19 May 2021 20:11
To: gem5 users mailing list <[email protected]<mailto:[email protected]>>
Cc: VEDIKA JITENDRA KULKARNI <[email protected]<mailto:[email protected]>>
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 
<[email protected]<mailto:[email protected]>> 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 -- [email protected]<mailto:[email protected]>
To unsubscribe send an email to 
[email protected]<mailto:[email protected]>
%(web_page_url)slistinfo%(cgiext)s/%(_internal_name)s
_______________________________________________
gem5-users mailing list -- [email protected]
To unsubscribe send an email to [email protected]
%(web_page_url)slistinfo%(cgiext)s/%(_internal_name)s

Reply via email to