Changeset 87748 in vbox for trunk/src/VBox/VMM/include
- Timestamp:
- Feb 13, 2021 3:03:20 AM (4 years ago)
- svn:sync-xref-src-repo-rev:
- 142800
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/VMM/include/TMInternal.h
r87626 r87748 716 716 typedef struct TMCPU 717 717 { 718 /** Offset to the VMCPU structure.719 * See TMCPU2VM(). */720 RTUINT offVMCPU;721 722 718 /** CPU timestamp ticking enabled indicator (bool). (RDTSC) */ 723 719 bool fTSCTicking; 724 bool afAlignment0[3]; /**< alignment padding */ 725 720 bool afAlignment0[7]; /**< alignment padding */ 726 721 /** The offset between the host tick (TSC/virtual depending on the TSC mode) and 727 722 * the guest tick. */ 728 723 uint64_t offTSCRawSrc; 729 730 724 /** The guest TSC when fTicking is cleared. */ 731 725 uint64_t u64TSC; 732 733 726 /** The last seen TSC by the guest. */ 734 727 uint64_t u64TSCLastSeen; 735 728 736 729 #ifndef VBOX_WITHOUT_NS_ACCOUNTING 730 /** Align */ 731 uint64_t au64Alignment[4]; 732 733 /** @name Core accounting data. Must be cache-line aligned. 734 * @{ */ 735 /** The cNsXXX generation. */ 736 uint32_t volatile uTimesGen; 737 /** Set if executing (between TMNotifyStartOfExecution and 738 * TMNotifyEndOfExecution). */ 739 bool volatile fExecuting; 740 /** Set if halting (between TMNotifyStartOfHalt and TMNotifyEndOfHalt). */ 741 bool volatile fHalting; 742 /** Set if we're suspended and u64NsTsStartTotal is to be cNsTotal. */ 743 bool volatile fSuspended; 744 /** Set by the timer callback to trigger updating of statistics in 745 * TMNotifyEndOfExecution. */ 746 bool volatile fUpdateStats; 737 747 /** The nanosecond timestamp of the CPU start or resume. 738 748 * This is recalculated when the VM is started so that 739 749 * cNsTotal = RTTimeNanoTS() - u64NsTsStartCpu. */ 740 uint64_t u64NsTsStartTotal; 741 /** The nanosecond timestamp of the last start-execute notification. */ 742 uint64_t u64NsTsStartExecuting; 743 /** The nanosecond timestamp of the last start-halt notification. */ 744 uint64_t u64NsTsStartHalting; 745 /** The cNsXXX generation. */ 746 uint32_t volatile uTimesGen; 747 /** Explicit alignment padding. */ 748 uint32_t u32Alignment; 749 /** The number of nanoseconds total run time. 750 * @remarks This is updated when cNsExecuting and cNsHalted are updated. */ 751 uint64_t cNsTotal; 750 uint64_t nsStartTotal; 751 /** The TSC of the last start-execute notification. */ 752 uint64_t uTscStartExecuting; 752 753 /** The number of nanoseconds spent executing. */ 753 754 uint64_t cNsExecuting; 755 /** The number of guest execution runs. */ 756 uint64_t cPeriodsExecuting; 757 /** The nanosecond timestamp of the last start-halt notification. */ 758 uint64_t nsStartHalting; 754 759 /** The number of nanoseconds being halted. */ 755 760 uint64_t cNsHalted; 756 /** The number of nanoseconds spent on other things.757 * @remarks This is updated when cNsExecuting and cNsHalted are updated. */758 uint64_t cNsOther;759 761 /** The number of halts. */ 760 762 uint64_t cPeriodsHalted; 761 /** The number of guest execution runs.*/762 uint64_t cPeriodsExecuting; 763 /** @} */ 764 763 765 # if defined(VBOX_WITH_STATISTICS) || defined(VBOX_WITH_NS_ACCOUNTING_STATS) 764 /** Resettable version of cNsTotal. */765 STAMCOUNTER StatNsTotal;766 766 /** Resettable version of cNsExecuting. */ 767 767 STAMPROFILE StatNsExecuting; 768 768 /** Long execution intervals. */ 769 769 STAMPROFILE StatNsExecLong; 770 /** Short execution intervals 770 /** Short execution intervals. */ 771 771 STAMPROFILE StatNsExecShort; 772 /** Tiny execution intervals 772 /** Tiny execution intervals. */ 773 773 STAMPROFILE StatNsExecTiny; 774 774 /** Resettable version of cNsHalted. */ 775 775 STAMPROFILE StatNsHalted; 776 /** Resettable version of cNsOther. */ 777 STAMPROFILE StatNsOther; 776 777 /** Resettable copy of version of cNsOtherStat. 778 * @note Only updated after halting. */ 779 STAMCOUNTER StatNsOther; 780 /** Resettable copy of cNsTotalStat. 781 * @note Only updated after halting. */ 782 STAMCOUNTER StatNsTotal; 778 783 # endif 784 /** The time not spent executing or halted. 785 * @note Only updated after halting and after the timer runs. */ 786 uint64_t cNsOtherStat; 787 /** Reasonably up to date total run time value. 788 * @note Only updated after halting and after the timer runs. */ 789 uint64_t cNsTotalStat; 779 790 780 791 /** CPU load state for this virtual CPU (tmR3CpuLoadTimer). */ … … 782 793 #endif 783 794 } TMCPU; 795 #ifndef VBOX_WITHOUT_NS_ACCOUNTING 796 AssertCompileMemberAlignment(TMCPU, uTimesGen, 64); 797 # if defined(VBOX_WITH_STATISTICS) || defined(VBOX_WITH_NS_ACCOUNTING_STATS) 798 AssertCompileMemberAlignment(TMCPU, StatNsExecuting, 64); 799 # else 800 AssertCompileMemberAlignment(TMCPU, cNsOtherStat, 64); 801 # endif 802 #endif 784 803 /** Pointer to TM VMCPU instance data. */ 785 804 typedef TMCPU *PTMCPU;
Note:
See TracChangeset
for help on using the changeset viewer.