ruby: Ruby 64-bit address output fixes.
authorBrad Beckmann <Brad.Beckmann@amd.com>
Wed, 18 Nov 2009 21:55:57 +0000 (13:55 -0800)
committerBrad Beckmann <Brad.Beckmann@amd.com>
Wed, 18 Nov 2009 21:55:57 +0000 (13:55 -0800)
src/mem/ruby/libruby.cc
src/mem/ruby/libruby.hh
src/mem/ruby/system/Sequencer.cc
src/mem/ruby/system/Sequencer.hh

index e4e302ebab842edbd9df355a84fe9e4f039b01ad..b9a72d071d876ad6f89b46b791840c11c9e394d1 100644 (file)
@@ -66,6 +66,12 @@ ostream& operator<<(ostream& out, const RubyRequestType& obj)
   return out;
 }
 
+ostream& operator<<(std::ostream& out, const RubyRequest& obj)
+{
+  out << hex << "0x" << obj.paddr << flush;
+  return out;
+}
+
 vector<string> tokenizeString(string str, string delims)
 {
   vector<string> tokens;
index a73ff5cf400c76996d9a20dbec3d767911039335..29aac232a58bcf456910bfae8a3b5742a5331296 100644 (file)
@@ -39,6 +39,8 @@ struct RubyRequest {
   {}
 };
 
+std::ostream& operator<<(std::ostream& out, const RubyRequest& obj);
+
 /**
  * Initialize the system.  cfg_file is a Ruby-lang configuration script
  */
index 780c1128e5267ab2c05c9a29a0c39afd558d2bb0..c693e0f37cd850703e62352e2b6208688bf6682b 100644 (file)
 //Sequencer::Sequencer(int core_id, MessageBuffer* mandatory_q)
 
 #define LLSC_FAIL -2
+ostream& operator<<(std::ostream& out, const SequencerRequest& obj) {
+  out << obj.ruby_request << flush;
+  return out;
+}
 
 Sequencer::Sequencer(const string & name)
   :RubyPort(name)
@@ -106,7 +110,7 @@ void Sequencer::wakeup() {
     SequencerRequest* request = m_readRequestTable.lookup(keys[i]);
     if (current_time - request->issue_time >= m_deadlock_threshold) {
       WARN_MSG("Possible Deadlock detected");
-      WARN_EXPR(request);
+      WARN_EXPR(request->ruby_request);
       WARN_EXPR(m_version);
       WARN_EXPR(keys.size());
       WARN_EXPR(current_time);
@@ -121,7 +125,7 @@ void Sequencer::wakeup() {
     SequencerRequest* request = m_writeRequestTable.lookup(keys[i]);
     if (current_time - request->issue_time >= m_deadlock_threshold) {
       WARN_MSG("Possible Deadlock detected");
-      WARN_EXPR(request);
+      WARN_EXPR(request->ruby_request);
       WARN_EXPR(m_version);
       WARN_EXPR(current_time);
       WARN_EXPR(request->issue_time);
index 2b1f023c591dc0676deb6c9152d5d9f94540f36d..cf12c2a0bb8b801ea20cef9f1723dce6f994d15e 100644 (file)
@@ -63,6 +63,8 @@ struct SequencerRequest {
   {}
 };
 
+std::ostream& operator<<(std::ostream& out, const SequencerRequest& obj);
+
 class Sequencer : public Consumer, public RubyPort {
 public:
   // Constructors