const Message*
MessageBuffer::peekAtHeadOfQueue() const
{
- DPRINTF(RubyQueue, "Peeking at head of queue %s time: %lld\n",
- m_name, g_eventQueue_ptr->getTime());
+ DPRINTF(RubyQueue, "Peeking at head of queue time: %lld\n",
+ g_eventQueue_ptr->getTime());
assert(isReady());
const Message* msg_ptr = m_prio_heap.front().m_msgptr.get();
void
MessageBuffer::enqueue(MsgPtr message, Time delta)
{
- DPRINTF(RubyQueue, "Enqueue %s time: %lld, message: %s.\n",
- m_name, g_eventQueue_ptr->getTime(), (*(message.get())));
-
m_msg_counter++;
m_size++;
push_heap(m_prio_heap.begin(), m_prio_heap.end(),
greater<MessageBufferNode>());
- DPRINTF(RubyQueue, "Enqueue %s with arrival_time %lld cur_time: %lld, "
- "message: %s.\n",
- m_name, arrival_time, g_eventQueue_ptr->getTime(),
- (*(message.get())));
+ DPRINTF(RubyQueue, "Enqueue with arrival_time %lld (cur_time: %lld).\n",
+ arrival_time, g_eventQueue_ptr->getTime());
+ DPRINTF(RubyQueue, "Enqueue Message: %s.\n", (*(message.get())));
// Schedule the wakeup
if (m_consumer_ptr != NULL) {
void
MessageBuffer::dequeue(MsgPtr& message)
{
- DPRINTF(RubyQueue, "Dequeue from %s\n", m_name);
+ DPRINTF(RubyQueue, "Dequeueing\n");
message = m_prio_heap.front().m_msgptr;
pop();
void
MessageBuffer::pop()
{
- DPRINTF(RubyQueue, "Pop from %s\n", m_name);
+ DPRINTF(RubyQueue, "Popping\n");
assert(isReady());
pop_heap(m_prio_heap.begin(), m_prio_heap.end(),
greater<MessageBufferNode>());
void
MessageBuffer::recycle()
{
- DPRINTF(RubyQueue, "Recycling %s\n", m_name);
+ DPRINTF(RubyQueue, "Recycling.\n");
assert(isReady());
MessageBufferNode node = m_prio_heap.front();
pop_heap(m_prio_heap.begin(), m_prio_heap.end(),
void
MessageBuffer::reanalyzeMessages(const Address& addr)
{
- DPRINTF(RubyQueue, "ReanalyzeMessages %s\n", m_name);
+ DPRINTF(RubyQueue, "ReanalyzeMessages\n");
assert(m_stall_msg_map.count(addr) > 0);
//
void
MessageBuffer::reanalyzeAllMessages()
{
- DPRINTF(RubyQueue, "ReanalyzeAllMessages %s\n", m_name);
+ DPRINTF(RubyQueue, "ReanalyzeAllMessages %s\n");
//
// Put all stalled messages associated with this address back on the
void
MessageBuffer::stallMessage(const Address& addr)
{
- DPRINTF(RubyQueue, "Stalling %s\n", m_name);
+ DPRINTF(RubyQueue, "Stalling %s\n");
assert(isReady());
assert(addr.getOffset() == 0);
MsgPtr message = m_prio_heap.front().m_msgptr;
void
MessageBuffer::print(ostream& out) const
{
- out << "[MessageBuffer: ";
+ ccprintf(out, "[MessageBuffer: ");
if (m_consumer_ptr != NULL) {
- out << " consumer-yes ";
+ ccprintf(out, " consumer-yes ");
}
vector<MessageBufferNode> copy(m_prio_heap);
sort_heap(copy.begin(), copy.end(), greater<MessageBufferNode>());
- out << copy << "] " << m_name << endl;
+ ccprintf(out, "%s] %s", copy, m_name);
}
void
void
PerfectSwitch::wakeup()
{
- DPRINTF(RubyNetwork, "m_switch_id: %d\n",m_switch_id);
-
MsgPtr msg_ptr;
// Give the highest numbered link priority most of the time
int outgoing = output_links[i];
if (!m_out[outgoing][vnet]->areNSlotsAvailable(1))
enough = false;
- DPRINTF(RubyNetwork, "Checking if node is blocked\n"
+ DPRINTF(RubyNetwork, "Checking if node is blocked ..."
"outgoing: %d, vnet: %d, enough: %d\n",
outgoing, vnet, enough);
}
if (!enough) {
g_eventQueue_ptr->scheduleEvent(this, 1);
DPRINTF(RubyNetwork, "Can't deliver message since a node "
- "is blocked\n"
- "Message: %s\n", (*net_msg_ptr));
+ "is blocked\n");
+ DPRINTF(RubyNetwork, "Message: %s\n", (*net_msg_ptr));
break; // go to next incoming port
}
output_link_destinations[i];
// Enqeue msg
- DPRINTF(RubyNetwork, "Switch: %d enqueuing net msg from "
+ DPRINTF(RubyNetwork, "%d enqueuing net msg from "
"inport[%d][%d] to outport [%d][%d] time: %lld.\n",
- m_switch_id, incoming, vnet, outgoing, vnet,
+ incoming, vnet, outgoing, vnet,
g_eventQueue_ptr->getTime());
m_out[outgoing][vnet]->enqueue(msg_ptr);