void openTrace() { if (Config.bochs_fe) { m_trace = new TraceBochs(m_ID); return; } string tracefile; tracefile = Simulator.network.workload.getFile(m_ID); if (tracefile == "null") { m_trace = null; Console.WriteLine("tracefile at {0} is null", m_ID); return; } if (tracefile == "synth") { m_trace = new TraceSynth(m_group); } else if (tracefile.EndsWith(".gz")) { m_trace = new TraceFile_Old(tracefile, m_group); } else if (tracefile.EndsWith(".bin")) { m_trace = new TraceFile_Old_Scalable(tracefile, m_group); } else { m_trace = new TraceFile_New(tracefile, m_group); } if (Config.randomize_trace > 0) { ulong start = (ulong)(Simulator.rand.NextDouble() * Config.randomize_trace); Console.WriteLine("CPU {0} starting at insn {1}", m_ID, start); Simulator.stats.skipped_insns_persrc[m_ID].Add(start); m_trace.seek(start); m_ins.SeekLog(start); } }
void openTrace(bool isGPU) { if (Config.bochs_fe) { m_trace = new TraceBochs(m_ID); return; } string tracefile = Simulator.network.workload.getFile(m_ID); if (tracefile == "null") { m_trace = null; Console.WriteLine("tracefile at {0} is null", m_ID); return; } if (isGPU) { m_trace = new TraceFile_AMD_GPU(tracefile, m_group); } else if (tracefile == "synth") { m_trace = new TraceSynth(m_group); } else if (tracefile.EndsWith(".gz")) { Console.WriteLine("HOGE:{0}", tracefile); if (tracefile.Contains("HWA") && (Config.sched.hwaBankCheckNum > 0)) { m_trace = new TraceFile_Old_Bank_Check(tracefile, m_group, Config.sched.hwaBankCheckNum, Config.sched.is_chunk_base); } else if (tracefile.Contains("HWA") && (Config.sched.qosPreDstCheckNum > 0)) { m_trace = new TraceFile_Old_EnPreCheck(tracefile, m_group); } else if (tracefile.Contains("NPB")) { m_trace = new TraceFile_Old_withPC(tracefile, m_group); } else { m_trace = new TraceFile_Old(tracefile, m_group); } } else if (tracefile.EndsWith(".bin")) { m_trace = new TraceFile_Old_Scalable(tracefile, m_group); } else { m_trace = new TraceFile_New(tracefile, m_group); } if (Config.randomize_trace > 0) { ulong start = (ulong)(Simulator.rand.NextDouble() * Config.randomize_trace); Console.WriteLine("CPU {0} starting at insn {1}", m_ID, start); Simulator.stats.skipped_insns_persrc[m_ID].Add(start); m_trace.seek(start); m_ins.SeekLog(start); } }