diff options
author | Nathan Binkert <nate@binkert.org> | 2010-03-31 16:56:45 -0700 |
---|---|---|
committer | Nathan Binkert <nate@binkert.org> | 2010-03-31 16:56:45 -0700 |
commit | be10204729c107b41d5d7487323c732e9fa09df5 (patch) | |
tree | 5c8f4001c490c4d777e8756e536cd2f2340c9ebb /src/mem/ruby/recorder/CacheRecorder.cc | |
parent | 60ae1d2b10002bb73b420fce91c4b74397c55457 (diff) | |
download | gem5-be10204729c107b41d5d7487323c732e9fa09df5.tar.xz |
style: another ruby style pass
Diffstat (limited to 'src/mem/ruby/recorder/CacheRecorder.cc')
-rw-r--r-- | src/mem/ruby/recorder/CacheRecorder.cc | 56 |
1 files changed, 26 insertions, 30 deletions
diff --git a/src/mem/ruby/recorder/CacheRecorder.cc b/src/mem/ruby/recorder/CacheRecorder.cc index 09c4e0597..495a38fc8 100644 --- a/src/mem/ruby/recorder/CacheRecorder.cc +++ b/src/mem/ruby/recorder/CacheRecorder.cc @@ -1,4 +1,3 @@ - /* * Copyright (c) 1999-2008 Mark D. Hill and David A. Wood * All rights reserved. @@ -27,53 +26,50 @@ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -/* - * $Id$ - * - */ +#include "gzstream.hh" +#include "mem/gems_common/PrioHeap.hh" +#include "mem/ruby/eventqueue/RubyEventQueue.hh" #include "mem/ruby/recorder/CacheRecorder.hh" #include "mem/ruby/recorder/TraceRecord.hh" -#include "mem/ruby/eventqueue/RubyEventQueue.hh" -#include "mem/gems_common/PrioHeap.hh" -#include "gzstream.hh" CacheRecorder::CacheRecorder() { - m_records_ptr = new PrioHeap<TraceRecord>; + m_records_ptr = new PrioHeap<TraceRecord>; } CacheRecorder::~CacheRecorder() { - delete m_records_ptr; + delete m_records_ptr; } -void CacheRecorder::addRecord(Sequencer* sequencer, - const Address& data_addr, - const Address& pc_addr, - RubyRequestType type, - Time time) +void +CacheRecorder::addRecord(Sequencer* sequencer, const Address& data_addr, + const Address& pc_addr, RubyRequestType type, Time time) { - m_records_ptr->insert(TraceRecord(sequencer, data_addr, pc_addr, type, time)); + m_records_ptr-> + insert(TraceRecord(sequencer, data_addr, pc_addr, type, time)); } -int CacheRecorder::dumpRecords(string filename) +int +CacheRecorder::dumpRecords(string filename) { - ogzstream out(filename.c_str()); - if (out.fail()) { - cout << "Error: error opening file '" << filename << "'" << endl; - return 0; - } + ogzstream out(filename.c_str()); + if (out.fail()) { + cout << "Error: error opening file '" << filename << "'" << endl; + return 0; + } - int counter = 0; - while (m_records_ptr->size() != 0) { - TraceRecord record = m_records_ptr->extractMin(); - record.output(out); - counter++; - } - return counter; + int counter = 0; + while (m_records_ptr->size() != 0) { + TraceRecord record = m_records_ptr->extractMin(); + record.output(out); + counter++; + } + return counter; } -void CacheRecorder::print(ostream& out) const +void +CacheRecorder::print(ostream& out) const { } |