ruby: remove calls to g_system_ptr->getTime()
This patch further removes calls to g_system_ptr->getTime() where ever other clocked objects are available for providing current time.
This commit is contained in:
parent
4526f33062
commit
5b6f972750
|
@ -276,7 +276,7 @@ Check::initiateCheck()
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
Check::performCallback(NodeID proc, SubBlock* data)
|
Check::performCallback(NodeID proc, SubBlock* data, Time curTime)
|
||||||
{
|
{
|
||||||
Address address = data->getAddress();
|
Address address = data->getAddress();
|
||||||
|
|
||||||
|
@ -312,8 +312,7 @@ Check::performCallback(NodeID proc, SubBlock* data)
|
||||||
"Time: %d\n",
|
"Time: %d\n",
|
||||||
proc, address, data, byte_number,
|
proc, address, data, byte_number,
|
||||||
(int)m_value + byte_number,
|
(int)m_value + byte_number,
|
||||||
(int)data->getByte(byte_number), *this,
|
(int)data->getByte(byte_number), *this, curTime);
|
||||||
g_system_ptr->getTime());
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
DPRINTF(RubyTest, "Action/check success\n");
|
DPRINTF(RubyTest, "Action/check success\n");
|
||||||
|
@ -327,8 +326,7 @@ Check::performCallback(NodeID proc, SubBlock* data)
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
panic("Unexpected TesterStatus: %s proc: %d data: %s m_status: %s "
|
panic("Unexpected TesterStatus: %s proc: %d data: %s m_status: %s "
|
||||||
"time: %d\n",
|
"time: %d\n", *this, proc, data, m_status, curTime);
|
||||||
*this, proc, data, m_status, g_system_ptr->getTime());
|
|
||||||
}
|
}
|
||||||
|
|
||||||
DPRINTF(RubyTest, "proc: %d, Address: 0x%x\n", proc,
|
DPRINTF(RubyTest, "proc: %d, Address: 0x%x\n", proc,
|
||||||
|
|
|
@ -50,7 +50,7 @@ class Check
|
||||||
int _num_readers, RubyTester* _tester);
|
int _num_readers, RubyTester* _tester);
|
||||||
|
|
||||||
void initiate(); // Does Action or Check or nether
|
void initiate(); // Does Action or Check or nether
|
||||||
void performCallback(NodeID proc, SubBlock* data);
|
void performCallback(NodeID proc, SubBlock* data, Time curTime);
|
||||||
const Address& getAddress() { return m_address; }
|
const Address& getAddress() { return m_address; }
|
||||||
void changeAddress(const Address& address);
|
void changeAddress(const Address& address);
|
||||||
|
|
||||||
|
|
|
@ -191,7 +191,7 @@ void
|
||||||
RubyTester::hitCallback(NodeID proc, SubBlock* data)
|
RubyTester::hitCallback(NodeID proc, SubBlock* data)
|
||||||
{
|
{
|
||||||
// Mark that we made progress
|
// Mark that we made progress
|
||||||
m_last_progress_vector[proc] = g_system_ptr->getTime();
|
m_last_progress_vector[proc] = curCycle();
|
||||||
|
|
||||||
DPRINTF(RubyTest, "completed request for proc: %d\n", proc);
|
DPRINTF(RubyTest, "completed request for proc: %d\n", proc);
|
||||||
DPRINTF(RubyTest, "addr: 0x%x, size: %d, data: ",
|
DPRINTF(RubyTest, "addr: 0x%x, size: %d, data: ",
|
||||||
|
@ -205,7 +205,7 @@ RubyTester::hitCallback(NodeID proc, SubBlock* data)
|
||||||
// back the data to make the check
|
// back the data to make the check
|
||||||
Check* check_ptr = m_checkTable_ptr->getCheck(data->getAddress());
|
Check* check_ptr = m_checkTable_ptr->getCheck(data->getAddress());
|
||||||
assert(check_ptr != NULL);
|
assert(check_ptr != NULL);
|
||||||
check_ptr->performCallback(proc, data);
|
check_ptr->performCallback(proc, data, curCycle());
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
@ -229,7 +229,7 @@ void
|
||||||
RubyTester::checkForDeadlock()
|
RubyTester::checkForDeadlock()
|
||||||
{
|
{
|
||||||
int size = m_last_progress_vector.size();
|
int size = m_last_progress_vector.size();
|
||||||
Time current_time = g_system_ptr->getTime();
|
Time current_time = curCycle();
|
||||||
for (int processor = 0; processor < size; processor++) {
|
for (int processor = 0; processor < size; processor++) {
|
||||||
if ((current_time - m_last_progress_vector[processor]) >
|
if ((current_time - m_last_progress_vector[processor]) >
|
||||||
m_deadlock_threshold) {
|
m_deadlock_threshold) {
|
||||||
|
|
|
@ -37,7 +37,7 @@ OutVcState_d::OutVcState_d(int id, GarnetNetwork_d *network_ptr)
|
||||||
m_network_ptr = network_ptr;
|
m_network_ptr = network_ptr;
|
||||||
m_id = id;
|
m_id = id;
|
||||||
m_vc_state = IDLE_;
|
m_vc_state = IDLE_;
|
||||||
m_time = g_system_ptr->getTime();
|
m_time = m_network_ptr->curCycle();
|
||||||
|
|
||||||
if (m_network_ptr->get_vnet_type(id) == DATA_VNET_)
|
if (m_network_ptr->get_vnet_type(id) == DATA_VNET_)
|
||||||
m_credit_count = m_network_ptr->getBuffersPerDataVC();
|
m_credit_count = m_network_ptr->getBuffersPerDataVC();
|
||||||
|
|
|
@ -248,7 +248,7 @@ Prefetcher::issueNextPrefetch(const Address &address, PrefetchEntry *stream)
|
||||||
|
|
||||||
// launch next prefetch
|
// launch next prefetch
|
||||||
stream->m_address = line_addr;
|
stream->m_address = line_addr;
|
||||||
stream->m_use_time = g_system_ptr->getTime();
|
stream->m_use_time = m_controller->curCycle();
|
||||||
DPRINTF(RubyPrefetcher, "Requesting prefetch for %s\n", line_addr);
|
DPRINTF(RubyPrefetcher, "Requesting prefetch for %s\n", line_addr);
|
||||||
m_controller->enqueuePrefetch(line_addr, stream->m_type);
|
m_controller->enqueuePrefetch(line_addr, stream->m_type);
|
||||||
}
|
}
|
||||||
|
@ -290,7 +290,7 @@ Prefetcher::initializeStream(const Address& address, int stride,
|
||||||
PrefetchEntry *mystream = &(m_array[index]);
|
PrefetchEntry *mystream = &(m_array[index]);
|
||||||
mystream->m_address = line_address(address);
|
mystream->m_address = line_address(address);
|
||||||
mystream->m_stride = stride;
|
mystream->m_stride = stride;
|
||||||
mystream->m_use_time = g_system_ptr->getTime();
|
mystream->m_use_time = m_controller->curCycle();
|
||||||
mystream->m_is_valid = true;
|
mystream->m_is_valid = true;
|
||||||
mystream->m_type = type;
|
mystream->m_type = type;
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue