Add more LRU stats.

This commit is contained in:
aignacio_sf 2005-12-29 21:27:27 +00:00
parent 7cefd816e2
commit 0e4acd7a33
3 changed files with 9 additions and 0 deletions

View File

@ -842,8 +842,12 @@ end_frame() {
dxgsg9_cat.debug() << "* total_page_access " << _lru -> _m.total_page_access << " avg page access " << ((float) _lru -> _m.total_page_access / (float) frames) << "\n";
dxgsg9_cat.debug() << "* total_lru_pages_in_pool " << _lru -> _m.total_lru_pages_in_pool << "\n";
dxgsg9_cat.debug() << "* total_lru_pages_in_free_pool " << _lru -> _m.total_lru_pages_in_free_pool << "\n";
dxgsg9_cat.debug() << "* avg unique page access size " << (_lru -> _m.total_page_access_size / (double) frames) << "\n";
dxgsg9_cat.debug() << "* avg of all page access size " << ((_lru -> _m.total_page_access_size + _lru -> _m.total_page_all_access_size) / (double) frames) << "\n";
_lru -> _m.total_page_access = 0;
_lru -> _m.total_page_access_size = 0;
_lru -> _m.total_page_all_access_size = 0;
_lru -> count_priority_level_pages ( );

View File

@ -484,6 +484,7 @@ void Lru::access_page (LruPage *lru_page)
if(lru_page->_m.current_frame_identifier
== this->_m.current_frame_identifier) {
lru_page->_m.current_frame_usage++;
this->_m.total_page_all_access_size += lru_page->_m.size;
}
else {
// first update this frame
@ -492,6 +493,8 @@ void Lru::access_page (LruPage *lru_page)
lru_page->_m.last_frame_usage = lru_page->_m.current_frame_usage;
lru_page->_m.current_frame_usage = 1;
lru_page->_m.total_frame_page_faults = 0;
this->_m.total_page_access_size += lru_page->_m.size;
}
// check if the page is out

View File

@ -200,6 +200,8 @@ public:
int total_page_outs;
int total_page_access;
double total_page_access_size;
double total_page_all_access_size;
int start_priority_index;
LruPage *start_update_lru_page;