VirtualBox

Changeset 43397 in vbox for trunk/src


Ignore:
Timestamp:
Sep 21, 2012 12:17:22 PM (12 years ago)
Author:
vboxsync
Message:

AHCI: A few more statistics and release logging if a request is active for too long

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Devices/Storage/DevAHCI.cpp

    r42999 r43397  
    279279    /** Task state. */
    280280    volatile AHCITXSTATE       enmTxState;
     281    /** Start timestamp of the request. */
     282    uint64_t                   tsStart;
    281283    /** Tag of the task. */
    282284    uint32_t                   uTag;
     
    56155617    bool fXchg = false;
    56165618    bool fRedo = false;
     5619    uint64_t tsNow = RTTimeMilliTS();
     5620
     5621    /*
     5622     * Leave a release log entry if the request was active for more than 25 seconds
     5623     * (30 seconds is the timeout of the guest).
     5624     */
     5625    if (tsNow - pAhciReq->tsStart >= 25 * 1000)
     5626    {
     5627        const char *pcszReq = NULL;
     5628
     5629        switch (pAhciReq->enmTxDir)
     5630        {
     5631            case AHCITXDIR_READ:
     5632                pcszReq = "Read";
     5633                break;
     5634            case AHCITXDIR_WRITE:
     5635                pcszReq = "Write";
     5636                break;
     5637            case AHCITXDIR_FLUSH:
     5638                pcszReq = "Flush";
     5639                break;
     5640            case AHCITXDIR_TRIM:
     5641                pcszReq = "Trim";
     5642                break;
     5643            default:
     5644                pcszReq = "<Invalid>";
     5645        }
     5646
     5647        LogRel(("AHCI#%u: %s request was active for %llu seconds\n",
     5648                pAhciPort->iLUN, pcszReq, (tsNow - pAhciReq->tsStart) / 1000));
     5649    }
    56175650
    56185651    ASMAtomicCmpXchgSize(&pAhciReq->enmTxState, AHCITXSTATE_FREE, AHCITXSTATE_ACTIVE, fXchg);
     
    62206253            AssertMsg(fXchg, ("Task is already active\n"));
    62216254
     6255            pAhciReq->tsStart = RTTimeMilliTS();
    62226256            pAhciReq->uATARegStatus = 0;
    62236257            pAhciReq->uATARegError  = 0;
     
    64036437            STAM_PROFILE_START(&pAhciPort->StatProfileProcessTime, a);
    64046438
     6439            pAhciReq->tsStart       = RTTimeMilliTS();
    64056440            pAhciReq->uATARegStatus = 0;
    64066441            pAhciReq->uATARegError  = 0;
Note: See TracChangeset for help on using the changeset viewer.

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