00001 00017 // =================================================================== 00018 // Avoid multiple inclusion. 00019 #if !defined (_PER_TASK_PAGE_REDUCED_READER_HH) 00020 #define _PER_TASK_PAGE_REDUCED_READER_HH 00021 // =================================================================== 00022 00023 00024 00025 // =================================================================== 00026 // INCLUDES 00027 00028 #include <zlib.h> 00029 #include "types-and-constants.hh" 00030 // =================================================================== 00031 00032 00033 00034 // =================================================================== 00035 // CLASS DEFINITION 00036 00046 class Per_Task_Page_Reduced_Reader { 00047 00048 public: // CONSTRUCTOR & DESTRUCTOR 00049 00063 Per_Task_Page_Reduced_Reader 00064 (const char* const reference_trace_directory_pathname, 00065 const unsigned int reduction_memory_size, 00066 const task_ID_t task_ID); 00067 00073 ~Per_Task_Page_Reduced_Reader (); 00074 00075 public: // METHODS 00076 00086 void get_record (reference_record_s* const reference_record); 00087 00089 timestamp_t next_cycle_timestamp () const; 00090 00093 bool at_end_of_trace () const; 00094 00095 protected: // METHODS 00096 00099 void read_record (); 00100 00101 protected: // DATA 00102 00105 gzFile input_stream; 00106 00109 reference_record_s reference_record; 00110 00113 timestamp_t previous_cycle_timestamp; 00114 00117 timestamp_t previous_instruction_timestamp; 00118 00121 timestamp_t previous_reference_timestamp; 00122 00125 context_ID_t previous_context_ID; 00126 00129 virtual_page_ID_t previous_page_ID; 00130 00131 }; // class Reference_Reader 00132 // =================================================================== 00133 00134 00135 00136 // =================================================================== 00137 #endif // _PER_TASK_PAGE_REDUCED_READER_HH 00138 // ===================================================================