VirtualBox

Changeset 20854 in vbox for trunk/src/VBox/VMM/VMM.cpp


Ignore:
Timestamp:
Jun 23, 2009 4:32:12 PM (15 years ago)
Author:
vboxsync
Message:

VMM: Use the custom logger prefix to indicate the virtual CPU ID.

File:
1 edited

Legend:

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

    r20792 r20854  
    808808     * in ring-0. Only initialize it once.
    809809     */
    810     for (unsigned i = 0; i < pVM->cCPUs; i++)
     810    for (VMCPUID i = 0; i < pVM->cCPUs; i++)
    811811    {
    812812        PVMCPU       pVCpu = &pVM->aCpus[i];
     
    818818                RTR0PTR pfnLoggerWrapper = NIL_RTR0PTR;
    819819                rc = PDMR3LdrGetSymbolR0(pVM, VMMR0_MAIN_MODULE_NAME, "vmmR0LoggerWrapper", &pfnLoggerWrapper);
    820                 AssertReleaseMsgRCReturn(rc, ("VMMLoggerWrapper not found! rc=%Rra\n", rc), rc);
     820                AssertReleaseMsgRCReturn(rc, ("vmmR0LoggerWrapper not found! rc=%Rra\n", rc), rc);
    821821
    822822                RTR0PTR pfnLoggerFlush = NIL_RTR0PTR;
    823823                rc = PDMR3LdrGetSymbolR0(pVM, VMMR0_MAIN_MODULE_NAME, "vmmR0LoggerFlush", &pfnLoggerFlush);
    824                 AssertReleaseMsgRCReturn(rc, ("VMMLoggerFlush not found! rc=%Rra\n", rc), rc);
     824                AssertReleaseMsgRCReturn(rc, ("vmmR0LoggerFlush not found! rc=%Rra\n", rc), rc);
    825825
    826826                rc = RTLogCreateForR0(&pR0LoggerR3->Logger, pR0LoggerR3->cbLogger,
    827                                     *(PFNRTLOGGER *)&pfnLoggerWrapper, *(PFNRTLOGFLUSH *)&pfnLoggerFlush,
    828                                     RTLOGFLAGS_BUFFERED, RTLOGDEST_DUMMY);
     827                                      *(PFNRTLOGGER *)&pfnLoggerWrapper, *(PFNRTLOGFLUSH *)&pfnLoggerFlush,
     828                                      RTLOGFLAGS_BUFFERED, RTLOGDEST_DUMMY);
    829829                AssertReleaseMsgRCReturn(rc, ("RTLogCreateForR0 failed! rc=%Rra\n", rc), rc);
     830
     831                RTR0PTR pfnLoggerPrefix = NIL_RTR0PTR;
     832                rc = PDMR3LdrGetSymbolR0(pVM, VMMR0_MAIN_MODULE_NAME, "vmmR0LoggerPrefix", &pfnLoggerPrefix);
     833                AssertReleaseMsgRCReturn(rc, ("vmmR0LoggerPrefix not found! rc=%Rra\n", rc), rc);
     834                rc = RTLogSetCustomPrefixCallback(&pR0LoggerR3->Logger, *(PFNRTLOGPREFIX *)&pfnLoggerPrefix, NULL);
     835                AssertReleaseMsgRCReturn(rc, ("RTLogSetCustomPrefixCallback failed! rc=%Rra\n", rc), rc);
     836
     837                pR0LoggerR3->idCpu = i;
    830838                pR0LoggerR3->fCreated = true;
    831839                pR0LoggerR3->fFlushingDisabled = false;
     840
    832841            }
    833842
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