pseudo_inst.cc (3144:b6e9e1811d71) | pseudo_inst.cc (3368:3342dd3f5248) |
---|---|
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; --- 73 unchanged lines hidden (view full) --- 82 void 83 quiesceNs(ThreadContext *tc, uint64_t ns) 84 { 85 if (!doQuiesce || ns == 0) 86 return; 87 88 EndQuiesceEvent *quiesceEvent = tc->getQuiesceEvent(); 89 | 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; --- 73 unchanged lines hidden (view full) --- 82 void 83 quiesceNs(ThreadContext *tc, uint64_t ns) 84 { 85 if (!doQuiesce || ns == 0) 86 return; 87 88 EndQuiesceEvent *quiesceEvent = tc->getQuiesceEvent(); 89 |
90 Tick resume = curTick + Clock::Int::ns * ns; 91 |
|
90 if (quiesceEvent->scheduled()) | 92 if (quiesceEvent->scheduled()) |
91 quiesceEvent->reschedule(curTick + Clock::Int::ns * ns); | 93 quiesceEvent->reschedule(resume); |
92 else | 94 else |
93 quiesceEvent->schedule(curTick + Clock::Int::ns * ns); | 95 quiesceEvent->schedule(resume); |
94 | 96 |
97 DPRINTF(Quiesce, "%s: quiesceNs(%d) until %d\n", 98 tc->getCpuPtr()->name(), ns, resume); 99 |
|
95 tc->suspend(); 96 if (tc->getKernelStats()) 97 tc->getKernelStats()->quiesce(); 98 } 99 100 void 101 quiesceCycles(ThreadContext *tc, uint64_t cycles) 102 { 103 if (!doQuiesce || cycles == 0) 104 return; 105 106 EndQuiesceEvent *quiesceEvent = tc->getQuiesceEvent(); 107 | 100 tc->suspend(); 101 if (tc->getKernelStats()) 102 tc->getKernelStats()->quiesce(); 103 } 104 105 void 106 quiesceCycles(ThreadContext *tc, uint64_t cycles) 107 { 108 if (!doQuiesce || cycles == 0) 109 return; 110 111 EndQuiesceEvent *quiesceEvent = tc->getQuiesceEvent(); 112 |
113 Tick resume = curTick + tc->getCpuPtr()->cycles(cycles); 114 |
|
108 if (quiesceEvent->scheduled()) | 115 if (quiesceEvent->scheduled()) |
109 quiesceEvent->reschedule(curTick + 110 tc->getCpuPtr()->cycles(cycles)); | 116 quiesceEvent->reschedule(resume); |
111 else | 117 else |
112 quiesceEvent->schedule(curTick + 113 tc->getCpuPtr()->cycles(cycles)); | 118 quiesceEvent->schedule(resume); |
114 | 119 |
120 DPRINTF(Quiesce, "%s: quiesceCycles(%d) until %d\n", 121 tc->getCpuPtr()->name(), cycles, resume); 122 |
|
115 tc->suspend(); 116 if (tc->getKernelStats()) 117 tc->getKernelStats()->quiesce(); 118 } 119 120 uint64_t 121 quiesceTime(ThreadContext *tc) 122 { --- 229 unchanged lines hidden --- | 123 tc->suspend(); 124 if (tc->getKernelStats()) 125 tc->getKernelStats()->quiesce(); 126 } 127 128 uint64_t 129 quiesceTime(ThreadContext *tc) 130 { --- 229 unchanged lines hidden --- |