diff options
Diffstat (limited to 'src/core/core_timing.cpp')
| -rw-r--r-- | src/core/core_timing.cpp | 48 |
1 files changed, 24 insertions, 24 deletions
diff --git a/src/core/core_timing.cpp b/src/core/core_timing.cpp index d6e9dc849..558c6cbf7 100644 --- a/src/core/core_timing.cpp +++ b/src/core/core_timing.cpp | |||
| @@ -41,7 +41,7 @@ struct BaseEvent | |||
| 41 | s64 time; | 41 | s64 time; |
| 42 | u64 userdata; | 42 | u64 userdata; |
| 43 | int type; | 43 | int type; |
| 44 | // Event *next; | 44 | // Event *next; |
| 45 | }; | 45 | }; |
| 46 | 46 | ||
| 47 | typedef LinkedListItem<BaseEvent> Event; | 47 | typedef LinkedListItem<BaseEvent> Event; |
| @@ -469,8 +469,8 @@ void ProcessFifoWaitEvents() | |||
| 469 | { | 469 | { |
| 470 | if (first->time <= globalTimer) | 470 | if (first->time <= globalTimer) |
| 471 | { | 471 | { |
| 472 | // LOG(TIMER, "[Scheduler] %s (%lld, %lld) ", | 472 | //LOG(TIMER, "[Scheduler] %s (%lld, %lld) ", |
| 473 | // first->name ? first->name : "?", (u64)globalTimer, (u64)first->time); | 473 | // first->name ? first->name : "?", (u64)globalTimer, (u64)first->time); |
| 474 | Event* evt = first; | 474 | Event* evt = first; |
| 475 | first = first->next; | 475 | first = first->next; |
| 476 | event_types[evt->type].callback(evt->userdata, (int)(globalTimer - evt->time)); | 476 | event_types[evt->type].callback(evt->userdata, (int)(globalTimer - evt->time)); |
| @@ -516,23 +516,23 @@ void Advance() | |||
| 516 | //currentMIPS->downcount = slicelength; | 516 | //currentMIPS->downcount = slicelength; |
| 517 | 517 | ||
| 518 | //if (Common::AtomicLoadAcquire(hasTsEvents)) | 518 | //if (Common::AtomicLoadAcquire(hasTsEvents)) |
| 519 | // MoveEvents(); | 519 | // MoveEvents(); |
| 520 | //ProcessFifoWaitEvents(); | 520 | //ProcessFifoWaitEvents(); |
| 521 | 521 | ||
| 522 | //if (!first) | 522 | //if (!first) |
| 523 | //{ | 523 | //{ |
| 524 | // // WARN_LOG(TIMER, "WARNING - no events in queue. Setting currentMIPS->downcount to 10000"); | 524 | // // WARN_LOG(TIMER, "WARNING - no events in queue. Setting currentMIPS->downcount to 10000"); |
| 525 | // currentMIPS->downcount += 10000; | 525 | // currentMIPS->downcount += 10000; |
| 526 | //} | 526 | //} |
| 527 | //else | 527 | //else |
| 528 | //{ | 528 | //{ |
| 529 | // slicelength = (int)(first->time - globalTimer); | 529 | // slicelength = (int)(first->time - globalTimer); |
| 530 | // if (slicelength > MAX_SLICE_LENGTH) | 530 | // if (slicelength > MAX_SLICE_LENGTH) |
| 531 | // slicelength = MAX_SLICE_LENGTH; | 531 | // slicelength = MAX_SLICE_LENGTH; |
| 532 | // currentMIPS->downcount = slicelength; | 532 | // currentMIPS->downcount = slicelength; |
| 533 | //} | 533 | //} |
| 534 | //if (advanceCallback) | 534 | //if (advanceCallback) |
| 535 | // advanceCallback(cyclesExecuted); | 535 | // advanceCallback(cyclesExecuted); |
| 536 | } | 536 | } |
| 537 | 537 | ||
| 538 | void LogPendingEvents() | 538 | void LogPendingEvents() |
| @@ -550,20 +550,20 @@ void Idle(int maxIdle) | |||
| 550 | ERROR_LOG(TIME, "Unimplemented function!"); | 550 | ERROR_LOG(TIME, "Unimplemented function!"); |
| 551 | //int cyclesDown = currentMIPS->downcount; | 551 | //int cyclesDown = currentMIPS->downcount; |
| 552 | //if (maxIdle != 0 && cyclesDown > maxIdle) | 552 | //if (maxIdle != 0 && cyclesDown > maxIdle) |
| 553 | // cyclesDown = maxIdle; | 553 | // cyclesDown = maxIdle; |
| 554 | 554 | ||
| 555 | //if (first && cyclesDown > 0) | 555 | //if (first && cyclesDown > 0) |
| 556 | //{ | 556 | //{ |
| 557 | // int cyclesExecuted = slicelength - currentMIPS->downcount; | 557 | // int cyclesExecuted = slicelength - currentMIPS->downcount; |
| 558 | // int cyclesNextEvent = (int) (first->time - globalTimer); | 558 | // int cyclesNextEvent = (int) (first->time - globalTimer); |
| 559 | 559 | ||
| 560 | // if (cyclesNextEvent < cyclesExecuted + cyclesDown) | 560 | // if (cyclesNextEvent < cyclesExecuted + cyclesDown) |
| 561 | // { | 561 | // { |
| 562 | // cyclesDown = cyclesNextEvent - cyclesExecuted; | 562 | // cyclesDown = cyclesNextEvent - cyclesExecuted; |
| 563 | // // Now, now... no time machines, please. | 563 | // // Now, now... no time machines, please. |
| 564 | // if (cyclesDown < 0) | 564 | // if (cyclesDown < 0) |
| 565 | // cyclesDown = 0; | 565 | // cyclesDown = 0; |
| 566 | // } | 566 | // } |
| 567 | //} | 567 | //} |
| 568 | 568 | ||
| 569 | //INFO_LOG(TIME, "Idle for %i cycles! (%f ms)", cyclesDown, cyclesDown / (float)(g_clock_rate_arm11 * 0.001f)); | 569 | //INFO_LOG(TIME, "Idle for %i cycles! (%f ms)", cyclesDown, cyclesDown / (float)(g_clock_rate_arm11 * 0.001f)); |
| @@ -571,7 +571,7 @@ void Idle(int maxIdle) | |||
| 571 | //idledCycles += cyclesDown; | 571 | //idledCycles += cyclesDown; |
| 572 | //currentMIPS->downcount -= cyclesDown; | 572 | //currentMIPS->downcount -= cyclesDown; |
| 573 | //if (currentMIPS->downcount == 0) | 573 | //if (currentMIPS->downcount == 0) |
| 574 | // currentMIPS->downcount = -1; | 574 | // currentMIPS->downcount = -1; |
| 575 | } | 575 | } |
| 576 | 576 | ||
| 577 | std::string GetScheduledEventsSummary() | 577 | std::string GetScheduledEventsSummary() |
| @@ -623,4 +623,4 @@ void DoState(PointerWrap &p) | |||
| 623 | p.Do(idledCycles); | 623 | p.Do(idledCycles); |
| 624 | } | 624 | } |
| 625 | 625 | ||
| 626 | } // namespace | 626 | } // namespace |