I would suggest implementing these counters in the tick() function in the 
src/cpu/o3/cpu.cc file because this method is called every cycle. However, I am 
not an expert in the cache code from gem5, therefore i don't know how to access 
information from MSHR. Additionally, I believe you should implement the logic 
in the src/mem/cache/cache.cc and, in the tick method(), just called this 
function that implements this logic to get information from MSHR.



----------------------------------------------------------------------------------------------------------------------------------------------
Francisco Carlos Silva Junior
Ph.D. student


________________________________
De: gem5-users <[email protected]> em nome de Rosen Lu 
<[email protected]>
Enviado: segunda-feira, 25 de novembro de 2019 16:18
Para: gem5 users mailing list <[email protected]>
Assunto: Re: [gem5-users] statistics for each cycle(Tick)

Hello Carlos,

Yes O3CPU.

Francisco Carlos <[email protected]<mailto:[email protected]>> 
于2019年11月25日周一 下午12:55写道:
Hello, Rosen

Which CPU model are you using? O3CPU?

----------------------------------------------------------------------------------------------------------------------------------------------
Francisco Carlos Silva Junior
Ph.D. student


________________________________
De: gem5-users 
<[email protected]<mailto:[email protected]>> em nome de 
Rosen Lu <[email protected]<mailto:[email protected]>>
Enviado: segunda-feira, 25 de novembro de 2019 15:39
Para: gem5 users mailing list <[email protected]<mailto:[email protected]>>
Assunto: [gem5-users] statistics for each cycle(Tick)

Hello,

I want to implement two functions, these two functions need to be called every 
cycle(Tick). The first function needs to return the number of outstanding 
demand misses in MSHR, it shows the total number of misses in MSHR for each 
cycle. The second function needs to return the number of hits occur in each 
cycle, if no hits in that cycle, it will return 0.

I need the cycle information, so these functions need to be called every cycle 
and get statistics. I want to know how to implement these functions in gem5, 
can I implement the logic in src/mem/cache/cache.cc?

Any ideas or suggestions for implementing would be helpful.

Thank you very much.

Rosen
_______________________________________________
gem5-users mailing list
[email protected]<mailto:[email protected]>
http://m5sim.org/cgi-bin/mailman/listinfo/gem5-users
_______________________________________________
gem5-users mailing list
[email protected]
http://m5sim.org/cgi-bin/mailman/listinfo/gem5-users

Reply via email to