pseudo_inst.cc (6658:f4de76601762) | pseudo_inst.cc (7064:586b0e3a12b3) |
---|---|
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; --- 79 unchanged lines hidden (view full) --- 88void 89quiesceNs(ThreadContext *tc, uint64_t ns) 90{ 91 if (!tc->getCpuPtr()->params()->do_quiesce || ns == 0) 92 return; 93 94 EndQuiesceEvent *quiesceEvent = tc->getQuiesceEvent(); 95 | 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; --- 79 unchanged lines hidden (view full) --- 88void 89quiesceNs(ThreadContext *tc, uint64_t ns) 90{ 91 if (!tc->getCpuPtr()->params()->do_quiesce || ns == 0) 92 return; 93 94 EndQuiesceEvent *quiesceEvent = tc->getQuiesceEvent(); 95 |
96 Tick resume = curTick + Clock::Int::ns * ns; | 96 Tick resume = curTick + SimClock::Int::ns * ns; |
97 98 mainEventQueue.reschedule(quiesceEvent, resume, true); 99 100 DPRINTF(Quiesce, "%s: quiesceNs(%d) until %d\n", 101 tc->getCpuPtr()->name(), ns, resume); 102 103 tc->suspend(); 104 if (tc->getKernelStats()) --- 18 unchanged lines hidden (view full) --- 123 tc->suspend(); 124 if (tc->getKernelStats()) 125 tc->getKernelStats()->quiesce(); 126} 127 128uint64_t 129quiesceTime(ThreadContext *tc) 130{ | 97 98 mainEventQueue.reschedule(quiesceEvent, resume, true); 99 100 DPRINTF(Quiesce, "%s: quiesceNs(%d) until %d\n", 101 tc->getCpuPtr()->name(), ns, resume); 102 103 tc->suspend(); 104 if (tc->getKernelStats()) --- 18 unchanged lines hidden (view full) --- 123 tc->suspend(); 124 if (tc->getKernelStats()) 125 tc->getKernelStats()->quiesce(); 126} 127 128uint64_t 129quiesceTime(ThreadContext *tc) 130{ |
131 return (tc->readLastActivate() - tc->readLastSuspend()) / Clock::Int::ns; | 131 return (tc->readLastActivate() - tc->readLastSuspend()) / 132 SimClock::Int::ns; |
132} 133 134#endif 135 136uint64_t 137rpns(ThreadContext *tc) 138{ | 133} 134 135#endif 136 137uint64_t 138rpns(ThreadContext *tc) 139{ |
139 return curTick / Clock::Int::ns; | 140 return curTick / SimClock::Int::ns; |
140} 141 142void 143wakeCPU(ThreadContext *tc, uint64_t cpuid) 144{ 145 System *sys = tc->getSystemPtr(); 146 ThreadContext *other_tc = sys->threadContexts[cpuid]; 147 if (other_tc->status() == ThreadContext::Suspended) 148 other_tc->activate(); 149} 150 151void 152m5exit(ThreadContext *tc, Tick delay) 153{ | 141} 142 143void 144wakeCPU(ThreadContext *tc, uint64_t cpuid) 145{ 146 System *sys = tc->getSystemPtr(); 147 ThreadContext *other_tc = sys->threadContexts[cpuid]; 148 if (other_tc->status() == ThreadContext::Suspended) 149 other_tc->activate(); 150} 151 152void 153m5exit(ThreadContext *tc, Tick delay) 154{ |
154 Tick when = curTick + delay * Clock::Int::ns; | 155 Tick when = curTick + delay * SimClock::Int::ns; |
155 Event *event = new SimLoopExitEvent("m5_exit instruction encountered", 0); 156 mainEventQueue.schedule(event, when); 157} 158 159#if FULL_SYSTEM 160 161void 162loadsymbol(ThreadContext *tc) --- 61 unchanged lines hidden (view full) --- 224 225void 226resetstats(ThreadContext *tc, Tick delay, Tick period) 227{ 228 if (!tc->getCpuPtr()->params()->do_statistics_insts) 229 return; 230 231 | 156 Event *event = new SimLoopExitEvent("m5_exit instruction encountered", 0); 157 mainEventQueue.schedule(event, when); 158} 159 160#if FULL_SYSTEM 161 162void 163loadsymbol(ThreadContext *tc) --- 61 unchanged lines hidden (view full) --- 225 226void 227resetstats(ThreadContext *tc, Tick delay, Tick period) 228{ 229 if (!tc->getCpuPtr()->params()->do_statistics_insts) 230 return; 231 232 |
232 Tick when = curTick + delay * Clock::Int::ns; 233 Tick repeat = period * Clock::Int::ns; | 233 Tick when = curTick + delay * SimClock::Int::ns; 234 Tick repeat = period * SimClock::Int::ns; |
234 235 Stats::StatEvent(false, true, when, repeat); 236} 237 238void 239dumpstats(ThreadContext *tc, Tick delay, Tick period) 240{ 241 if (!tc->getCpuPtr()->params()->do_statistics_insts) 242 return; 243 244 | 235 236 Stats::StatEvent(false, true, when, repeat); 237} 238 239void 240dumpstats(ThreadContext *tc, Tick delay, Tick period) 241{ 242 if (!tc->getCpuPtr()->params()->do_statistics_insts) 243 return; 244 245 |
245 Tick when = curTick + delay * Clock::Int::ns; 246 Tick repeat = period * Clock::Int::ns; | 246 Tick when = curTick + delay * SimClock::Int::ns; 247 Tick repeat = period * SimClock::Int::ns; |
247 248 Stats::StatEvent(true, false, when, repeat); 249} 250 251void 252dumpresetstats(ThreadContext *tc, Tick delay, Tick period) 253{ 254 if (!tc->getCpuPtr()->params()->do_statistics_insts) 255 return; 256 257 | 248 249 Stats::StatEvent(true, false, when, repeat); 250} 251 252void 253dumpresetstats(ThreadContext *tc, Tick delay, Tick period) 254{ 255 if (!tc->getCpuPtr()->params()->do_statistics_insts) 256 return; 257 258 |
258 Tick when = curTick + delay * Clock::Int::ns; 259 Tick repeat = period * Clock::Int::ns; | 259 Tick when = curTick + delay * SimClock::Int::ns; 260 Tick repeat = period * SimClock::Int::ns; |
260 261 Stats::StatEvent(true, true, when, repeat); 262} 263 264void 265m5checkpoint(ThreadContext *tc, Tick delay, Tick period) 266{ 267 if (!tc->getCpuPtr()->params()->do_checkpoint_insts) 268 return; 269 | 261 262 Stats::StatEvent(true, true, when, repeat); 263} 264 265void 266m5checkpoint(ThreadContext *tc, Tick delay, Tick period) 267{ 268 if (!tc->getCpuPtr()->params()->do_checkpoint_insts) 269 return; 270 |
270 Tick when = curTick + delay * Clock::Int::ns; 271 Tick repeat = period * Clock::Int::ns; | 271 Tick when = curTick + delay * SimClock::Int::ns; 272 Tick repeat = period * SimClock::Int::ns; |
272 273 Event *event = new SimLoopExitEvent("checkpoint", 0, repeat); 274 mainEventQueue.schedule(event, when); 275} 276 277#if FULL_SYSTEM 278 279uint64_t --- 49 unchanged lines hidden --- | 273 274 Event *event = new SimLoopExitEvent("checkpoint", 0, repeat); 275 mainEventQueue.schedule(event, when); 276} 277 278#if FULL_SYSTEM 279 280uint64_t --- 49 unchanged lines hidden --- |