pseudo_inst.cc (7822:fc475ac7d2a4) | pseudo_inst.cc (7823:dac01f14f20f) |
---|---|
1/* 2 * Copyright (c) 2003-2006 The Regents of The University of Michigan 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions are 7 * met: redistributions of source code must retain the above copyright 8 * notice, this list of conditions and the following disclaimer; --- 81 unchanged lines hidden (view full) --- 90{ 91 BaseCPU *cpu = tc->getCpuPtr(); 92 93 if (!cpu->params()->do_quiesce || ns == 0) 94 return; 95 96 EndQuiesceEvent *quiesceEvent = tc->getQuiesceEvent(); 97 | 1/* 2 * Copyright (c) 2003-2006 The Regents of The University of Michigan 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions are 7 * met: redistributions of source code must retain the above copyright 8 * notice, this list of conditions and the following disclaimer; --- 81 unchanged lines hidden (view full) --- 90{ 91 BaseCPU *cpu = tc->getCpuPtr(); 92 93 if (!cpu->params()->do_quiesce || ns == 0) 94 return; 95 96 EndQuiesceEvent *quiesceEvent = tc->getQuiesceEvent(); 97 |
98 Tick resume = curTick + SimClock::Int::ns * ns; | 98 Tick resume = curTick() + SimClock::Int::ns * ns; |
99 100 cpu->reschedule(quiesceEvent, resume, true); 101 102 DPRINTF(Quiesce, "%s: quiesceNs(%d) until %d\n", 103 cpu->name(), ns, resume); 104 105 tc->suspend(); 106 if (tc->getKernelStats()) --- 5 unchanged lines hidden (view full) --- 112{ 113 BaseCPU *cpu = tc->getCpuPtr(); 114 115 if (!cpu->params()->do_quiesce || cycles == 0) 116 return; 117 118 EndQuiesceEvent *quiesceEvent = tc->getQuiesceEvent(); 119 | 99 100 cpu->reschedule(quiesceEvent, resume, true); 101 102 DPRINTF(Quiesce, "%s: quiesceNs(%d) until %d\n", 103 cpu->name(), ns, resume); 104 105 tc->suspend(); 106 if (tc->getKernelStats()) --- 5 unchanged lines hidden (view full) --- 112{ 113 BaseCPU *cpu = tc->getCpuPtr(); 114 115 if (!cpu->params()->do_quiesce || cycles == 0) 116 return; 117 118 EndQuiesceEvent *quiesceEvent = tc->getQuiesceEvent(); 119 |
120 Tick resume = curTick + cpu->ticks(cycles); | 120 Tick resume = curTick() + cpu->ticks(cycles); |
121 122 cpu->reschedule(quiesceEvent, resume, true); 123 124 DPRINTF(Quiesce, "%s: quiesceCycles(%d) until %d\n", 125 cpu->name(), cycles, resume); 126 127 tc->suspend(); 128 if (tc->getKernelStats()) --- 7 unchanged lines hidden (view full) --- 136 SimClock::Int::ns; 137} 138 139#endif 140 141uint64_t 142rpns(ThreadContext *tc) 143{ | 121 122 cpu->reschedule(quiesceEvent, resume, true); 123 124 DPRINTF(Quiesce, "%s: quiesceCycles(%d) until %d\n", 125 cpu->name(), cycles, resume); 126 127 tc->suspend(); 128 if (tc->getKernelStats()) --- 7 unchanged lines hidden (view full) --- 136 SimClock::Int::ns; 137} 138 139#endif 140 141uint64_t 142rpns(ThreadContext *tc) 143{ |
144 return curTick / SimClock::Int::ns; | 144 return curTick() / SimClock::Int::ns; |
145} 146 147void 148wakeCPU(ThreadContext *tc, uint64_t cpuid) 149{ 150 System *sys = tc->getSystemPtr(); 151 ThreadContext *other_tc = sys->threadContexts[cpuid]; 152 if (other_tc->status() == ThreadContext::Suspended) 153 other_tc->activate(); 154} 155 156void 157m5exit(ThreadContext *tc, Tick delay) 158{ | 145} 146 147void 148wakeCPU(ThreadContext *tc, uint64_t cpuid) 149{ 150 System *sys = tc->getSystemPtr(); 151 ThreadContext *other_tc = sys->threadContexts[cpuid]; 152 if (other_tc->status() == ThreadContext::Suspended) 153 other_tc->activate(); 154} 155 156void 157m5exit(ThreadContext *tc, Tick delay) 158{ |
159 Tick when = curTick + delay * SimClock::Int::ns; | 159 Tick when = curTick() + delay * SimClock::Int::ns; |
160 exitSimLoop("m5_exit instruction encountered", 0, when); 161} 162 163#if FULL_SYSTEM 164 165void 166loadsymbol(ThreadContext *tc) 167{ --- 60 unchanged lines hidden (view full) --- 228 229void 230resetstats(ThreadContext *tc, Tick delay, Tick period) 231{ 232 if (!tc->getCpuPtr()->params()->do_statistics_insts) 233 return; 234 235 | 160 exitSimLoop("m5_exit instruction encountered", 0, when); 161} 162 163#if FULL_SYSTEM 164 165void 166loadsymbol(ThreadContext *tc) 167{ --- 60 unchanged lines hidden (view full) --- 228 229void 230resetstats(ThreadContext *tc, Tick delay, Tick period) 231{ 232 if (!tc->getCpuPtr()->params()->do_statistics_insts) 233 return; 234 235 |
236 Tick when = curTick + delay * SimClock::Int::ns; | 236 Tick when = curTick() + delay * SimClock::Int::ns; |
237 Tick repeat = period * SimClock::Int::ns; 238 239 Stats::schedStatEvent(false, true, when, repeat); 240} 241 242void 243dumpstats(ThreadContext *tc, Tick delay, Tick period) 244{ 245 if (!tc->getCpuPtr()->params()->do_statistics_insts) 246 return; 247 248 | 237 Tick repeat = period * SimClock::Int::ns; 238 239 Stats::schedStatEvent(false, true, when, repeat); 240} 241 242void 243dumpstats(ThreadContext *tc, Tick delay, Tick period) 244{ 245 if (!tc->getCpuPtr()->params()->do_statistics_insts) 246 return; 247 248 |
249 Tick when = curTick + delay * SimClock::Int::ns; | 249 Tick when = curTick() + delay * SimClock::Int::ns; |
250 Tick repeat = period * SimClock::Int::ns; 251 252 Stats::schedStatEvent(true, false, when, repeat); 253} 254 255void 256dumpresetstats(ThreadContext *tc, Tick delay, Tick period) 257{ 258 if (!tc->getCpuPtr()->params()->do_statistics_insts) 259 return; 260 261 | 250 Tick repeat = period * SimClock::Int::ns; 251 252 Stats::schedStatEvent(true, false, when, repeat); 253} 254 255void 256dumpresetstats(ThreadContext *tc, Tick delay, Tick period) 257{ 258 if (!tc->getCpuPtr()->params()->do_statistics_insts) 259 return; 260 261 |
262 Tick when = curTick + delay * SimClock::Int::ns; | 262 Tick when = curTick() + delay * SimClock::Int::ns; |
263 Tick repeat = period * SimClock::Int::ns; 264 265 Stats::schedStatEvent(true, true, when, repeat); 266} 267 268void 269m5checkpoint(ThreadContext *tc, Tick delay, Tick period) 270{ 271 if (!tc->getCpuPtr()->params()->do_checkpoint_insts) 272 return; 273 | 263 Tick repeat = period * SimClock::Int::ns; 264 265 Stats::schedStatEvent(true, true, when, repeat); 266} 267 268void 269m5checkpoint(ThreadContext *tc, Tick delay, Tick period) 270{ 271 if (!tc->getCpuPtr()->params()->do_checkpoint_insts) 272 return; 273 |
274 Tick when = curTick + delay * SimClock::Int::ns; | 274 Tick when = curTick() + delay * SimClock::Int::ns; |
275 Tick repeat = period * SimClock::Int::ns; 276 277 exitSimLoop("checkpoint", 0, when, repeat); 278} 279 280#if FULL_SYSTEM 281 282uint64_t --- 49 unchanged lines hidden --- | 275 Tick repeat = period * SimClock::Int::ns; 276 277 exitSimLoop("checkpoint", 0, when, repeat); 278} 279 280#if FULL_SYSTEM 281 282uint64_t --- 49 unchanged lines hidden --- |