ruby: add stats to .sm files, remove cache profiler
Review Request #1849 - Created April 28, 2013 and submitted
| Information | |
|---|---|
| Nilay Vaish | |
| gem5 | |
| default | |
| Reviewers | |
| Default | |
Changeset 9686:66375a5b9ece --------------------------- ruby: add stats to .sm files, remove cache profiler This patch changes the way cache statistics are collected in ruby. As of now, there is separate entity called CacheProfiler which holds statistical variables for caches. The CacheMemory class defines different functions for accessing the CacheProfiler. These functions are then invoked in the .sm files. I find this approach opaque and prone to error. Secondly, we probably should not be paying the cost of a function call for recording statistics. Instead, this patch allows for accessing statistical variables in the .sm files. The collection would become transparent. Secondly, it would happen in place, so no function calls. The patch also removes the CacheProfiler class.
This is how the output would look like: system.ruby.l1_cntrl0.L1Dcache.demand_hits 82 # Number of cache demand hits system.ruby.l1_cntrl0.L1Dcache.demand_misses 11220 # Number of cache demand misses system.ruby.l1_cntrl0.L1Dcache.demand_accesses 11302 # Number of cache demand accesses system.ruby.l1_cntrl0.L1Dcache.total_sw_prefetches 0 # Number of software prefetches system.ruby.l1_cntrl0.L1Dcache.total_hw_prefetches 0 # Number of hardware prefetches system.ruby.l1_cntrl0.L1Dcache.total_prefetches 0 # Number of prefetches system.ruby.l1_cntrl0.L1Dcache.num_data_array_reads 0 # number of data array reads system.ruby.l1_cntrl0.L1Dcache.num_data_array_writes 0 # number of data array writes system.ruby.l1_cntrl0.L1Dcache.num_tag_array_reads 0 # number of tag array reads system.ruby.l1_cntrl0.L1Dcache.num_tag_array_writes 0 # number of tag array writes system.ruby.l1_cntrl0.L1Dcache.num_tag_array_stalls 0 # number of stalls caused by tag array system.ruby.l1_cntrl0.L1Dcache.num_data_array_stalls 0 # number of stalls caused by data array system.ruby.l1_cntrl0.L1Icache.demand_hits 0 # Number of cache demand hits system.ruby.l1_cntrl0.L1Icache.demand_misses 105 # Number of cache demand misses system.ruby.l1_cntrl0.L1Icache.demand_accesses 105 # Number of cache demand accesses system.ruby.l1_cntrl0.L1Icache.total_sw_prefetches 0 # Number of software prefetches system.ruby.l1_cntrl0.L1Icache.total_hw_prefetches 0 # Number of hardware prefetches system.ruby.l1_cntrl0.L1Icache.total_prefetches 0 # Number of prefetches system.ruby.l1_cntrl0.L1Icache.num_data_array_reads 0 # number of data array reads system.ruby.l1_cntrl0.L1Icache.num_data_array_writes 0 # number of data array writes system.ruby.l1_cntrl0.L1Icache.num_tag_array_reads 0 # number of tag array reads system.ruby.l1_cntrl0.L1Icache.num_tag_array_writes 0 # number of tag array writes system.ruby.l1_cntrl0.L1Icache.num_tag_array_stalls 0 # number of stalls caused by tag array system.ruby.l1_cntrl0.L1Icache.num_data_array_stalls 0 # number of stalls caused by data array
Description: |
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Diff: |
Revision 2 (+544 -610) |
Description: |
|
||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Diff: |
Revision 3 (+544 -610) |
Description: |
|
||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Diff: |
Revision 4 (+544 -610) |
Overall it looks good to me. Are the resulting stats unchanged?
-
configs/ruby/MOESI_CMP_directory.py (Diff revision 4) -
Is this change really supposed to be part of this patch?
Ugh...another patch is going to cause us a lot of pain to merge with. We have a lot of internal code that add experiment specific information to the cache profiler. Those will all need to be changed quite a bit if this patch is checked in as is. The current patch moves some of the simple statistics from the CacheProfiler to the controller sim objects. However there are other, more complicated statistics that the Cache Profiler is convenient for. Furthermore, this patch doesn't appear to support all the existing m5 statistics, correct? Can this patch be extended to support all m5 statistics, histograms, etc.? Also can this patch move all the existing stats out of CacheProfiler without actually removing the file?
Does any one else has comments to make? I am planning to commit it on Tuesday.
