VirtualBox

Changeset 87773 in vbox for trunk/src/VBox/VMM/VMMR3


Ignore:
Timestamp:
Feb 16, 2021 11:36:15 PM (4 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
142829
Message:

VMM/TM,Devices: Store the timer name in the TMTIMER structure and limit it to 31 characters. Shortened most timer names. bugref:9943

Location:
trunk/src/VBox/VMM/VMMR3
Files:
7 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/VMM/VMMR3/CPUM.cpp

    r87766 r87773  
    45104510                {
    45114511                    PVMCPU pVCpu = pVM->apCpusR3[idCpu];
    4512                     /* The string cannot live on the stack. It should be safe to call MMR3HeapAPrintf here as
    4513                        MMR3HyperInitFinalize has already completed at this point. */
    4514                     char *pszTimerName = MMR3HeapAPrintf(pVM, MM_TAG_CPUM_CTX, "Nested Guest VMX-preempt. timer %u", idCpu);
     4512                    char szName[32];
     4513                    RTStrPrintf(szName, sizeof(szName), "Nested VMX-preemption %u", idCpu);
    45154514                    int rc = TMR3TimerCreate(pVM, TMCLOCK_VIRTUAL_SYNC, cpumR3VmxPreemptTimerCallback, pVCpu,
    4516                                              TMTIMER_FLAGS_RING0, pszTimerName, &pVCpu->cpum.s.hNestedVmxPreemptTimer);
     4515                                             TMTIMER_FLAGS_RING0, szName, &pVCpu->cpum.s.hNestedVmxPreemptTimer);
    45174516                    AssertLogRelRCReturn(rc, rc);
    45184517                }
  • trunk/src/VBox/VMM/VMMR3/GIMHv.cpp

    r87766 r87773  
    518518
    519519                /* Create the timer and associate the context pointers. */
    520                 RTStrPrintf(&pHvStimer->szTimerDesc[0], sizeof(pHvStimer->szTimerDesc), "Hyper-V[%u] Timer%u", pVCpu->idCpu,
    521                             idxStimer);
     520                char szName[32];
     521                RTStrPrintf(szName, sizeof(szName), "Hyper-V[%u] Timer%u", pVCpu->idCpu, idxStimer);
    522522                rc = TMR3TimerCreate(pVM, TMCLOCK_VIRTUAL_SYNC, gimR3HvTimerCallback, pHvStimer /* pvUser */,
    523                                      TMTIMER_FLAGS_RING0, pHvStimer->szTimerDesc, &pHvStimer->hTimer);
     523                                     TMTIMER_FLAGS_RING0, szName, &pHvStimer->hTimer);
    524524                AssertLogRelRCReturn(rc, rc);
    525525            }
  • trunk/src/VBox/VMM/VMMR3/PDMDevHlp.cpp

    r87766 r87773  
    422422             pDevIns->pReg->szName, pDevIns->iInstance, enmClock, pfnCallback, pvUser, fFlags, pszDesc, pszDesc, phTimer));
    423423
    424     if (pDevIns->iInstance > 0) /** @todo use a string cache here later. */
    425     {
    426          char *pszDesc2 = MMR3HeapAPrintf(pVM, MM_TAG_PDM_DEVICE_DESC, "%s[%u]", pszDesc, pDevIns->iInstance);
    427          if (pszDesc2)
    428              pszDesc = pszDesc2;
     424    /* Mangle the timer name if there are more than one instance of this device. */
     425    char szName[32];
     426    AssertReturn(strlen(pszDesc) < sizeof(szName) - 3, VERR_INVALID_NAME);
     427    if (pDevIns->iInstance > 0)
     428    {
     429        RTStrPrintf(szName, sizeof(szName), "%s[%u]", pszDesc, pDevIns->iInstance);
     430        pszDesc = szName;
    429431    }
    430432
  • trunk/src/VBox/VMM/VMMR3/PDMDriver.cpp

    r87772 r87773  
    13251325    LogFlow(("pdmR3DrvHlp_TimerCreate: caller='%s'/%d: enmClock=%d pfnCallback=%p pvUser=%p fFlags=%#x pszDesc=%p:{%s} phTimer=%p\n",
    13261326             pDrvIns->pReg->szName, pDrvIns->iInstance, enmClock, pfnCallback, pvUser, fFlags, pszDesc, pszDesc, phTimer));
     1327
     1328    /* Mangle the timer name if there are more than once instance of this driver. */
     1329    char szName[32];
     1330    AssertReturn(strlen(pszDesc) < sizeof(szName) - 3, VERR_INVALID_NAME);
     1331    if (pDrvIns->iInstance > 0)
     1332    {
     1333        RTStrPrintf(szName, sizeof(szName), "%s[%u]", pszDesc, pDrvIns->iInstance);
     1334        pszDesc = szName;
     1335    }
    13271336
    13281337    /* Clear the ring-0 flag if the driver isn't configured for ring-0. */
  • trunk/src/VBox/VMM/VMMR3/PDMQueue.cpp

    r87766 r87773  
    113113    if (cMilliesInterval)
    114114    {
    115         rc = TMR3TimerCreate(pVM, TMCLOCK_REAL, pdmR3QueueTimer, pQueue, TMTIMER_FLAGS_NO_RING0, "Queue timer", &pQueue->hTimer);
     115        char szName[32];
     116        RTStrPrintf(szName, sizeof(szName), "Queue %s", pQueue->pszName);
     117        rc = TMR3TimerCreate(pVM, TMCLOCK_REAL, pdmR3QueueTimer, pQueue, TMTIMER_FLAGS_NO_RING0, szName, &pQueue->hTimer);
    116118        if (RT_SUCCESS(rc))
    117119        {
  • trunk/src/VBox/VMM/VMMR3/PDMUsb.cpp

    r87766 r87773  
    18281828    fFlags |= TMTIMER_FLAGS_NO_RING0;
    18291829
    1830     /** @todo use a string cache here later. */
    1831     char *pszDesc2 = MMR3HeapAPrintf(pVM, MM_TAG_PDM_USB_DESC, "%s[%s:%u]", pszDesc, pUsbIns->Internal.s.pUsbDev->pReg->szName, pUsbIns->iInstance);
    1832     if (pszDesc2)
    1833         pszDesc = pszDesc2;
     1830    /* Mangle the timer name if there are more than one instance of this device. */
     1831    char szName[32];
     1832    AssertReturn(strlen(pszDesc) < sizeof(szName) - 8, VERR_INVALID_NAME);
     1833    if (pUsbIns->iInstance > 0)
     1834    {
     1835        RTStrPrintf(szName, sizeof(szName), "%s[%u:%s]", pszDesc, pUsbIns->iInstance, pUsbIns->Internal.s.pUsbDev->pReg->szName);
     1836        pszDesc = szName;
     1837    }
    18341838
    18351839    int rc = TMR3TimerCreateUsb(pVM, pUsbIns, enmClock, pfnCallback, pvUser, fFlags, pszDesc, phTimer);
  • trunk/src/VBox/VMM/VMMR3/TM.cpp

    r87771 r87773  
    15001500 * @param   enmClock    The timer clock.
    15011501 * @param   fFlags      TMTIMER_FLAGS_XXX.
    1502  * @param   pszDesc     The timer description.
     1502 * @param   pszName     The timer name.
    15031503 * @param   ppTimer     Where to store the timer pointer on success.
    15041504 */
    1505 static int tmr3TimerCreate(PVM pVM, TMCLOCK enmClock, uint32_t fFlags, const char *pszDesc, PPTMTIMERR3 ppTimer)
    1506 {
     1505static int tmr3TimerCreate(PVM pVM, TMCLOCK enmClock, uint32_t fFlags, const char *pszName, PPTMTIMERR3 ppTimer)
     1506{
     1507    PTMTIMERR3 pTimer;
     1508
     1509    /*
     1510     * Validate input.
     1511     */
    15071512    VM_ASSERT_EMT(pVM);
    15081513    AssertReturn((fFlags & (TMTIMER_FLAGS_RING0 | TMTIMER_FLAGS_NO_RING0)) != (TMTIMER_FLAGS_RING0 | TMTIMER_FLAGS_NO_RING0),
    15091514                 VERR_INVALID_FLAGS);
     1515    AssertPtrReturn(pszName, VERR_INVALID_POINTER);
     1516    size_t const cchName = strlen(pszName);
     1517    AssertMsgReturn(cchName < sizeof(pTimer->szName), ("timer name too long: %s\n", pszName), VERR_INVALID_NAME);
     1518    AssertMsgReturn(cchName > 2,  ("Too short timer name: %s\n", pszName), VERR_INVALID_NAME);
    15101519
    15111520    /*
    15121521     * Allocate the timer.
    15131522     */
    1514     PTMTIMERR3 pTimer = NULL;
    15151523    if (pVM->tm.s.pFree && VM_IS_EMT(pVM))
    15161524    {
     
    15191527        Log3(("TM: Recycling timer %p, new free head %p.\n", pTimer, pTimer->pBigNext));
    15201528    }
     1529    else
     1530        pTimer = NULL;
    15211531
    15221532    if (!pTimer)
     
    15421552    pTimer->pvUser          = NULL;
    15431553    pTimer->pCritSect       = NULL;
    1544     pTimer->pszDesc         = pszDesc;
     1554    memcpy(pTimer->szName, pszName, cchName);
     1555    pTimer->szName[cchName] = '\0';
    15451556
    15461557    /* insert into the list of created timers. */
     
    15561567    TM_UNLOCK_TIMERS(pVM);
    15571568
     1569#ifdef VBOX_WITH_STATISTICS
    15581570    /*
    15591571     * Register statistics.
    15601572     */
    1561 #ifdef VBOX_WITH_STATISTICS
    1562 
    15631573    STAMR3RegisterF(pVM, &pTimer->StatTimer,        STAMTYPE_PROFILE, STAMVISIBILITY_ALWAYS, STAMUNIT_TICKS_PER_CALL,
    1564                     tmR3TimerClockName(pTimer), "/TM/Timers/%s", pszDesc);
     1574                    tmR3TimerClockName(pTimer), "/TM/Timers/%s", pTimer->szName);
    15651575    STAMR3RegisterF(pVM, &pTimer->StatCritSectEnter, STAMTYPE_PROFILE, STAMVISIBILITY_ALWAYS, STAMUNIT_TICKS_PER_CALL,
    1566                     "", "/TM/Timers/%s/CritSectEnter", pszDesc);
     1576                    "", "/TM/Timers/%s/CritSectEnter", pTimer->szName);
    15671577    STAMR3RegisterF(pVM, &pTimer->StatGet,          STAMTYPE_COUNTER, STAMVISIBILITY_ALWAYS, STAMUNIT_CALLS,
    1568                     "", "/TM/Timers/%s/Get", pszDesc);
     1578                    "", "/TM/Timers/%s/Get", pTimer->szName);
    15691579    STAMR3RegisterF(pVM, &pTimer->StatSetAbsolute,  STAMTYPE_COUNTER, STAMVISIBILITY_ALWAYS, STAMUNIT_CALLS,
    1570                     "", "/TM/Timers/%s/SetAbsolute", pszDesc);
     1580                    "", "/TM/Timers/%s/SetAbsolute", pTimer->szName);
    15711581    STAMR3RegisterF(pVM, &pTimer->StatSetRelative,  STAMTYPE_COUNTER, STAMVISIBILITY_ALWAYS, STAMUNIT_CALLS,
    1572                     "", "/TM/Timers/%s/SetRelative", pszDesc);
     1582                    "", "/TM/Timers/%s/SetRelative", pTimer->szName);
    15731583    STAMR3RegisterF(pVM, &pTimer->StatStop,         STAMTYPE_COUNTER, STAMVISIBILITY_ALWAYS, STAMUNIT_CALLS,
    1574                     "", "/TM/Timers/%s/Stop", pszDesc);
     1584                    "", "/TM/Timers/%s/Stop", pTimer->szName);
    15751585#endif
    15761586
     
    15901600 * @param   pvUser          The user argument to the callback.
    15911601 * @param   fFlags          Timer creation flags, see grp_tm_timer_flags.
    1592  * @param   pszDesc         Pointer to description string which must stay around
    1593  *                          until the timer is fully destroyed (i.e. a bit after TMTimerDestroy()).
     1602 * @param   pszName         Timer name (will be copied).  Max 31 chars.
    15941603 * @param   phTimer         Where to store the timer handle on success.
    15951604 */
    15961605VMM_INT_DECL(int) TMR3TimerCreateDevice(PVM pVM, PPDMDEVINS pDevIns, TMCLOCK enmClock,
    15971606                                        PFNTMTIMERDEV pfnCallback, void *pvUser,
    1598                                         uint32_t fFlags, const char *pszDesc, PTMTIMERHANDLE phTimer)
     1607                                        uint32_t fFlags, const char *pszName, PTMTIMERHANDLE phTimer)
    15991608{
    16001609    AssertReturn(!(fFlags & ~(TMTIMER_FLAGS_NO_CRIT_SECT | TMTIMER_FLAGS_RING0 | TMTIMER_FLAGS_NO_RING0)),
     
    16051614     */
    16061615    PTMTIMER pTimer;
    1607     int rc = tmr3TimerCreate(pVM, enmClock, fFlags, pszDesc, &pTimer);
     1616    int rc = tmr3TimerCreate(pVM, enmClock, fFlags, pszName, &pTimer);
    16081617    if (RT_SUCCESS(rc))
    16091618    {
     
    16151624            pTimer->pCritSect = PDMR3DevGetCritSect(pVM, pDevIns);
    16161625        *phTimer = pTimer->hSelf;
    1617         Log(("TM: Created device timer %p clock %d callback %p '%s'\n", phTimer, enmClock, pfnCallback, pszDesc));
     1626        Log(("TM: Created device timer %p clock %d callback %p '%s'\n", phTimer, enmClock, pfnCallback, pszName));
    16181627    }
    16191628
     
    16341643 * @param   pvUser          The user argument to the callback.
    16351644 * @param   fFlags          Timer creation flags, see grp_tm_timer_flags.
    1636  * @param   pszDesc         Pointer to description string which must stay around
    1637  *                          until the timer is fully destroyed (i.e. a bit after TMTimerDestroy()).
     1645 * @param   pszName         Timer name (will be copied).  Max 31 chars.
    16381646 * @param   phTimer         Where to store the timer handle on success.
    16391647 */
    16401648VMM_INT_DECL(int) TMR3TimerCreateUsb(PVM pVM, PPDMUSBINS pUsbIns, TMCLOCK enmClock,
    16411649                                     PFNTMTIMERUSB pfnCallback, void *pvUser,
    1642                                      uint32_t fFlags, const char *pszDesc, PTMTIMERHANDLE phTimer)
     1650                                     uint32_t fFlags, const char *pszName, PTMTIMERHANDLE phTimer)
    16431651{
    16441652    AssertReturn(!(fFlags & ~(TMTIMER_FLAGS_NO_CRIT_SECT | TMTIMER_FLAGS_NO_RING0)), VERR_INVALID_PARAMETER);
     
    16481656     */
    16491657    PTMTIMER pTimer;
    1650     int rc = tmr3TimerCreate(pVM, enmClock, fFlags, pszDesc, &pTimer);
     1658    int rc = tmr3TimerCreate(pVM, enmClock, fFlags, pszName, &pTimer);
    16511659    if (RT_SUCCESS(rc))
    16521660    {
     
    16631671        //}
    16641672        *phTimer = pTimer->hSelf;
    1665         Log(("TM: Created USB device timer %p clock %d callback %p '%s'\n", *phTimer, enmClock, pfnCallback, pszDesc));
     1673        Log(("TM: Created USB device timer %p clock %d callback %p '%s'\n", *phTimer, enmClock, pfnCallback, pszName));
    16661674    }
    16671675
     
    16801688 * @param   pvUser          The user argument to the callback.
    16811689 * @param   fFlags          Timer creation flags, see grp_tm_timer_flags.
    1682  * @param   pszDesc         Pointer to description string which must stay around
    1683  *                          until the timer is fully destroyed (i.e. a bit after TMTimerDestroy()).
     1690 * @param   pszName         Timer name (will be copied).  Max 31 chars.
    16841691 * @param   phTimer         Where to store the timer handle on success.
    16851692 */
    16861693VMM_INT_DECL(int) TMR3TimerCreateDriver(PVM pVM, PPDMDRVINS pDrvIns, TMCLOCK enmClock, PFNTMTIMERDRV pfnCallback, void *pvUser,
    1687                                         uint32_t fFlags, const char *pszDesc, PTMTIMERHANDLE phTimer)
     1694                                        uint32_t fFlags, const char *pszName, PTMTIMERHANDLE phTimer)
    16881695{
    16891696    AssertReturn(!(fFlags & ~(TMTIMER_FLAGS_NO_CRIT_SECT | TMTIMER_FLAGS_RING0 | TMTIMER_FLAGS_NO_RING0)),
     
    16941701     */
    16951702    PTMTIMER pTimer;
    1696     int rc = tmr3TimerCreate(pVM, enmClock, fFlags, pszDesc, &pTimer);
     1703    int rc = tmr3TimerCreate(pVM, enmClock, fFlags, pszName, &pTimer);
    16971704    if (RT_SUCCESS(rc))
    16981705    {
     
    17021709        pTimer->pvUser          = pvUser;
    17031710        *phTimer = pTimer->hSelf;
    1704         Log(("TM: Created device timer %p clock %d callback %p '%s'\n", *phTimer, enmClock, pfnCallback, pszDesc));
     1711        Log(("TM: Created device timer %p clock %d callback %p '%s'\n", *phTimer, enmClock, pfnCallback, pszName));
    17051712    }
    17061713
     
    17181725 * @param   pvUser          User argument to be passed to the callback.
    17191726 * @param   fFlags          Timer creation flags, see grp_tm_timer_flags.
    1720  * @param   pszDesc         Pointer to description string which must stay around
    1721  *                          until the timer is fully destroyed (i.e. a bit after TMTimerDestroy()).
     1727 * @param   pszName         Timer name (will be copied).  Max 31 chars.
    17221728 * @param   phTimer         Where to store the timer handle on success.
    17231729 */
    17241730VMMR3DECL(int) TMR3TimerCreate(PVM pVM, TMCLOCK enmClock, PFNTMTIMERINT pfnCallback, void *pvUser,
    1725                                uint32_t fFlags, const char *pszDesc, PTMTIMERHANDLE phTimer)
     1731                               uint32_t fFlags, const char *pszName, PTMTIMERHANDLE phTimer)
    17261732{
    17271733    AssertReturn(fFlags & (TMTIMER_FLAGS_RING0 | TMTIMER_FLAGS_NO_RING0), VERR_INVALID_FLAGS);
     
    17331739     */
    17341740    PTMTIMER pTimer;
    1735     int rc = tmr3TimerCreate(pVM, enmClock, fFlags, pszDesc, &pTimer);
     1741    int rc = tmr3TimerCreate(pVM, enmClock, fFlags, pszName, &pTimer);
    17361742    if (RT_SUCCESS(rc))
    17371743    {
     
    17401746        pTimer->pvUser              = pvUser;
    17411747        *phTimer = pTimer->hSelf;
    1742         Log(("TM: Created internal timer %p clock %d callback %p '%s'\n", pTimer, enmClock, pfnCallback, pszDesc));
     1748        Log(("TM: Created internal timer %p clock %d callback %p '%s'\n", pTimer, enmClock, pfnCallback, pszName));
    17431749    }
    17441750
     
    17641770    AssertMsg(   !pTimer->pCritSect
    17651771              || VMR3GetState(pVM) != VMSTATE_RUNNING
    1766               || PDMCritSectIsOwner(pTimer->pCritSect), ("%s\n", pTimer->pszDesc));
     1772              || PDMCritSectIsOwner(pTimer->pCritSect), ("%s\n", pTimer->szName));
    17671773
    17681774    /*
     
    17771783         */
    17781784        TMTIMERSTATE const enmState = pTimer->enmState;
    1779         Log2(("TMTimerDestroy: %p:{.enmState=%s, .pszDesc='%s'} cRetries=%d\n",
    1780               pTimer, tmTimerState(enmState), R3STRING(pTimer->pszDesc), cRetries));
     1785        Log2(("TMTimerDestroy: %p:{.enmState=%s, .szName='%s'} cRetries=%d\n",
     1786              pTimer, tmTimerState(enmState), pTimer->szName, cRetries));
    17811787        switch (enmState)
    17821788        {
     
    18061812            case TMTIMERSTATE_PENDING_SCHEDULE_SET_EXPIRE:
    18071813            case TMTIMERSTATE_PENDING_RESCHEDULE_SET_EXPIRE:
    1808                 AssertMsgFailed(("%p:.enmState=%s %s\n", pTimer, tmTimerState(enmState), pTimer->pszDesc));
     1814                AssertMsgFailed(("%p:.enmState=%s %s\n", pTimer, tmTimerState(enmState), pTimer->szName));
    18091815                TM_UNLOCK_TIMERS(pVM);
    18101816                if (!RTThreadYield())
    18111817                    RTThreadSleep(1);
    1812                 AssertMsgReturn(cRetries > 0, ("Failed waiting for stable state. state=%d (%s)\n", pTimer->enmState, pTimer->pszDesc),
     1818                AssertMsgReturn(cRetries > 0, ("Failed waiting for stable state. state=%d (%s)\n", pTimer->enmState, pTimer->szName),
    18131819                                VERR_TM_UNSTABLE_STATE);
    18141820                TM_LOCK_TIMERS(pVM);
     
    18241830
    18251831            default:
    1826                 AssertMsgFailed(("Unknown timer state %d (%s)\n", enmState, R3STRING(pTimer->pszDesc)));
     1832                AssertMsgFailed(("Unknown timer state %d (%s)\n", enmState, pTimer->szName));
    18271833                TM_UNLOCK_TIMERS(pVM);
    18281834                return VERR_TM_UNKNOWN_STATE;
     
    18371843        if (fRc)
    18381844            break;
    1839         AssertMsgFailed(("%p:.enmState=%s %s\n", pTimer, tmTimerState(enmState), pTimer->pszDesc));
     1845        AssertMsgFailed(("%p:.enmState=%s %s\n", pTimer, tmTimerState(enmState), pTimer->szName));
    18401846        TM_UNLOCK_TIMERS(pVM);
    1841         AssertMsgReturn(cRetries > 0, ("Failed waiting for stable state. state=%d (%s)\n", pTimer->enmState, pTimer->pszDesc),
     1847        AssertMsgReturn(cRetries > 0, ("Failed waiting for stable state. state=%d (%s)\n", pTimer->enmState, pTimer->szName),
    18421848                        VERR_TM_UNSTABLE_STATE);
    18431849        TM_LOCK_TIMERS(pVM);
     
    18811887#ifdef VBOX_WITH_STATISTICS
    18821888    char szPrefix[128];
    1883     RTStrPrintf(szPrefix, sizeof(szPrefix), "/TM/Timers/%s", pTimer->pszDesc);
     1889    RTStrPrintf(szPrefix, sizeof(szPrefix), "/TM/Timers/%s", pTimer->szName);
    18841890    STAMR3DeregisterByPrefix(pVM->pUVM, szPrefix);
    18851891#endif
     
    22662272            STAM_PROFILE_STOP(&pTimer->StatCritSectEnter, Locking);
    22672273        }
    2268         Log2(("tmR3TimerQueueRun: %p:{.enmState=%s, .enmClock=%d, .enmType=%d, u64Expire=%llx (now=%llx) .pszDesc=%s}\n",
    2269               pTimer, tmTimerState(pTimer->enmState), pTimer->enmClock, pTimer->enmType, pTimer->u64Expire, u64Now, pTimer->pszDesc));
     2274        Log2(("tmR3TimerQueueRun: %p:{.enmState=%s, .enmClock=%d, .enmType=%d, u64Expire=%llx (now=%llx) .szName='%s'}\n",
     2275              pTimer, tmTimerState(pTimer->enmState), pTimer->enmClock, pTimer->enmType, pTimer->u64Expire, u64Now, pTimer->szName));
    22702276        bool fRc;
    22712277        TM_TRY_SET_STATE(pTimer, TMTIMERSTATE_EXPIRED_GET_UNLINK, TMTIMERSTATE_ACTIVE, fRc);
     
    22982304                case TMTIMERTYPE_INTERNAL:  pTimer->u.Internal.pfnTimer(pVM, pTimer->hSelf, pTimer->pvUser); break;
    22992305                default:
    2300                     AssertMsgFailed(("Invalid timer type %d (%s)\n", pTimer->enmType, pTimer->pszDesc));
     2306                    AssertMsgFailed(("Invalid timer type %d (%s)\n", pTimer->enmType, pTimer->szName));
    23012307                    break;
    23022308            }
     
    24592465        }
    24602466
    2461         Log2(("tmR3TimerQueueRun: %p:{.enmState=%s, .enmClock=%d, .enmType=%d, u64Expire=%llx (now=%llx) .pszDesc=%s}\n",
    2462               pTimer, tmTimerState(pTimer->enmState), pTimer->enmClock, pTimer->enmType, pTimer->u64Expire, u64Now, pTimer->pszDesc));
     2467        Log2(("tmR3TimerQueueRun: %p:{.enmState=%s, .enmClock=%d, .enmType=%d, u64Expire=%llx (now=%llx) .szName='%s'}\n",
     2468              pTimer, tmTimerState(pTimer->enmState), pTimer->enmClock, pTimer->enmType, pTimer->u64Expire, u64Now, pTimer->szName));
    24632469
    24642470        /* Advance the clock - don't permit timers to be out of order or armed
    24652471           in the 'past'. */
    24662472#ifdef VBOX_STRICT
    2467         AssertMsg(pTimer->u64Expire >= u64Prev, ("%'RU64 < %'RU64 %s\n", pTimer->u64Expire, u64Prev, pTimer->pszDesc));
     2473        AssertMsg(pTimer->u64Expire >= u64Prev, ("%'RU64 < %'RU64 %s\n", pTimer->u64Expire, u64Prev, pTimer->szName));
    24682474        u64Prev = pTimer->u64Expire;
    24692475#endif
     
    24822488            case TMTIMERTYPE_INTERNAL:  pTimer->u.Internal.pfnTimer(pVM, pTimer->hSelf, pTimer->pvUser); break;
    24832489            default:
    2484                 AssertMsgFailed(("Invalid timer type %d (%s)\n", pTimer->enmType, pTimer->pszDesc));
     2490                AssertMsgFailed(("Invalid timer type %d (%s)\n", pTimer->enmType, pTimer->szName));
    24852491                break;
    24862492        }
     
    27132719    PTMTIMER pTimer;
    27142720    TMTIMER_HANDLE_TO_PTR_RETURN(pVM, hTimer, pTimer);
    2715     LogFlow(("TMR3TimerSave: %p:{enmState=%s, .pszDesc={%s}} pSSM=%p\n", pTimer, tmTimerState(pTimer->enmState), pTimer->pszDesc, pSSM));
     2721    LogFlow(("TMR3TimerSave: %p:{enmState=%s, .szName='%s'} pSSM=%p\n", pTimer, tmTimerState(pTimer->enmState), pTimer->szName, pSSM));
    27162722
    27172723    switch (pTimer->enmState)
     
    27242730        case TMTIMERSTATE_PENDING_SCHEDULE_SET_EXPIRE:
    27252731        case TMTIMERSTATE_PENDING_RESCHEDULE_SET_EXPIRE:
    2726             AssertMsgFailed(("u64Expire is being updated! (%s)\n", pTimer->pszDesc));
     2732            AssertMsgFailed(("u64Expire is being updated! (%s)\n", pTimer->szName));
    27272733            if (!RTThreadYield())
    27282734                RTThreadSleep(1);
     
    27382744        case TMTIMERSTATE_DESTROY:
    27392745        case TMTIMERSTATE_FREE:
    2740             AssertMsgFailed(("Invalid timer state %d %s (%s)\n", pTimer->enmState, tmTimerState(pTimer->enmState), pTimer->pszDesc));
     2746            AssertMsgFailed(("Invalid timer state %d %s (%s)\n", pTimer->enmState, tmTimerState(pTimer->enmState), pTimer->szName));
    27412747            return SSMR3HandleSetStatus(pSSM, VERR_TM_INVALID_STATE);
    27422748    }
    27432749
    2744     AssertMsgFailed(("Unknown timer state %d (%s)\n", pTimer->enmState, pTimer->pszDesc));
     2750    AssertMsgFailed(("Unknown timer state %d (%s)\n", pTimer->enmState, pTimer->szName));
    27452751    return SSMR3HandleSetStatus(pSSM, VERR_TM_UNKNOWN_STATE);
    27462752}
     
    27612767    TMTIMER_HANDLE_TO_PTR_RETURN(pVM, hTimer, pTimer);
    27622768    Assert(pSSM);
    2763     LogFlow(("TMR3TimerLoad: %p:{enmState=%s, .pszDesc={%s}} pSSM=%p\n", pTimer, tmTimerState(pTimer->enmState), pTimer->pszDesc, pSSM));
     2769    LogFlow(("TMR3TimerLoad: %p:{enmState=%s, .szName='%s'} pSSM=%p\n", pTimer, tmTimerState(pTimer->enmState), pTimer->szName, pSSM));
    27642770
    27652771    /*
     
    29142920    AssertReturn(!pTimer->pCritSect, VERR_ALREADY_EXISTS);
    29152921    AssertReturn(pTimer->enmState == TMTIMERSTATE_STOPPED, VERR_INVALID_STATE);
    2916     LogFlow(("pTimer=%p (%s) pCritSect=%p (%s)\n", pTimer, pTimer->pszDesc, pCritSect, pszName));
     2922    LogFlow(("pTimer=%p (%s) pCritSect=%p (%s)\n", pTimer, pTimer->szName, pCritSect, pszName));
    29172923
    29182924    pTimer->pCritSect = pCritSect;
     
    37003706                        pTimer->uHzHint,
    37013707                        tmTimerState(pTimer->enmState),
    3702                         pTimer->pszDesc);
     3708                        pTimer->szName);
    37033709    }
    37043710    TM_UNLOCK_TIMERS(pVM);
     
    37463752                            pTimer->uHzHint,
    37473753                            tmTimerState(pTimer->enmState),
    3748                             pTimer->pszDesc);
     3754                            pTimer->szName);
    37493755        }
    37503756        TM_UNLOCK_TIMERS(pVM);
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