1/* 2 * Copyright (c) 2004-2006 The Regents of The University of Michigan 3 * Copyright (c) 2011 Regents of the University of California 4 * All rights reserved. 5 * 6 * Redistribution and use in source and binary forms, with or without 7 * modification, are permitted provided that the following conditions are 8 * met: redistributions of source code must retain the above copyright --- 424 unchanged lines hidden (view full) --- 433 .prereq(timesIdled); 434 435 idleCycles 436 .name(name() + ".idleCycles") 437 .desc("Total number of cycles that the CPU has spent unscheduled due " 438 "to idling") 439 .prereq(idleCycles); 440 |
441 quiesceCycles 442 .name(name() + ".quiesceCycles") 443 .desc("Total number of cycles that CPU has spent quiesced or waiting " 444 "for an interrupt") 445 .prereq(quiesceCycles); 446 |
447 // Number of Instructions simulated 448 // -------------------------------- 449 // Should probably be in Base CPU but need templated 450 // MaxThreads so put in here instead 451 committedInsts 452 .init(numThreads) 453 .name(name() + ".committedInsts") 454 .desc("Number of Instructions Simulated"); --- 228 unchanged lines hidden (view full) --- 683 if (lastActivatedCycle < curTick()) { 684 scheduleTickEvent(delay); 685 686 // Be sure to signal that there's some activity so the CPU doesn't 687 // deschedule itself. 688 activityRec.activity(); 689 fetch.wakeFromQuiesce(); 690 |
691 quiesceCycles += tickToCycles((curTick() - 1) - lastRunningCycle); 692 |
693 lastActivatedCycle = curTick(); 694 695 _status = Running; 696 } 697} 698 699template <class Impl> 700bool --- 18 unchanged lines hidden (view full) --- 719FullO3CPU<Impl>::suspendContext(ThreadID tid) 720{ 721 DPRINTF(O3CPU,"[tid: %i]: Suspending Thread Context.\n", tid); 722 bool deallocated = deallocateContext(tid, false, 1); 723 // If this was the last thread then unschedule the tick event. 724 if ((activeThreads.size() == 1 && !deallocated) || 725 activeThreads.size() == 0) 726 unscheduleTickEvent(); |
727 728 DPRINTF(Quiesce, "Suspending Context\n"); 729 lastRunningCycle = curTick(); |
730 _status = Idle; 731} 732 733template <class Impl> 734void 735FullO3CPU<Impl>::haltContext(ThreadID tid) 736{ 737 //For now, this is the same as deallocate --- 461 unchanged lines hidden (view full) --- 1199 ThreadContext *tc = threadContexts[i]; 1200 if (tc->status() == ThreadContext::Active && _status != Running) { 1201 _status = Running; 1202 reschedule(tickEvent, nextCycle(), true); 1203 } 1204 } 1205 if (!tickEvent.scheduled()) 1206 schedule(tickEvent, nextCycle()); |
1207 1208 lastRunningCycle = curTick(); |
1209} 1210 1211template <class Impl> 1212TheISA::MiscReg 1213FullO3CPU<Impl>::readMiscRegNoEffect(int misc_reg, ThreadID tid) 1214{ 1215 return this->isa[tid].readMiscRegNoEffect(misc_reg); 1216} --- 449 unchanged lines hidden --- |