- Timestamp:
- Jun 10, 2011 4:04:47 PM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/VMM/VMMR3/TM.cpp
r37414 r37415 130 130 #include <VBox/vmm/pdmapi.h> 131 131 #include <VBox/vmm/iom.h> 132 #include <VBox/vmm/dbgftrace.h>133 132 #include "TMInternal.h" 134 133 #include <VBox/vmm/vm.h> … … 2077 2076 STAM_COUNTER_INC(&pVM->tm.s.StatVirtualSyncRunStoppedAlready); 2078 2077 u64Now = pVM->tm.s.u64VirtualSync; 2079 #if 0 //def DEBUG_bird2078 #ifdef DEBUG_bird 2080 2079 Assert(u64Now <= pNext->u64Expire); 2081 2080 #endif 2082 if (u64Now > pNext->u64Expire)2083 DBGFTRACE_U64_TAG2(pVM, u64Now - pNext->u64Expire, "stopped after timer expired", pNext->pszDesc);2084 2081 } 2085 2082 else … … 2182 2179 2183 2180 /* advance the clock - don't permit timers to be out of order or armed in the 'past'. */ 2184 if (pTimer->u64Expire < u64Prev)2185 DBGFTRACE_U64_TAG2(pVM, u64Prev - pTimer->u64Expire, "timer expires in the past", pNext->pszDesc);2186 2181 #ifdef DEBUG_bird 2187 2182 #ifdef VBOX_STRICT 2188 //AssertMsg(pTimer->u64Expire >= u64Prev, ("%'RU64 < %'RU64 %s\n", pTimer->u64Expire, u64Prev, pTimer->pszDesc));2183 AssertMsg(pTimer->u64Expire >= u64Prev, ("%'RU64 < %'RU64 %s\n", pTimer->u64Expire, u64Prev, pTimer->pszDesc)); 2189 2184 u64Prev = pTimer->u64Expire; 2190 2185 #endif … … 2195 2190 /* fire */ 2196 2191 TM_SET_STATE(pTimer, TMTIMERSTATE_EXPIRED_DELIVER); 2197 DBGFTRACE_U64_TAG(pVM, pVM->tm.s.u64VirtualSync, pTimer->pszDesc);2198 2192 switch (pTimer->enmType) 2199 2193 { … … 2236 2230 Assert(u64VirtualNow2 >= u64VirtualNow); 2237 2231 #ifdef DEBUG_bird 2238 //AssertMsg(pVM->tm.s.u64VirtualSync >= u64Now, ("%'RU64 < %'RU64\n", pVM->tm.s.u64VirtualSync, u64Now));2232 AssertMsg(pVM->tm.s.u64VirtualSync >= u64Now, ("%'RU64 < %'RU64\n", pVM->tm.s.u64VirtualSync, u64Now)); 2239 2233 #endif 2240 if (pVM->tm.s.u64VirtualSync < u64Now)2241 DBGFTRACE_U64_TAG(pVM, u64Now - pVM->tm.s.u64VirtualSync, "u64VirtualSync < u64Now");2242 2243 2234 const uint64_t offSlack = pVM->tm.s.u64VirtualSync - u64Now; 2244 2235 STAM_STATS({ … … 2284 2275 ASMAtomicWriteBool(&pVM->tm.s.fVirtualSyncCatchUp, false); 2285 2276 Log4(("TM: %'RU64/-%'8RU64: caught up [pt]\n", u64VirtualNow2 - offNew, offLag)); 2286 DBGFTRACE_U64_TAG(pVM, u64VirtualNow2 - offNew, "vs caught up [pt]");2287 2277 } 2288 2278 else if (offLag <= pVM->tm.s.u64VirtualSyncCatchUpGiveUpThreshold) … … 2298 2288 ASMAtomicWriteU32(&pVM->tm.s.u32VirtualSyncCatchUpPercentage, pVM->tm.s.aVirtualSyncCatchUpPeriods[i].u32Percentage); 2299 2289 Log4(("TM: %'RU64/%'8RU64: adj %u%%\n", u64VirtualNow2 - offNew, offLag, pVM->tm.s.u32VirtualSyncCatchUpPercentage)); 2300 DBGFTRACE_U64_TAG(pVM, pVM->tm.s.u32VirtualSyncCatchUpPercentage, "vs adj");2301 2290 } 2302 else2303 DBGFTRACE_U64_TAG(pVM, u64VirtualNow2 - offNew, "vs resuming catch up");2304 2291 pVM->tm.s.u64VirtualSyncCatchUpPrev = u64VirtualNow2; 2305 2292 } … … 2313 2300 Log4(("TM: %'RU64/%'8RU64: give up %u%%\n", u64VirtualNow2 - offNew, offLag, pVM->tm.s.u32VirtualSyncCatchUpPercentage)); 2314 2301 LogRel(("TM: Giving up catch-up attempt at a %'RU64 ns lag; new total: %'RU64 ns\n", offLag, offNew)); 2315 DBGFTRACE_U64_TAG(pVM, u64VirtualNow2 - offNew, "vs gave up");2316 2302 } 2317 2303 } … … 2330 2316 ASMAtomicWriteBool(&pVM->tm.s.fVirtualSyncCatchUp, true); 2331 2317 Log4(("TM: %'RU64/%'8RU64: catch-up %u%%\n", u64VirtualNow2 - offNew, offLag, pVM->tm.s.u32VirtualSyncCatchUpPercentage)); 2332 DBGFTRACE_U64_TAG(pVM, pVM->tm.s.u32VirtualSyncCatchUpPercentage, "vs start");2333 2318 } 2334 2319 else … … 2339 2324 Log4(("TM: %'RU64/%'8RU64: give up\n", u64VirtualNow2 - offNew, offLag)); 2340 2325 LogRel(("TM: Not bothering to attempt catching up a %'RU64 ns lag; new total: %'RU64\n", offLag, offNew)); 2341 DBGFTRACE_U64_TAG(pVM, u64VirtualNow2 - offNew, "vs don't bother");2342 2326 } 2343 2327 } 2344 else2345 DBGFTRACE_U64_TAG(pVM, u64VirtualNow2 - offNew, "vs resuming");2346 2328 2347 2329 /*
Note:
See TracChangeset
for help on using the changeset viewer.