VirtualBox

Changeset 54179 in vbox for trunk


Ignore:
Timestamp:
Feb 12, 2015 2:04:34 PM (10 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
98233
Message:

RTC: Added a bit of stats.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Devices/PC/DevRTC.cpp

    r53116 r54179  
    190190    /** HPET legacy mode notification interface. */
    191191    PDMIHPETLEGACYNOTIFY  IHpetLegacyNotify;
     192
     193    /** Number of IRQs that's been raised. */
     194    STAMCOUNTER             StatRTCIrq;
     195    /** Number of times the timer callback handler ran. */
     196    STAMCOUNTER             StatRTCTimerCB;
    192197} RTCSTATE;
    193198/** Pointer to the RTC device state. */
     
    250255{
    251256    if (!pThis->fDisabledByHpet)
     257    {
    252258        PDMDevHlpISASetIrq(pThis->CTX_SUFF(pDevIns), pThis->irq, iLevel);
     259        if (iLevel)
     260            STAM_COUNTER_INC(&pThis->StatRTCIrq);
     261    }
    253262}
    254263
     
    546555
    547556    rtc_timer_update(pThis, pThis->next_periodic_time);
     557    STAM_COUNTER_INC(&pThis->StatRTCTimerCB);
    548558    pThis->cmos_data[RTC_REG_C] |= 0xc0;
    549559
     
    12231233    PDMDevHlpDBGFInfoRegister(pDevIns, "cmos2", "Display CMOS Bank 2 Info (0x0e-0x7f). No arguments.", rtcCmosBank2Info);
    12241234    PDMDevHlpDBGFInfoRegister(pDevIns, "rtc",   "Display CMOS RTC (0x00-0x0d). No arguments. See also cmos1 & cmos2", rtcCmosClockInfo);
     1235
     1236    /*
     1237     * Register statistics.
     1238     */
     1239    PDMDevHlpSTAMRegister(pDevIns, &pThis->StatRTCIrq,      STAMTYPE_COUNTER, "/TM/RTC/Irq",      STAMUNIT_OCCURENCES,  "The number of times a RTC interrupt was triggered.");
     1240    PDMDevHlpSTAMRegister(pDevIns, &pThis->StatRTCTimerCB,  STAMTYPE_COUNTER, "/TM/RTC/TimerCB",  STAMUNIT_OCCURENCES,  "The number of times the RTC timer callback ran.");
     1241
    12251242    return VINF_SUCCESS;
    12261243}
Note: See TracChangeset for help on using the changeset viewer.

© 2025 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette