@@ -869,86 +869,77 @@ Execute::tryPCEvents(ThreadID thread_id)
869869void
870870Execute::doInstCommitAccounting (BebopInODynInstPtr inst)
871871{
872- assert (!inst->isFault ());
873- bool is_nop = inst->staticInst ->isNop ();
874- const ThreadID tid = inst->id .threadId ;
875- MinorThread *thread = cpu.threads [tid];
876- const bool in_user_mode = thread->getIsaPtr ()->inUserMode ();
877-
878- /* Increment the many and various inst and op counts in the
879- * thread and system */
880- if (!inst->staticInst ->isMicroop () || inst->staticInst ->isLastMicroop ())
881- {
882- thread->numInst ++;
883- thread->threadStats .numInsts ++;
884- cpu.commitStats [tid]->numInsts ++;
885- cpu.executeStats [tid]->numInsts ++;
886- cpu.baseStats .numInsts ++;
887- if (in_user_mode) {
888- cpu.commitStats [tid]->numUserInsts ++;
889- }
890-
891- if (!is_nop) {
892- cpu.commitStats [inst->id .threadId ]->numInstsNotNOP ++;
893- }
894-
895- /* Act on events related to instruction counts */
896- thread->comInstEventQueue .serviceEvents (thread->numInst );
897- }
872+ assert (!inst->isFault ());
873+
874+ bool is_nop = inst->staticInst ->isNop ();
875+ const ThreadID tid = inst->id .threadId ;
876+ MinorThread *thread = cpu.threads [tid];
877+
878+ /* Increment the many and various inst and op counts in the
879+ * thread and system */
880+ if (!inst->staticInst ->isMicroop () || inst->staticInst ->isLastMicroop ())
881+ {
882+ thread->numInst ++;
883+ thread->threadStats .numInsts ++;
884+ cpu.commitStats [tid]->numInsts ++;
885+ cpu.executeStats [tid]->numInsts ++;
886+ cpu.baseStats .numInsts ++;
898887
899- thread->numOp ++;
900- thread->threadStats .numOps ++;
901888 if (!is_nop) {
902- cpu.commitStats [tid]->numOpsNotNOP ++;
889+ cpu.commitStats [tid]->numInstsNotNOP ++;
903890 }
904891
905- if (inst->staticInst ->isMemRef ()) {
906- cpu.executeStats [tid]->numMemRefs ++;
907- cpu.commitStats [tid]->numMemRefs ++;
908- thread->threadStats .numMemRefs ++;
909- }
910- if (inst->staticInst ->isLoad ()) {
911- cpu.executeStats [tid]->numLoadInsts ++;
912- cpu.commitStats [tid]->numLoadInsts ++;
913- }
892+ /* Act on events related to instruction counts */
893+ thread->comInstEventQueue .serviceEvents (thread->numInst );
894+ }
914895
915- if (inst->staticInst ->isStore () || inst->staticInst ->isAtomic ()) {
916- cpu.commitStats [tid]->numStoreInsts ++;
917- }
918- if (inst->staticInst ->isInteger ()) {
919- cpu.commitStats [tid]->numIntInsts ++;
920- }
896+ thread->numOp ++;
897+ thread->threadStats .numOps ++;
898+ cpu.commitStats [tid]->numOps ++;
921899
922- if (inst-> staticInst -> isFloating () ) {
923- cpu.commitStats [tid]->numFpInsts ++;
924- }
900+ if (!is_nop ) {
901+ cpu.commitStats [tid]->numOpsNotNOP ++;
902+ }
925903
926- if (inst->staticInst ->isVector ()) {
927- cpu.commitStats [tid]->numVecInsts ++;
928- }
929- if (inst->staticInst ->isControl ()) {
930- cpu.executeStats [tid]->numBranches ++;
931- }
932- if (inst->staticInst ->isCall () || inst->staticInst ->isReturn ()) {
933- cpu.commitStats [tid]->numCallsReturns ++;
934- }
935- if (inst->staticInst ->isCall ()) {
936- cpu.commitStats [tid]->functionCalls ++;
937- }
904+ if (inst->staticInst ->isMemRef ()) {
905+ cpu.executeStats [tid]->numMemRefs ++;
906+ cpu.commitStats [tid]->numMemRefs ++;
907+ thread->threadStats .numMemRefs ++;
908+ }
938909
939- cpu.commitStats [tid]->numOps ++;
940- cpu.commitStats [tid]
941- ->committedInstType [inst->staticInst ->opClass ()]++;
942- cpu.commitStats [tid]->updateComCtrlStats (inst->staticInst );
943- if (in_user_mode) {
944- cpu.commitStats [tid]->numUserOps ++;
945- }
910+ if (inst->staticInst ->isLoad ()) {
911+ cpu.executeStats [tid]->numLoadInsts ++;
912+ cpu.commitStats [tid]->numLoadInsts ++;
913+ }
914+
915+ if (inst->staticInst ->isStore () || inst->staticInst ->isAtomic ()) {
916+ cpu.commitStats [tid]->numStoreInsts ++;
917+ }
918+
919+ if (inst->staticInst ->isInteger ()) {
920+ cpu.commitStats [tid]->numIntInsts ++;
921+ }
922+
923+ if (inst->staticInst ->isFloating ()) {
924+ cpu.commitStats [tid]->numFpInsts ++;
925+ }
926+
927+ if (inst->staticInst ->isVector ()) {
928+ cpu.commitStats [tid]->numVecInsts ++;
929+ }
930+
931+ if (inst->staticInst ->isControl ()) {
932+ cpu.executeStats [tid]->numBranches ++;
933+ }
934+
935+ cpu.commitStats [tid]->committedInstType [inst->staticInst ->opClass ()]++;
936+ cpu.commitStats [tid]->updateComCtrlStats (inst->staticInst );
946937
947- /* Set the CP SeqNum to the numOps commit number */
948- if (inst->traceData )
949- inst->traceData ->setCPSeq (thread->numOp );
938+ /* Set the CP SeqNum to the numOps commit number */
939+ if (inst->traceData )
940+ inst->traceData ->setCPSeq (thread->numOp );
950941
951- cpu.probeInstCommit (inst->staticInst , inst->pc ->instAddr ());
942+ cpu.probeInstCommit (inst->staticInst , inst->pc ->instAddr ());
952943}
953944
954945bool
0 commit comments