CacheRecorder.hh (10301:44839e8febbd) | CacheRecorder.hh (10302:0e9e99e6369a) |
---|---|
1/* 2 * Copyright (c) 1999-2012 Mark D. Hill and David A. Wood 3 * Copyright (c) 2010 Advanced Micro Devices, Inc. 4 * All rights reserved. 5 * 6 * Redistribution and use in source and binary forms, with or without 7 * modification, are permitted provided that the following conditions are 8 * met: redistributions of source code must retain the above copyright --- 24 unchanged lines hidden (view full) --- 33 */ 34 35#ifndef __MEM_RUBY_RECORDER_CACHERECORDER_HH__ 36#define __MEM_RUBY_RECORDER_CACHERECORDER_HH__ 37 38#include <vector> 39 40#include "base/hashmap.hh" | 1/* 2 * Copyright (c) 1999-2012 Mark D. Hill and David A. Wood 3 * Copyright (c) 2010 Advanced Micro Devices, Inc. 4 * All rights reserved. 5 * 6 * Redistribution and use in source and binary forms, with or without 7 * modification, are permitted provided that the following conditions are 8 * met: redistributions of source code must retain the above copyright --- 24 unchanged lines hidden (view full) --- 33 */ 34 35#ifndef __MEM_RUBY_RECORDER_CACHERECORDER_HH__ 36#define __MEM_RUBY_RECORDER_CACHERECORDER_HH__ 37 38#include <vector> 39 40#include "base/hashmap.hh" |
41#include "base/types.hh" |
|
41#include "mem/protocol/RubyRequestType.hh" 42#include "mem/ruby/common/Address.hh" 43#include "mem/ruby/common/DataBlock.hh" 44#include "mem/ruby/common/TypeDefines.hh" 45 46class Sequencer; 47 48/*! 49 * Class for recording cache contents. Note that the last element of the 50 * class is an array of length zero. It is used for creating variable 51 * length object, so that while writing the data to a file one does not 52 * need to copy the meta data and the actual data separately. 53 */ 54class TraceRecord { 55 public: 56 int m_cntrl_id; | 42#include "mem/protocol/RubyRequestType.hh" 43#include "mem/ruby/common/Address.hh" 44#include "mem/ruby/common/DataBlock.hh" 45#include "mem/ruby/common/TypeDefines.hh" 46 47class Sequencer; 48 49/*! 50 * Class for recording cache contents. Note that the last element of the 51 * class is an array of length zero. It is used for creating variable 52 * length object, so that while writing the data to a file one does not 53 * need to copy the meta data and the actual data separately. 54 */ 55class TraceRecord { 56 public: 57 int m_cntrl_id; |
57 Time m_time; | 58 Tick m_time; |
58 physical_address_t m_data_address; 59 physical_address_t m_pc_address; 60 RubyRequestType m_type; 61 uint8_t m_data[0]; 62 63 void print(std::ostream& out) const; 64}; 65 --- 4 unchanged lines hidden (view full) --- 70 ~CacheRecorder(); 71 72 CacheRecorder(uint8_t* uncompressed_trace, 73 uint64_t uncompressed_trace_size, 74 std::vector<Sequencer*>& SequencerMap, 75 uint64_t block_size_bytes); 76 void addRecord(int cntrl, const physical_address_t data_addr, 77 const physical_address_t pc_addr, RubyRequestType type, | 59 physical_address_t m_data_address; 60 physical_address_t m_pc_address; 61 RubyRequestType m_type; 62 uint8_t m_data[0]; 63 64 void print(std::ostream& out) const; 65}; 66 --- 4 unchanged lines hidden (view full) --- 71 ~CacheRecorder(); 72 73 CacheRecorder(uint8_t* uncompressed_trace, 74 uint64_t uncompressed_trace_size, 75 std::vector<Sequencer*>& SequencerMap, 76 uint64_t block_size_bytes); 77 void addRecord(int cntrl, const physical_address_t data_addr, 78 const physical_address_t pc_addr, RubyRequestType type, |
78 Time time, DataBlock& data); | 79 Tick time, DataBlock& data); |
79 80 uint64 aggregateRecords(uint8_t** data, uint64 size); 81 82 /*! 83 * Function for flushing the memory contents of the caches to the 84 * main memory. It goes through the recorded contents of the caches, 85 * and issues flush requests. Except for the first one, a flush request 86 * is issued only after the previous one has completed. This currently --- 44 unchanged lines hidden --- | 80 81 uint64 aggregateRecords(uint8_t** data, uint64 size); 82 83 /*! 84 * Function for flushing the memory contents of the caches to the 85 * main memory. It goes through the recorded contents of the caches, 86 * and issues flush requests. Except for the first one, a flush request 87 * is issued only after the previous one has completed. This currently --- 44 unchanged lines hidden --- |