1/* 2 * Copyright (c) 2011-2012,2016 ARM Limited 3 * All rights reserved 4 * 5 * The license below extends only to copyright in the software and shall 6 * not be construed as granting a license to any other intellectual 7 * property including but not limited to intellectual property relating 8 * to a hardware implementation of the functionality of the software --- 234 unchanged lines hidden (view full) --- 243 "per thread (%i)\n", 244 name(), interrupts.size(), numThreads); 245 for (ThreadID tid = 0; tid < numThreads; tid++) 246 interrupts[tid]->setCPU(this); 247 } 248 249 if (FullSystem) { 250 if (params()->profile) |
251 profileEvent = new EventFunctionWrapper( 252 [this]{ processProfileEvent(); }, 253 name()); |
254 } 255 tracer = params()->tracer; 256 257 if (params()->isa.size() != numThreads) { 258 fatal("Number of ISAs (%i) assigned to the CPU does not equal number " 259 "of threads (%i).\n", params()->isa.size(), numThreads); 260 } 261} --- 393 unchanged lines hidden (view full) --- 655 tc.getDTBPtr()->flushAll(); 656 if (checker) { 657 checker->getITBPtr()->flushAll(); 658 checker->getDTBPtr()->flushAll(); 659 } 660 } 661} 662 |
663void |
664BaseCPU::processProfileEvent() |
665{ |
666 ThreadID size = threadContexts.size(); |
667 |
668 for (ThreadID i = 0; i < size; ++i) 669 threadContexts[i]->profileSample(); 670 671 schedule(profileEvent, curTick() + params()->profile); |
672} 673 674void 675BaseCPU::serialize(CheckpointOut &cp) const 676{ 677 SERIALIZE_SCALAR(instCnt); 678 679 if (!_switchedOut) { --- 108 unchanged lines hidden --- |