gem5 v24.0.0.0
Loading...
Searching...
No Matches
base.cc
Go to the documentation of this file.
1/*
2 * Copyright (c) 2011-2012,2016-2017, 2019-2020 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
9 * licensed hereunder. You may use the software subject to the license
10 * terms below provided that you ensure that this notice is replicated
11 * unmodified and in its entirety in all distributions of the software,
12 * modified or unmodified, in source code or in binary form.
13 *
14 * Copyright (c) 2002-2005 The Regents of The University of Michigan
15 * Copyright (c) 2011 Regents of the University of California
16 * Copyright (c) 2013 Advanced Micro Devices, Inc.
17 * Copyright (c) 2013 Mark D. Hill and David A. Wood
18 * All rights reserved.
19 *
20 * Redistribution and use in source and binary forms, with or without
21 * modification, are permitted provided that the following conditions are
22 * met: redistributions of source code must retain the above copyright
23 * notice, this list of conditions and the following disclaimer;
24 * redistributions in binary form must reproduce the above copyright
25 * notice, this list of conditions and the following disclaimer in the
26 * documentation and/or other materials provided with the distribution;
27 * neither the name of the copyright holders nor the names of its
28 * contributors may be used to endorse or promote products derived from
29 * this software without specific prior written permission.
30 *
31 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
32 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
33 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
34 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
35 * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
36 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
37 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
38 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
39 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
40 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
41 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
42 */
43
44#include "cpu/base.hh"
45
46#include <iostream>
47#include <sstream>
48#include <string>
49
51#include "arch/generic/isa.hh"
52#include "arch/generic/tlb.hh"
53#include "base/cprintf.hh"
54#include "base/loader/symtab.hh"
55#include "base/logging.hh"
56#include "base/output.hh"
57#include "base/trace.hh"
58#include "cpu/checker/cpu.hh"
59#include "cpu/thread_context.hh"
60#include "debug/Mwait.hh"
61#include "debug/SyscallVerbose.hh"
62#include "debug/Thread.hh"
63#include "mem/page_table.hh"
64#include "params/BaseCPU.hh"
65#include "sim/clocked_object.hh"
66#include "sim/full_system.hh"
67#include "sim/process.hh"
68#include "sim/root.hh"
69#include "sim/sim_events.hh"
70#include "sim/sim_exit.hh"
71#include "sim/system.hh"
72
73// Hack
74#include "sim/stat_control.hh"
75
76namespace gem5
77{
78
79std::unique_ptr<BaseCPU::GlobalStats> BaseCPU::globalStats;
80
82
83// This variable reflects the max number of threads in any CPU. Be
84// careful to only use it once all the CPUs that you care about have
85// been initialized
87
89 : Event(Event::Progress_Event_Pri), _interval(ival), lastNumInst(0),
90 cpu(_cpu), _repeatEvent(true)
91{
92 if (_interval)
93 cpu->schedule(this, curTick() + _interval);
94}
95
96void
98{
99 Counter temp = cpu->totalOps();
100
101 if (_repeatEvent)
102 cpu->schedule(this, curTick() + _interval);
103
104 if (cpu->switchedOut()) {
105 return;
106 }
107
108#ifndef NDEBUG
109 double ipc = double(temp - lastNumInst) / (_interval / cpu->clockPeriod());
110
111 DPRINTFN("%s progress event, total committed:%i, progress insts committed: "
112 "%lli, IPC: %0.8d\n", cpu->name(), temp, temp - lastNumInst,
113 ipc);
114 ipc = 0.0;
115#else
116 cprintf("%lli: %s progress event, total committed:%i, progress insts "
117 "committed: %lli\n", curTick(), cpu->name(), temp,
118 temp - lastNumInst);
119#endif
120 lastNumInst = temp;
121}
122
123const char *
125{
126 return "CPU Progress";
127}
128
129BaseCPU::BaseCPU(const Params &p, bool is_checker)
130 : ClockedObject(p), instCnt(0), _cpuId(p.cpu_id), _socketId(p.socket_id),
131 _instRequestorId(p.system->getRequestorId(this, "inst")),
132 _dataRequestorId(p.system->getRequestorId(this, "data")),
133 _taskId(context_switch_task_id::Unknown), _pid(invldPid),
134 _switchedOut(p.switched_out), _cacheLineSize(p.system->cacheLineSize()),
135 modelResetPort(p.name + ".model_reset"),
136 interrupts(p.interrupts), numThreads(p.numThreads), system(p.system),
137 previousCycle(0), previousState(CPU_STATE_SLEEP),
138 functionTraceStream(nullptr), currentFunctionStart(0),
139 currentFunctionEnd(0), functionEntryTick(0),
140 baseStats(this),
141 addressMonitor(p.numThreads),
142 syscallRetryLatency(p.syscallRetryLatency),
143 pwrGatingLatency(p.pwr_gating_latency),
144 powerGatingOnIdle(p.power_gating_on_idle),
145 enterPwrGatingEvent([this]{ enterPwrGating(); }, name())
146{
147 // if Python did not provide a valid ID, do it here
148 if (_cpuId == -1 ) {
149 _cpuId = cpuList.size();
150 }
151
152 // add self to global list of CPUs
153 cpuList.push_back(this);
154
155 DPRINTF(SyscallVerbose, "Constructing CPU with id %d, socket id %d\n",
156 _cpuId, _socketId);
157
158 if (numThreads > maxThreadsPerCPU)
159 maxThreadsPerCPU = numThreads;
160
161 functionTracingEnabled = false;
162 if (p.function_trace) {
163 const std::string fname = csprintf("ftrace.%s", name());
164 functionTraceStream = simout.findOrCreate(fname)->stream();
165
166 currentFunctionStart = currentFunctionEnd = 0;
167 functionEntryTick = p.function_trace_start;
168
169 if (p.function_trace_start == 0) {
170 functionTracingEnabled = true;
171 } else {
172 Event *event = new EventFunctionWrapper(
173 [this]{ enableFunctionTrace(); }, name(), true);
174 schedule(event, p.function_trace_start);
175 }
176 }
177
178 tracer = params().tracer;
179
180 if (params().isa.size() != numThreads) {
181 fatal("Number of ISAs (%i) assigned to the CPU does not equal number "
182 "of threads (%i).\n", params().isa.size(), numThreads);
183 }
184
185 if (!FullSystem && params().workload.size() != numThreads) {
186 fatal("Number of processes (cpu.workload) (%i) assigned to the CPU "
187 "does not equal number of threads (%i).\n",
188 params().workload.size(), numThreads);
189 }
190
191 modelResetPort.onChange([this](const bool &new_val) {
192 setReset(new_val);
193 });
194 // create a stat group object for each thread on this core
195 fetchStats.reserve(numThreads);
196 executeStats.reserve(numThreads);
197 commitStats.reserve(numThreads);
198 for (int i = 0; i < numThreads; i++) {
199 // create fetchStat object for thread i and set rate formulas
200 FetchCPUStats* fetchStatptr = new FetchCPUStats(this, i);
201 fetchStatptr->fetchRate = fetchStatptr->numInsts / baseStats.numCycles;
202 fetchStatptr->branchRate = fetchStatptr->numBranches /
203 baseStats.numCycles;
204 fetchStats.emplace_back(fetchStatptr);
205
206 // create executeStat object for thread i and set rate formulas
207 ExecuteCPUStats* executeStatptr = new ExecuteCPUStats(this, i);
208 executeStatptr->instRate = executeStatptr->numInsts /
209 baseStats.numCycles;
210 executeStats.emplace_back(executeStatptr);
211
212 // create commitStat object for thread i and set ipc, cpi formulas
213 CommitCPUStats* commitStatptr = new CommitCPUStats(this, i);
214 commitStatptr->ipc = commitStatptr->numInsts / baseStats.numCycles;
215 commitStatptr->cpi = baseStats.numCycles / commitStatptr->numInsts;
216 commitStats.emplace_back(commitStatptr);
217 }
218}
219
220void
225
229
230void
232{
233 interrupts[tid]->post(int_num, index);
234 // Only wake up syscall emulation if it is not waiting on a futex.
235 // This is to model the fact that instructions such as ARM SEV
236 // should wake up a WFE sleep, but not a futex syscall WAIT.
238 wakeup(tid);
239}
240
241void
243{
244 assert(tid < numThreads);
245 AddressMonitor &monitor = addressMonitor[tid];
246
247 monitor.armed = true;
248 monitor.vAddr = address;
249 monitor.pAddr = 0x0;
250 DPRINTF(Mwait, "[tid:%d] Armed monitor (vAddr=0x%lx)\n", tid, address);
251}
252
253bool
255{
256 assert(tid < numThreads);
257 AddressMonitor &monitor = addressMonitor[tid];
258
259 if (!monitor.gotWakeup) {
260 Addr block_size = cacheLineSize();
261 Addr mask = ~(block_size - 1);
262
263 assert(pkt->req->hasPaddr());
264 monitor.pAddr = pkt->getAddr() & mask;
265 monitor.waiting = true;
266
267 DPRINTF(Mwait, "[tid:%d] mwait called (vAddr=0x%lx, "
268 "line's paddr=0x%lx)\n", tid, monitor.vAddr, monitor.pAddr);
269 return true;
270 } else {
271 monitor.gotWakeup = false;
272 return false;
273 }
274}
275
276void
278{
279 assert(tid < numThreads);
280 AddressMonitor &monitor = addressMonitor[tid];
281
282 RequestPtr req = std::make_shared<Request>();
283
284 Addr addr = monitor.vAddr;
285 Addr block_size = cacheLineSize();
286 Addr mask = ~(block_size - 1);
287 int size = block_size;
288
289 //The address of the next line if it crosses a cache line boundary.
290 Addr secondAddr = roundDown(addr + size - 1, block_size);
291
292 if (secondAddr > addr)
293 size = secondAddr - addr;
294
295 req->setVirt(addr, size, 0x0, dataRequestorId(),
296 tc->pcState().instAddr());
297
298 // translate to physical address
299 Fault fault = mmu->translateAtomic(req, tc, BaseMMU::Read);
300 assert(fault == NoFault);
301
302 monitor.pAddr = req->getPaddr() & mask;
303 monitor.waiting = true;
304
305 DPRINTF(Mwait, "[tid:%d] mwait called (vAddr=0x%lx, line's paddr=0x%lx)\n",
306 tid, monitor.vAddr, monitor.pAddr);
307}
308
309void
311{
312 // Set up instruction-count-based termination events, if any. This needs
313 // to happen after threadContexts has been constructed.
314 if (params().max_insts_any_thread != 0) {
315 scheduleInstStopAnyThread(params().max_insts_any_thread);
316 }
317
318 // Set up instruction-count-based termination events for SimPoints
319 // Typically, there are more than one action points.
320 // Simulation.py is responsible to take the necessary actions upon
321 // exitting the simulation loop.
322 if (!params().simpoint_start_insts.empty()) {
323 scheduleSimpointsInstStop(params().simpoint_start_insts);
324 }
325
326 if (params().max_insts_all_threads != 0) {
327 std::string cause = "all threads reached the max instruction count";
328
329 // allocate & initialize shared downcounter: each event will
330 // decrement this when triggered; simulation will terminate
331 // when counter reaches 0
332 int *counter = new int;
333 *counter = numThreads;
334 for (ThreadID tid = 0; tid < numThreads; ++tid) {
335 Event *event = new CountedExitEvent(cause, *counter);
336 threadContexts[tid]->scheduleInstCountEvent(
337 event, params().max_insts_all_threads);
338 }
339 }
340
341 if (!params().switched_out) {
343
345 }
346}
347
348void
350{
351 if (params().progress_interval) {
352 new CPUProgressEvent(this, params().progress_interval);
353 }
354
355 if (_switchedOut)
356 powerState->set(enums::PwrState::OFF);
357
358 // Assumption CPU start to operate instantaneously without any latency
359 if (powerState->get() == enums::PwrState::UNDEFINED)
360 powerState->set(enums::PwrState::ON);
361
362}
363
366{
368 ptr.reset(new probing::PMU(getProbeManager(), name));
369
370 return ptr;
371}
372
373void
375{
376 ppAllCycles = pmuProbePoint("Cycles");
377 ppActiveCycles = pmuProbePoint("ActiveCycles");
378
379 ppRetiredInsts = pmuProbePoint("RetiredInsts");
380 ppRetiredInstsPC = pmuProbePoint("RetiredInstsPC");
381 ppRetiredLoads = pmuProbePoint("RetiredLoads");
382 ppRetiredStores = pmuProbePoint("RetiredStores");
383 ppRetiredBranches = pmuProbePoint("RetiredBranches");
384
386 "Sleeping");
387}
388
389void
391{
392 if (!inst->isMicroop() || inst->isLastMicroop()) {
393 ppRetiredInsts->notify(1);
394 ppRetiredInstsPC->notify(pc);
395 }
396
397 if (inst->isLoad())
398 ppRetiredLoads->notify(1);
399
400 if (inst->isStore() || inst->isAtomic())
401 ppRetiredStores->notify(1);
402
403 if (inst->isControl())
404 ppRetiredBranches->notify(1);
405}
406
409 : statistics::Group(parent),
410 ADD_STAT(numCycles, statistics::units::Cycle::get(),
411 "Number of cpu cycles simulated"),
412 ADD_STAT(cpi, statistics::units::Rate<
413 statistics::units::Cycle, statistics::units::Count>::get(),
414 "CPI: cycles per instruction (core level)"),
415 ADD_STAT(ipc, statistics::units::Rate<
416 statistics::units::Count, statistics::units::Cycle>::get(),
417 "IPC: instructions per cycle (core level)"),
418 ADD_STAT(numWorkItemsStarted, statistics::units::Count::get(),
419 "Number of work items this cpu started"),
420 ADD_STAT(numWorkItemsCompleted, statistics::units::Count::get(),
421 "Number of work items this cpu completed")
422{
423 cpi.precision(6);
425
426 ipc.precision(6);
428}
429
430void
432{
434
435 if (!globalStats) {
436 /* We need to construct the global CPU stat structure here
437 * since it needs a pointer to the Root object. */
438 globalStats.reset(new GlobalStats(Root::root()));
439 }
440
441 using namespace statistics;
442
443 int size = threadContexts.size();
444 if (size > 1) {
445 for (int i = 0; i < size; ++i) {
446 std::stringstream namestr;
447 ccprintf(namestr, "%s.ctx%d", name(), i);
448 threadContexts[i]->regStats(namestr.str());
449 }
450 } else if (size == 1)
451 threadContexts[0]->regStats(name());
452}
453
454Port &
455BaseCPU::getPort(const std::string &if_name, PortID idx)
456{
457 // Get the right port based on name. This applies to all the
458 // subclasses of the base CPU and relies on their implementation
459 // of getDataPort and getInstPort.
460 if (if_name == "dcache_port")
461 return getDataPort();
462 else if (if_name == "icache_port")
463 return getInstPort();
464 else if (if_name == "model_reset")
465 return modelResetPort;
466 else
467 return ClockedObject::getPort(if_name, idx);
468}
469
470void
472{
473 assert(system->multiThread || numThreads == 1);
474
476 "CPU %s has %i interrupt controllers, but is expecting one "
477 "per thread (%i)\n",
478 name(), interrupts.size(), numThreads);
479
480 for (ThreadID tid = 0; tid < threadContexts.size(); ++tid) {
481 ThreadContext *tc = threadContexts[tid];
482
484
485 if (!FullSystem)
487
488 interrupts[tid]->setThreadContext(tc);
489 tc->getIsaPtr()->setThreadContext(tc);
490 }
491}
492
493void
500
501void
503{
504 for (auto tc : threadContexts) {
505 if (tc->status() == ThreadContext::Active)
506 return;
507 }
508
509 if (powerState->get() == enums::PwrState::CLK_GATED &&
512 // Schedule a power gating event when clock gated for the specified
513 // amount of time
515 }
516}
517
518int
520{
521 ThreadID size = threadContexts.size();
522 for (ThreadID tid = 0; tid < size; ++tid) {
523 if (tc == threadContexts[tid])
524 return tid;
525 }
526 return 0;
527}
528
529void
531{
532 if (modelResetPort.state()) {
533 DPRINTF(Thread, "CPU in reset, not activating context %d\n",
534 threadContexts[thread_num]->contextId());
535 return;
536 }
537
538 DPRINTF(Thread, "activate contextId %d\n",
539 threadContexts[thread_num]->contextId());
540 // Squash enter power gating event while cpu gets activated
543 // For any active thread running, update CPU power state to active (ON)
544 powerState->set(enums::PwrState::ON);
545
547}
548
549void
551{
552 DPRINTF(Thread, "suspend contextId %d\n",
553 threadContexts[thread_num]->contextId());
554 // Check if all threads are suspended
555 for (auto t : threadContexts) {
556 if (t->status() != ThreadContext::Suspended) {
557 return;
558 }
559 }
560
561 // All CPU thread are suspended, update cycle count
563
564 // All CPU threads suspended, enter lower power state for the CPU
565 powerState->set(enums::PwrState::CLK_GATED);
566
567 // If pwrGatingLatency is set to 0 then this mechanism is disabled
568 if (powerGatingOnIdle) {
569 // Schedule power gating event when clock gated for pwrGatingLatency
570 // cycles
572 }
573}
574
575void
580
581void
583{
584 powerState->set(enums::PwrState::OFF);
585}
586
587void
589{
590 assert(!_switchedOut);
591 _switchedOut = true;
592
593 // Flush all TLBs in the CPU to avoid having stale translations if
594 // it gets switched in later.
595 flushTLBs();
596
597 // Go to the power gating state
598 powerState->set(enums::PwrState::OFF);
599}
600
601void
603{
604 assert(threadContexts.size() == oldCPU->threadContexts.size());
605 assert(_cpuId == oldCPU->cpuId());
606 assert(_switchedOut);
607 assert(oldCPU != this);
608 _pid = oldCPU->getPid();
609 _taskId = oldCPU->taskId();
610 // Take over the power state of the switchedOut CPU
611 powerState->set(oldCPU->powerState->get());
612
615
616 _switchedOut = false;
617
618 ThreadID size = threadContexts.size();
619 for (ThreadID i = 0; i < size; ++i) {
621 ThreadContext *oldTC = oldCPU->threadContexts[i];
622
623 newTC->getIsaPtr()->setThreadContext(newTC);
624
625 newTC->takeOverFrom(oldTC);
626
627 assert(newTC->contextId() == oldTC->contextId());
628 assert(newTC->threadId() == oldTC->threadId());
629 system->replaceThreadContext(newTC, newTC->contextId());
630
631 /* This code no longer works since the zero register (e.g.,
632 * r31 on Alpha) doesn't necessarily contain zero at this
633 * point.
634 if (debug::Context)
635 ThreadContext::compare(oldTC, newTC);
636 */
637
638 newTC->getMMUPtr()->takeOverFrom(oldTC->getMMUPtr());
639
640 // Checker whether or not we have to transfer CheckerCPU
641 // objects over in the switch
642 CheckerCPU *old_checker = oldTC->getCheckerCpuPtr();
643 CheckerCPU *new_checker = newTC->getCheckerCpuPtr();
644 if (old_checker && new_checker) {
645 new_checker->getMMUPtr()->takeOverFrom(old_checker->getMMUPtr());
646 }
647 }
648
649 interrupts = oldCPU->interrupts;
650 for (ThreadID tid = 0; tid < numThreads; tid++) {
651 interrupts[tid]->setThreadContext(threadContexts[tid]);
652 }
653 oldCPU->interrupts.clear();
654
655 // All CPUs have an instruction and a data port, and the new CPU's
656 // ports are dangling while the old CPU has its ports connected
657 // already. Unbind the old CPU and then bind the ports of the one
658 // we are switching to.
661
662 // Switch over the reset line as well, if necessary.
663 if (oldCPU->modelResetPort.isConnected())
665}
666
667void
669{
670 for (auto tc: threadContexts) {
671 if (state) {
672 // As we enter reset, stop execution.
673 tc->quiesce();
674 } else {
675 // As we leave reset, first reset thread state,
676 tc->getIsaPtr()->resetThread();
677 // reset the decoder in case it had partially decoded something,
678 tc->getDecoderPtr()->reset();
679 // flush the TLBs,
680 tc->getMMUPtr()->flushAll();
681 // Clear any interrupts,
682 interrupts[tc->threadId()]->clearAll();
683 // and finally reenable execution.
684 tc->activate();
685 }
686 }
687}
688
689void
691{
692 for (ThreadID i = 0; i < threadContexts.size(); ++i) {
694 CheckerCPU *checker(tc.getCheckerCpuPtr());
695
696 tc.getMMUPtr()->flushAll();
697 if (checker) {
698 checker->getMMUPtr()->flushAll();
699 }
700 }
701}
702
703void
705{
707
708 if (!_switchedOut) {
709 /* Unlike _pid, _taskId is not serialized, as they are dynamically
710 * assigned unique ids that are only meaningful for the duration of
711 * a specific run. We will need to serialize the entire taskMap in
712 * system. */
714
715 // Serialize the threads, this is done by the CPU implementation.
716 for (ThreadID i = 0; i < numThreads; ++i) {
717 ScopedCheckpointSection sec(cp, csprintf("xc.%i", i));
718 interrupts[i]->serialize(cp);
719 serializeThread(cp, i);
720 }
721 }
722}
723
724void
726{
728
729 if (!_switchedOut) {
731
732 // Unserialize the threads, this is done by the CPU implementation.
733 for (ThreadID i = 0; i < numThreads; ++i) {
734 ScopedCheckpointSection sec(cp, csprintf("xc.%i", i));
735 interrupts[i]->unserialize(cp);
736 unserializeThread(cp, i);
737 }
738 }
739}
740
741void
742BaseCPU::scheduleInstStop(ThreadID tid, Counter insts, std::string cause)
743{
744 const Tick now(getCurrentInstCount(tid));
745 Event *event(new LocalSimLoopExitEvent(cause, 0));
746
747 threadContexts[tid]->scheduleInstCountEvent(event, now + insts);
748}
749
750Tick
752{
753 return threadContexts[tid]->getCurrentInstCount();
754}
755
757{
758 armed = false;
759 waiting = false;
760 gotWakeup = false;
761}
762
763bool
765{
766 assert(pkt->req->hasPaddr());
767 if (armed && waiting) {
768 if (pAddr == pkt->getAddr()) {
769 DPRINTF(Mwait, "pAddr=0x%lx invalidated: waking up core\n",
770 pkt->getAddr());
771 waiting = false;
772 return true;
773 }
774 }
775 return false;
776}
777
778
779void
781{
782 if (loader::debugSymbolTable.empty())
783 return;
784
785 // if pc enters different function, print new function symbol and
786 // update saved range. Otherwise do nothing.
790
791 std::string sym_str;
792 if (it == loader::debugSymbolTable.end()) {
793 // no symbol found: use addr as label
794 sym_str = csprintf("%#x", pc);
797 } else {
798 sym_str = it->name();
799 currentFunctionStart = it->address();
800 }
801
802 ccprintf(*functionTraceStream, " (%d)\n%d: %s",
803 curTick() - functionEntryTick, curTick(), sym_str);
805 }
806}
807
808void
810{
811 std::string cause = "simpoint starting point found";
812 for (size_t i = 0; i < inst_starts.size(); ++i) {
813 scheduleInstStop(0, inst_starts[i], cause);
814 }
815}
816
817void
819{
820 std::string cause = "a thread reached the max instruction count";
821 for (ThreadID tid = 0; tid < numThreads; ++tid) {
822 scheduleInstStop(tid, max_insts, cause);
823 }
824}
825
827 : statistics::Group(parent),
828 ADD_STAT(simInsts, statistics::units::Count::get(),
829 "Number of instructions simulated"),
830 ADD_STAT(simOps, statistics::units::Count::get(),
831 "Number of ops (including micro ops) simulated"),
832 ADD_STAT(hostInstRate, statistics::units::Rate<
833 statistics::units::Count, statistics::units::Second>::get(),
834 "Simulator instruction rate (inst/s)"),
835 ADD_STAT(hostOpRate, statistics::units::Rate<
836 statistics::units::Count, statistics::units::Second>::get(),
837 "Simulator op (including micro ops) rate (op/s)")
838{
841 .precision(0)
843 ;
844
845 simOps
847 .precision(0)
848 .prereq(simOps)
849 ;
850
852 .precision(0)
854 ;
855
857 .precision(0)
858 .prereq(simOps)
859 ;
860
863}
864
867 : statistics::Group(parent, csprintf("fetchStats%i", thread_id).c_str()),
868 ADD_STAT(numInsts, statistics::units::Count::get(),
869 "Number of instructions fetched (thread level)"),
870 ADD_STAT(numOps, statistics::units::Count::get(),
871 "Number of ops (including micro ops) fetched (thread level)"),
872 ADD_STAT(fetchRate, statistics::units::Rate<
873 statistics::units::Count, statistics::units::Cycle>::get(),
874 "Number of inst fetches per cycle"),
875 ADD_STAT(numBranches, statistics::units::Count::get(),
876 "Number of branches fetched"),
877 ADD_STAT(branchRate, statistics::units::Ratio::get(),
878 "Number of branch fetches per cycle"),
879 ADD_STAT(icacheStallCycles, statistics::units::Cycle::get(),
880 "ICache total stall cycles"),
881 ADD_STAT(numFetchSuspends, statistics::units::Count::get(),
882 "Number of times Execute suspended instruction fetching")
883
884{
887
890
893
896
897}
898
899// means it is incremented in a vector indexing and not directly
902 : statistics::Group(parent, csprintf("executeStats%i", thread_id).c_str()),
903 ADD_STAT(numInsts, statistics::units::Count::get(),
904 "Number of executed instructions"),
905 ADD_STAT(numNop, statistics::units::Count::get(),
906 "Number of nop insts executed"),
907 ADD_STAT(numBranches, statistics::units::Count::get(),
908 "Number of branches executed"),
909 ADD_STAT(numLoadInsts, statistics::units::Count::get(),
910 "Number of load instructions executed"),
911 ADD_STAT(numStoreInsts, statistics::units::Count::get(),
912 "Number of stores executed"),
913 ADD_STAT(instRate, statistics::units::Rate<
914 statistics::units::Count, statistics::units::Cycle>::get(),
915 "Inst execution rate"),
916 ADD_STAT(dcacheStallCycles, statistics::units::Cycle::get(),
917 "DCache total stall cycles"),
918 ADD_STAT(numCCRegReads, statistics::units::Count::get(),
919 "Number of times the CC registers were read"),
920 ADD_STAT(numCCRegWrites, statistics::units::Count::get(),
921 "Number of times the CC registers were written"),
922 ADD_STAT(numFpAluAccesses, statistics::units::Count::get(),
923 "Number of float alu accesses"),
924 ADD_STAT(numFpRegReads, statistics::units::Count::get(),
925 "Number of times the floating registers were read"),
926 ADD_STAT(numFpRegWrites, statistics::units::Count::get(),
927 "Number of times the floating registers were written"),
928 ADD_STAT(numIntAluAccesses, statistics::units::Count::get(),
929 "Number of integer alu accesses"),
930 ADD_STAT(numIntRegReads, statistics::units::Count::get(),
931 "Number of times the integer registers were read"),
932 ADD_STAT(numIntRegWrites, statistics::units::Count::get(),
933 "Number of times the integer registers were written"),
934 ADD_STAT(numMemRefs, statistics::units::Count::get(),
935 "Number of memory refs"),
936 ADD_STAT(numMiscRegReads, statistics::units::Count::get(),
937 "Number of times the Misc registers were read"),
938 ADD_STAT(numMiscRegWrites, statistics::units::Count::get(),
939 "Number of times the Misc registers were written"),
940 ADD_STAT(numVecAluAccesses, statistics::units::Count::get(),
941 "Number of vector alu accesses"),
942 ADD_STAT(numVecPredRegReads, statistics::units::Count::get(),
943 "Number of times the predicate registers were read"),
944 ADD_STAT(numVecPredRegWrites, statistics::units::Count::get(),
945 "Number of times the predicate registers were written"),
946 ADD_STAT(numVecRegReads, statistics::units::Count::get(),
947 "Number of times the vector registers were read"),
948 ADD_STAT(numVecRegWrites, statistics::units::Count::get(),
949 "Number of times the vector registers were written"),
950 ADD_STAT(numDiscardedOps, statistics::units::Count::get(),
951 "Number of ops (including micro ops) which were discarded before "
952 "commit")
953{
955
986}
987
990 : statistics::Group(parent, csprintf("commitStats%i", thread_id).c_str()),
991 ADD_STAT(numInsts, statistics::units::Count::get(),
992 "Number of instructions committed (thread level)"),
993 ADD_STAT(numOps, statistics::units::Count::get(),
994 "Number of ops (including micro ops) committed (thread level)"),
995 ADD_STAT(numInstsNotNOP, statistics::units::Count::get(),
996 "Number of instructions committed excluding NOPs or prefetches"),
997 ADD_STAT(numOpsNotNOP, statistics::units::Count::get(),
998 "Number of Ops (including micro ops) Simulated"),
999 ADD_STAT(cpi, statistics::units::Rate<
1000 statistics::units::Cycle, statistics::units::Count>::get(),
1001 "CPI: cycles per instruction (thread level)"),
1002 ADD_STAT(ipc, statistics::units::Rate<
1003 statistics::units::Count, statistics::units::Cycle>::get(),
1004 "IPC: instructions per cycle (thread level)"),
1005 ADD_STAT(numMemRefs, statistics::units::Count::get(),
1006 "Number of memory references committed"),
1007 ADD_STAT(numFpInsts, statistics::units::Count::get(),
1008 "Number of float instructions"),
1009 ADD_STAT(numIntInsts, statistics::units::Count::get(),
1010 "Number of integer instructions"),
1011 ADD_STAT(numLoadInsts, statistics::units::Count::get(),
1012 "Number of load instructions"),
1013 ADD_STAT(numStoreInsts, statistics::units::Count::get(),
1014 "Number of store instructions"),
1015 ADD_STAT(numVecInsts, statistics::units::Count::get(),
1016 "Number of vector instructions"),
1017 ADD_STAT(committedInstType, statistics::units::Count::get(),
1018 "Class of committed instruction."),
1019 ADD_STAT(committedControl, statistics::units::Count::get(),
1020 "Class of control type instructions committed")
1021{
1022 numInsts
1023 .prereq(numInsts);
1024
1025 cpi.precision(6);
1026 ipc.precision(6);
1027
1029 .init(enums::Num_OpClass)
1031
1032 for (unsigned i = 0; i < Num_OpClasses; ++i) {
1033 committedInstType.subname(i, enums::OpClassStrings[i]);
1034 }
1035
1037 .init(StaticInstFlags::Flags::Num_Flags)
1039
1040 for (unsigned i = 0; i < StaticInstFlags::Flags::Num_Flags; i++) {
1041 committedControl.subname(i, StaticInstFlags::FlagsStrings[i]);
1042 }
1043}
1044
1045
1046void
1049{
1050 /* Add a count for every control instruction type */
1051 if (staticInst->isControl()) {
1052 if (staticInst->isReturn()) {
1053 committedControl[gem5::StaticInstFlags::Flags::IsReturn]++;
1054 }
1055 if (staticInst->isCall()) {
1056 committedControl[gem5::StaticInstFlags::Flags::IsCall]++;
1057 }
1058 if (staticInst->isDirectCtrl()) {
1059 committedControl[gem5::StaticInstFlags::Flags::IsDirectControl]++;
1060 }
1061 if (staticInst->isIndirectCtrl()) {
1062 committedControl
1063 [gem5::StaticInstFlags::Flags::IsIndirectControl]++;
1064 }
1065 if (staticInst->isCondCtrl()) {
1066 committedControl[gem5::StaticInstFlags::Flags::IsCondControl]++;
1067 }
1068 if (staticInst->isUncondCtrl()) {
1069 committedControl[gem5::StaticInstFlags::Flags::IsUncondControl]++;
1070 }
1071 committedControl[gem5::StaticInstFlags::Flags::IsControl]++;
1072 }
1073}
1074
1075} // namespace gem5
#define DPRINTFN(...)
Definition trace.hh:238
#define DPRINTF(x,...)
Definition trace.hh:210
void regStats() override
Callback to set stat parameters.
Definition base.cc:431
int findContext(ThreadContext *tc)
Given a Thread Context pointer return the thread num.
Definition base.cc:519
RequestorID dataRequestorId() const
Reads this CPU's unique data requestor ID.
Definition base.hh:193
probing::PMUUPtr ppRetiredInsts
Instruction commit probe point.
Definition base.hh:521
const Cycles pwrGatingLatency
Definition base.hh:683
virtual void serializeThread(CheckpointOut &cp, ThreadID tid) const
Serialize a single thread.
Definition base.hh:429
virtual Counter totalOps() const =0
Tick functionEntryTick
Definition base.hh:592
void traceFunctionsInternal(Addr pc)
Definition base.cc:780
const bool powerGatingOnIdle
Definition base.hh:684
void registerThreadContexts()
Definition base.cc:471
virtual void haltContext(ThreadID thread_num)
Notify the CPU that the indicated context is now halted.
Definition base.cc:576
probing::PMUUPtr ppRetiredLoads
Retired load instructions.
Definition base.hh:525
Tick instCnt
Instruction count used for SPARC misc register.
Definition base.hh:110
Addr currentFunctionEnd
Definition base.hh:591
SignalSinkPort< bool > modelResetPort
Definition base.hh:166
probing::PMUUPtr ppAllCycles
CPU cycle counter even if any thread Context is suspended.
Definition base.hh:533
probing::PMUUPtr ppRetiredInstsPC
Definition base.hh:522
void init() override
init() is called after all C++ SimObjects have been created and all ports are connected.
Definition base.cc:310
uint32_t getPid() const
Definition base.hh:215
System * system
Definition base.hh:392
void mwaitAtomic(ThreadID tid, ThreadContext *tc, BaseMMU *mmu)
Definition base.cc:277
Addr cacheLineSize() const
Get the cache line size of the system.
Definition base.hh:397
Cycles previousCycle
Definition base.hh:556
void enterPwrGating()
Definition base.cc:582
void updateCycleCounters(CPUState state)
base method keeping track of cycle progression
Definition base.hh:561
probing::PMUUPtr pmuProbePoint(const char *name)
Helper method to instantiate probe points belonging to this object.
Definition base.cc:365
void postInterrupt(ThreadID tid, int int_num, int index)
Definition base.cc:231
bool mwait(ThreadID tid, PacketPtr pkt)
Definition base.cc:254
void unserialize(CheckpointIn &cp) override
Reconstruct the state of this object from a checkpoint.
Definition base.cc:725
void scheduleInstStopAnyThread(Counter max_insts)
Schedule an exit event when any threads in the core reach the max_insts instructions using the schedu...
Definition base.cc:818
void serialize(CheckpointOut &cp) const override
Serialize this object to the given output stream.
Definition base.cc:704
probing::PMUUPtr ppRetiredStores
Retired store instructions.
Definition base.hh:527
bool _switchedOut
Is the CPU switched out or active?
Definition base.hh:143
Port & getPort(const std::string &if_name, PortID idx=InvalidPortID) override
Get a port on this CPU.
Definition base.cc:455
Addr currentFunctionStart
Definition base.hh:590
void schedulePowerGatingEvent()
Definition base.cc:502
@ CPU_STATE_SLEEP
Definition base.hh:552
@ CPU_STATE_WAKEUP
Definition base.hh:553
static std::unique_ptr< GlobalStats > globalStats
Pointer to the global stat structure.
Definition base.hh:164
virtual Port & getDataPort()=0
Purely virtual method that returns a reference to the data port.
virtual void verifyMemoryMode() const
Verify that the system is in a memory mode supported by the CPU.
Definition base.hh:384
void regProbePoints() override
Register probe points for this object.
Definition base.cc:374
void scheduleSimpointsInstStop(std::vector< Counter > inst_starts)
Schedule simpoint events using the scheduleInstStop function.
Definition base.cc:809
uint32_t taskId() const
Get cpu task id.
Definition base.hh:211
virtual void suspendContext(ThreadID thread_num)
Notify the CPU that the indicated context is now suspended.
Definition base.cc:550
void enableFunctionTrace()
Definition base.cc:221
virtual Port & getInstPort()=0
Purely virtual method that returns a reference to the instruction port.
ThreadID numThreads
Number of threads we're actually simulating (<= SMT_MAX_THREADS).
Definition base.hh:390
probing::PMUUPtr ppRetiredBranches
Retired branches (any type)
Definition base.hh:530
void deschedulePowerGatingEvent()
Definition base.cc:494
CPUState previousState
Definition base.hh:557
virtual void wakeup(ThreadID tid)=0
probing::PMUUPtr ppActiveCycles
CPU cycle counter, only counts if any thread contexts is active.
Definition base.hh:536
bool functionTracingEnabled
Definition base.hh:588
int cpuId() const
Reads this CPU's ID.
Definition base.hh:187
uint32_t _taskId
An intrenal representation of a task identifier within gem5.
Definition base.hh:136
std::vector< BaseInterrupts * > interrupts
Definition base.hh:224
void startup() override
startup() is the final initialization call before simulation.
Definition base.cc:349
virtual void unserializeThread(CheckpointIn &cp, ThreadID tid)
Unserialize one thread.
Definition base.hh:437
virtual ~BaseCPU()
Definition base.cc:226
virtual void switchOut()
Prepare for another CPU to take over execution.
Definition base.cc:588
virtual void setReset(bool state)
Set the reset of the CPU to be either asserted or deasserted.
Definition base.cc:668
void flushTLBs()
Flush all TLBs in the CPU.
Definition base.cc:690
void armMonitor(ThreadID tid, Addr address)
Definition base.cc:242
ProbePointArg< bool > * ppSleeping
ProbePoint that signals transitions of threadContexts sets.
Definition base.hh:546
static Counter numSimulatedOps()
Definition base.hh:621
std::ostream * functionTraceStream
Definition base.hh:589
virtual void takeOverFrom(BaseCPU *cpu)
Load the state of a CPU from the previous CPU object, invoked on all new CPUs that are about to be sw...
Definition base.cc:602
std::vector< AddressMonitor > addressMonitor
Definition base.hh:649
std::vector< ThreadContext * > threadContexts
Definition base.hh:260
static std::vector< BaseCPU * > cpuList
Static global cpu list.
Definition base.hh:597
EventFunctionWrapper enterPwrGatingEvent
Definition base.hh:685
void scheduleInstStop(ThreadID tid, Counter insts, std::string cause)
Schedule an event that exits the simulation loops after a predefined number of instructions.
Definition base.cc:742
bool switchedOut() const
Determine if the CPU is switched out.
Definition base.hh:373
BaseCPU(const Params &params, bool is_checker=false)
Definition base.cc:129
uint32_t _pid
The current OS process ID that is executing on this processor.
Definition base.hh:140
virtual void probeInstCommit(const StaticInstPtr &inst, Addr pc)
Helper method to trigger PMU probes for a committed instruction.
Definition base.cc:390
uint64_t getCurrentInstCount(ThreadID tid)
Get the number of instructions executed by the specified thread on this CPU.
Definition base.cc:751
static Counter numSimulatedInsts()
Definition base.hh:609
virtual void activateContext(ThreadID thread_num)
Notify the CPU that the indicated context is now active.
Definition base.cc:530
virtual void setThreadContext(ThreadContext *_tc)
Definition isa.hh:85
virtual void flushAll()
Definition mmu.cc:81
virtual void takeOverFrom(BaseMMU *old_mmu)
Definition mmu.cc:159
virtual Fault translateAtomic(const RequestPtr &req, ThreadContext *tc, Mode mode)
Definition mmu.cc:104
CPUProgressEvent(BaseCPU *_cpu, Tick ival=0)
Definition base.cc:88
Counter lastNumInst
Definition base.hh:87
virtual const char * description() const
Return a C string describing the event.
Definition base.cc:124
CheckerCPU class.
Definition cpu.hh:85
BaseMMU * getMMUPtr()
Definition cpu.hh:152
The ClockedObject class extends the SimObject with a clock and accessor functions to relate ticks to ...
ClockedObjectParams Params
Parameters of ClockedObject.
Tick clockEdge(Cycles cycles=Cycles(0)) const
Determine the tick when a cycle begins, by default the current one, but the argument also enables the...
Tick clockPeriod() const
bool is_waiting(ThreadContext *tc)
Determine if the given thread context is currently waiting on a futex wait operation on any of the fu...
Definition futex_map.cc:185
virtual std::string name() const
Definition named.hh:47
OutputStream * findOrCreate(const std::string &name, bool binary=false)
Definition output.cc:262
std::ostream * stream() const
Get the output underlying output stream.
Definition output.hh:62
Addr instAddr() const
Returns the memory address of the instruction this PC points to.
Definition pcstate.hh:108
A Packet is used to encapsulate a transfer between two objects in the memory system (e....
Definition packet.hh:295
Addr getAddr() const
Definition packet.hh:807
RequestPtr req
A pointer to the original request.
Definition packet.hh:377
Ports are used to interface objects to each other.
Definition port.hh:62
bool isConnected() const
Is this port currently connected to a peer?
Definition port.hh:133
void takeOverFrom(Port *old)
A utility function to make it easier to swap out ports.
Definition port.hh:137
void set(enums::PwrState p)
Change the power state of this object to the power state p.
enums::PwrState get() const
ProbePointArg generates a point for the class of Arg.
Definition probe.hh:264
void assignThreadContext(ContextID context_id)
Definition process.hh:130
Static instruction class for unknown (illegal) instructions.
Definition unknown.hh:53
static Root * root()
Use this function to get a pointer to the single Root object in the simulation.
Definition root.hh:93
const State & state() const
Definition signal.hh:75
bool isDirectCtrl() const
bool isUncondCtrl() const
bool isLoad() const
bool isReturn() const
bool isIndirectCtrl() const
bool isLastMicroop() const
bool isStore() const
bool isAtomic() const
bool isMicroop() const
bool isCall() const
bool isCondCtrl() const
bool isControl() const
void registerThreadContext(ThreadContext *tc)
Definition system.cc:237
FutexMap futexMap
Definition system.hh:598
const bool multiThread
Definition system.hh:312
void replaceThreadContext(ThreadContext *tc, ContextID context_id)
Definition system.cc:268
ThreadContext is the external interface to all thread state for anything outside of the CPU.
virtual BaseISA * getIsaPtr() const =0
virtual void takeOverFrom(ThreadContext *old_context)=0
virtual CheckerCPU * getCheckerCpuPtr()=0
@ Suspended
Temporarily inactive.
virtual const PCStateBase & pcState() const =0
virtual int threadId() const =0
virtual BaseMMU * getMMUPtr()=0
virtual Process * getProcessPtr()=0
virtual ContextID contextId() const =0
const_iterator findNearest(Addr addr, Addr &next_addr) const
Find the nearest symbol equal to or less than the supplied address (e.g., the label for the enclosing...
Definition symtab.hh:474
Derived & subname(off_type index, const std::string &name)
Set the subfield name for the given index, and marks this stat to print at the end of simulation.
Derived & precision(int _precision)
Set the precision and marks this stat to print at the end of simulation.
Derived & flags(Flags _flags)
Set the flags and marks this stat to print at the end of simulation.
Derived & prereq(const Stat &prereq)
Set the prerequisite stat and marks this stat to print at the end of simulation.
Statistics container.
Definition group.hh:93
Derived & functor(const T &func)
Derived & init(size_type size)
Set this vector to have the given size.
STL vector class.
Definition stl.hh:37
ClockedObject declaration and implementation.
#define ADD_STAT(n,...)
Convenience macro to add a stat to a statistics group.
Definition group.hh:75
static constexpr T roundDown(const T &val, const U &align)
This function is used to align addresses in memory.
Definition intmath.hh:279
void deschedule(Event &event)
Definition eventq.hh:1021
bool scheduled() const
Determine if the current event is scheduled.
Definition eventq.hh:458
void schedule(Event &event, Tick when)
Definition eventq.hh:1012
#define fatal_if(cond,...)
Conditional fatal macro that checks the supplied condition and only causes a fatal error if the condi...
Definition logging.hh:236
#define fatal(...)
This implements a cprintf based fatal() function.
Definition logging.hh:200
const Params & params() const
ProbeManager * getProbeManager()
Get the probe manager for this object.
virtual Port & getPort(const std::string &if_name, PortID idx=InvalidPortID)
Get a port with a given name and index.
virtual void regStats()
Callback to set stat parameters.
Definition group.cc:68
atomic_var_t state
Definition helpers.cc:211
Bitfield< 3, 0 > mask
Definition pcstate.hh:63
Bitfield< 5 > t
Definition misc_types.hh:71
Bitfield< 7 > i
Definition misc_types.hh:67
Bitfield< 4 > pc
Bitfield< 10, 5 > event
Bitfield< 30, 0 > index
Bitfield< 0 > p
Bitfield< 15 > system
Definition misc.hh:1032
Bitfield< 3 > addr
Definition types.hh:84
SymbolTable debugSymbolTable
Global unified debugging symbol table (for target).
Definition symtab.cc:55
std::unique_ptr< PMU > PMUUPtr
Definition pmu.hh:60
const FlagsType pdf
Print the percent of the total that this entry represents.
Definition info.hh:61
const FlagsType nozero
Don't print if this is zero.
Definition info.hh:67
const FlagsType total
Print the total.
Definition info.hh:59
double Counter
All counters are of 64-bit values.
Definition types.hh:46
const FlagsType dist
Print the distribution.
Definition info.hh:65
Copyright (c) 2024 - Pranith Kumar Copyright (c) 2020 Inria All rights reserved.
Definition binary32.hh:36
std::shared_ptr< FaultBase > Fault
Definition types.hh:249
int16_t ThreadID
Thread index/ID type.
Definition types.hh:235
std::shared_ptr< Request > RequestPtr
Definition request.hh:94
statistics::Value & hostSeconds
Definition stats.cc:48
static const OpClass Num_OpClasses
Definition op_class.hh:135
void cprintf(const char *format, const Args &...args)
Definition cprintf.hh:155
Tick curTick()
The universal simulation clock.
Definition cur_tick.hh:46
std::ostream CheckpointOut
Definition serialize.hh:66
uint64_t Addr
Address type This will probably be moved somewhere else in the near future.
Definition types.hh:147
int16_t PortID
Port index/ID type, and a symbolic name for an invalid port id.
Definition types.hh:245
bool FullSystem
The FullSystem variable can be used to determine the current mode of simulation.
Definition root.cc:220
OutputDirectory simout
Definition output.cc:62
uint64_t Tick
Tick count type.
Definition types.hh:58
int maxThreadsPerCPU
The maximum number of active threads across all cpus.
Definition base.cc:86
std::string csprintf(const char *format, const Args &...args)
Definition cprintf.hh:161
constexpr decltype(nullptr) NoFault
Definition types.hh:253
void ccprintf(cp::Print &print)
Definition cprintf.hh:130
Declarations of a non-full system Page Table.
#define UNSERIALIZE_SCALAR(scalar)
Definition serialize.hh:575
#define SERIALIZE_SCALAR(scalar)
Definition serialize.hh:568
bool doMonitor(PacketPtr pkt)
Definition base.cc:764
BaseCPUStats(statistics::Group *parent)
Definition base.cc:408
statistics::Formula ipc
Definition base.hh:643
statistics::Formula cpi
Definition base.hh:642
statistics::Scalar numInsts
Definition base.hh:637
statistics::Scalar numCycles
Definition base.hh:640
statistics::Vector committedInstType
Definition base.hh:811
void updateComCtrlStats(const StaticInstPtr staticInst)
Definition base.cc:1048
statistics::Vector committedControl
Definition base.hh:814
statistics::Formula cpi
Definition base.hh:789
statistics::Scalar numInsts
Definition base.hh:781
CommitCPUStats(statistics::Group *parent, int thread_id)
Definition base.cc:989
statistics::Formula ipc
Definition base.hh:790
statistics::Scalar numIntRegReads
Definition base.hh:751
statistics::Scalar numVecPredRegReads
Definition base.hh:765
statistics::Scalar dcacheStallCycles
Definition base.hh:734
statistics::Scalar numCCRegReads
Definition base.hh:737
statistics::Scalar numIntRegWrites
Definition base.hh:752
statistics::Formula numStoreInsts
Definition base.hh:729
statistics::Scalar numMemRefs
Definition base.hh:755
statistics::Scalar numMiscRegReads
Definition base.hh:758
statistics::Scalar numCCRegWrites
Definition base.hh:738
statistics::Scalar numVecPredRegWrites
Definition base.hh:766
statistics::Scalar numFpAluAccesses
Definition base.hh:741
statistics::Scalar numIntAluAccesses
Definition base.hh:748
ExecuteCPUStats(statistics::Group *parent, int thread_id)
Definition base.cc:901
statistics::Scalar numVecRegWrites
Definition base.hh:770
statistics::Scalar numFpRegReads
Definition base.hh:744
statistics::Scalar numVecRegReads
Definition base.hh:769
statistics::Scalar numMiscRegWrites
Definition base.hh:759
statistics::Scalar numLoadInsts
Definition base.hh:727
statistics::Formula fetchRate
Definition base.hh:700
statistics::Formula branchRate
Definition base.hh:706
statistics::Scalar numBranches
Definition base.hh:703
FetchCPUStats(statistics::Group *parent, int thread_id)
Definition base.cc:866
statistics::Scalar icacheStallCycles
Definition base.hh:709
Global CPU statistics that are merged into the Root object.
Definition base.hh:150
statistics::Value simOps
Definition base.hh:154
statistics::Formula hostInstRate
Definition base.hh:156
statistics::Value simInsts
Definition base.hh:153
GlobalStats(statistics::Group *parent)
Definition base.cc:826
statistics::Formula hostOpRate
Definition base.hh:157
const std::string & name()
Definition trace.cc:48

Generated on Tue Jun 18 2024 16:24:01 for gem5 by doxygen 1.11.0