Changeset 90862 in vbox for trunk/src/VBox
- Timestamp:
- Aug 25, 2021 12:37:59 AM (3 years ago)
- Location:
- trunk/src/VBox
- Files:
-
- 14 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Additions/WINNT/VBoxTray/VBoxTray.cpp
r90829 r90862 578 578 RTLOGFLAGS_PREFIX_THREAD | RTLOGFLAGS_PREFIX_TIME_PROG | RTLOGFLAGS_USECRLF, 579 579 s_szGroupSettings, RT_ELEMENTS(s_apszGroups), s_apszGroups, UINT32_MAX, 580 NULL /*pfnFlush*/,0 /*cBufDescs*/, NULL /*paBufDescs*/, RTLOGDEST_STDOUT,580 0 /*cBufDescs*/, NULL /*paBufDescs*/, RTLOGDEST_STDOUT, 581 581 vboxTrayLogHeaderFooter, g_cHistory, g_uHistoryFileSize, g_uHistoryFileTime, 582 582 RTErrInfoInitStatic(&ErrInfo), NULL /*pszFilenameFmt*/); -
trunk/src/VBox/Additions/common/VBoxService/VBoxService.cpp
r90829 r90862 316 316 int rc = RTLogCreateEx(&g_pLoggerRelease, "VBOXSERVICE_RELEASE_LOG", fFlags, "all", 317 317 RT_ELEMENTS(s_apszGroups), s_apszGroups, UINT32_MAX /*cMaxEntriesPerGroup*/, 318 NULL /*pfnFlush*/,0 /*cBufDescs*/, NULL /*paBufDescs*/, RTLOGDEST_STDOUT | RTLOGDEST_USER,318 0 /*cBufDescs*/, NULL /*paBufDescs*/, RTLOGDEST_STDOUT | RTLOGDEST_USER, 319 319 vgsvcLogHeaderFooter, g_cHistory, g_uHistoryFileSize, g_uHistoryFileTime, 320 320 NULL /*pErrInfo*/, "%s", pszLogFile ? pszLogFile : ""); -
trunk/src/VBox/Additions/darwin/VBoxClient/VBoxClient.cpp
r90829 r90862 61 61 int rc = RTLogCreateEx(&g_pLogger, "VBOXCLIENT_RELEASE_LOG", RTLOGFLAGS_PREFIX_THREAD | RTLOGFLAGS_PREFIX_TIME_PROG, "all", 62 62 RT_ELEMENTS(s_apszGroups), s_apszGroups, UINT32_MAX /*cMaxEntriesPerGroup*/, 63 NULL /*pfnFlush*/,0 /*cBufDescs*/, NULL /*paBufDescs*/, RTLOGDEST_STDOUT,63 0 /*cBufDescs*/, NULL /*paBufDescs*/, RTLOGDEST_STDOUT, 64 64 NULL /*pfnPhase*/, 65 65 pszLogFileName ? 10 : 0 /*cHistory*/, -
trunk/src/VBox/Additions/linux/lightdm-greeter/vbox-greeter.cpp
r90829 r90862 937 937 int rc = RTLogCreateEx(&g_pLoggerRelease, "VBOXGREETER_RELEASE_LOG", fFlags, "all", 938 938 RT_ELEMENTS(s_apszGroups), s_apszGroups, UINT32_MAX /*cMaxEntriesPerGroup*/, 939 NULL /*pfnFlush*/,0 /*cBufDescs*/, NULL /*paBufDescs*/, RTLOGDEST_STDOUT,939 0 /*cBufDescs*/, NULL /*paBufDescs*/, RTLOGDEST_STDOUT, 940 940 vboxGreeterLogHeaderFooter, g_cHistory, g_uHistoryFileSize, g_uHistoryFileTime, 941 941 NULL /*pErrInfo*/, pszLogFile); -
trunk/src/VBox/Additions/x11/VBoxClient/logging.cpp
r90829 r90862 265 265 int rc = RTLogCreateEx(&g_pLoggerRelease, "VBOXCLIENT_RELEASE_LOG", fFlags, "all", 266 266 RT_ELEMENTS(s_apszGroups), s_apszGroups, UINT32_MAX /*cMaxEntriesPerGroup*/, 267 NULL /*pfnFlush*/,0 /*cBufDescs*/, NULL /*paBufDescs*/, RTLOGDEST_STDOUT | RTLOGDEST_USER,267 0 /*cBufDescs*/, NULL /*paBufDescs*/, RTLOGDEST_STDOUT | RTLOGDEST_USER, 268 268 vbClLogHeaderFooter, g_cHistory, g_uHistoryFileSize, g_uHistoryFileTime, 269 269 NULL /*pErrInfo*/, "%s", pszLogFile ? pszLogFile : ""); -
trunk/src/VBox/HostDrivers/Support/SUPDrv.cpp
r90859 r90862 301 301 { "RTLogSetDefaultInstanceThread", (void *)(uintptr_t)RTLogSetDefaultInstanceThread }, 302 302 { "RTLogSetFlushCallback", (void *)(uintptr_t)RTLogSetFlushCallback }, 303 { "RTLogSetR0ProgramStart", (void *)(uintptr_t)RTLogSetR0ProgramStart }, 303 304 { "RTLogSetR0ThreadNameF", (void *)(uintptr_t)RTLogSetR0ThreadNameF }, 304 305 { "RTMemAllocExTag", (void *)(uintptr_t)RTMemAllocExTag }, … … 5463 5464 5464 5465 case SUPLDRLOADEP_VMMR0: 5465 if (pReq->u.In.EP.VMMR0.pvVMMR0 != pImage->pvImage)5466 {5467 supdrvLdrUnlock(pDevExt);5468 return supdrvLdrLoadError(VERR_INVALID_PARAMETER, pReq, "Invalid pvVMMR0 pointer: %p, expected %p", pReq->u.In.EP.VMMR0.pvVMMR0, pImage->pvImage);5469 }5470 5466 rc = supdrvLdrValidatePointer(pDevExt, pImage, pReq->u.In.EP.VMMR0.pvVMMR0EntryFast, false, pReq->u.In.abImage, "VMMR0EntryFast", pReq); 5471 5467 if (RT_FAILURE(rc)) -
trunk/src/VBox/HostDrivers/Support/SUPDrvIOC.h
r90859 r90862 223 223 * - Remove pvVMMR0 from SUPLDRLOAD. 224 224 */ 225 #define SUPDRV_IOC_VERSION 0x003 00005225 #define SUPDRV_IOC_VERSION 0x00310000 226 226 227 227 /** SUP_IOCTL_COOKIE. */ … … 446 446 struct 447 447 { 448 /** The module handle (i.e. address). */449 RTR0PTR pvVMMR0;450 448 /** Address of VMMR0EntryFast function. */ 451 449 RTR0PTR pvVMMR0EntryFast; -
trunk/src/VBox/HostDrivers/Support/SUPLibLdr.cpp
r88377 r90862 635 635 { 636 636 pLoadReq->u.In.eEPType = SUPLDRLOADEP_VMMR0; 637 pLoadReq->u.In.EP.VMMR0.pvVMMR0 = uImageBase; 638 pLoadReq->u.In.EP.VMMR0.pvVMMR0EntryFast= (RTR0PTR)VMMR0EntryFast; 639 pLoadReq->u.In.EP.VMMR0.pvVMMR0EntryEx = (RTR0PTR)VMMR0EntryEx; 637 pLoadReq->u.In.EP.VMMR0.pvVMMR0EntryFast = (RTR0PTR)VMMR0EntryFast; 638 pLoadReq->u.In.EP.VMMR0.pvVMMR0EntryEx = (RTR0PTR)VMMR0EntryEx; 640 639 } 641 640 else if (pszSrvReqHandler) 642 641 { 643 642 pLoadReq->u.In.eEPType = SUPLDRLOADEP_SERVICE; 644 pLoadReq->u.In.EP.Service.pfnServiceReq = (RTR0PTR)SrvReqHandler;643 pLoadReq->u.In.EP.Service.pfnServiceReq = (RTR0PTR)SrvReqHandler; 645 644 pLoadReq->u.In.EP.Service.apvReserved[0] = NIL_RTR0PTR; 646 645 pLoadReq->u.In.EP.Service.apvReserved[1] = NIL_RTR0PTR; -
trunk/src/VBox/Main/glue/VBoxLogRelCreate.cpp
r90829 r90862 170 170 g_pszLogEntity = pcszEntity; 171 171 int vrc = RTLogCreateEx(&pReleaseLogger, pcszEnvVarBase, fFlags, pcszGroupSettings, RT_ELEMENTS(s_apszGroups), s_apszGroups, 172 cMaxEntriesPerGroup, NULL /*pfnFlush*/,0 /*cBufDescs*/, NULL /*paBufDescs*/, fDestFlags,172 cMaxEntriesPerGroup, 0 /*cBufDescs*/, NULL /*paBufDescs*/, fDestFlags, 173 173 vboxHeaderFooter, cHistory, uHistoryFileSize, uHistoryFileTime, 174 174 pErrInfo, pcszLogFile ? "%s" : NULL, pcszLogFile); -
trunk/src/VBox/Main/src-helper-apps/OpenGLTest/OpenGLTestApp.cpp
r90829 r90862 298 298 299 299 int vrc = RTLogCreateEx(&loggerRelease, "VBOX_RELEASE_LOG", fFlags, "all", RT_ELEMENTS(s_apszGroups), s_apszGroups, UINT32_MAX, 300 NULL /*pfnFlush*/,0 /*cBufDescs*/, NULL /*paBufDescs*/, enmLogDest,300 0 /*cBufDescs*/, NULL /*paBufDescs*/, enmLogDest, 301 301 NULL /*pfnBeginEnd*/, 0 /*cHistory*/, 0 /*cbHistoryFileMax*/, 0 /*uHistoryTimeMax*/, 302 302 NULL /*pErrInfo*/, pszFilenameFmt, pszFilename, RTTimeMilliTS()); -
trunk/src/VBox/Runtime/common/log/log.cpp
r90861 r90862 1009 1009 RTDECL(int) RTLogCreateExV(PRTLOGGER *ppLogger, const char *pszEnvVarBase, uint64_t fFlags, const char *pszGroupSettings, 1010 1010 uint32_t cGroups, const char * const *papszGroups, uint32_t cMaxEntriesPerGroup, 1011 PFNRTLOGFLUSH pfnFlush,uint32_t cBufDescs, PRTLOGBUFFERDESC paBufDescs, uint32_t fDestFlags,1011 uint32_t cBufDescs, PRTLOGBUFFERDESC paBufDescs, uint32_t fDestFlags, 1012 1012 PFNRTLOGPHASE pfnPhase, uint32_t cHistory, uint64_t cbHistoryFileMax, uint32_t cSecsHistoryTimeSlot, 1013 1013 PRTERRINFO pErrInfo, const char *pszFilenameFmt, va_list args) … … 1095 1095 pLoggerInt->cbSelf = sizeof(RTLOGGERINTERNAL); 1096 1096 pLoggerInt->hSpinMtx = NIL_RTSEMSPINMUTEX; 1097 pLoggerInt->pfnFlush = pfnFlush;1097 pLoggerInt->pfnFlush = NULL; 1098 1098 pLoggerInt->pfnPrefix = NULL; 1099 1099 pLoggerInt->pvPrefixUserArg = NULL; … … 1345 1345 rc = RTLogCreateExV(ppLogger, pszEnvVarBase, fFlags, pszGroupSettings, cGroups, papszGroups, 1346 1346 UINT32_MAX /*cMaxEntriesPerGroup*/, 1347 NULL /*pfnFlush*/,0 /*cBufDescs*/, NULL /*paBufDescs*/, fDestFlags,1347 0 /*cBufDescs*/, NULL /*paBufDescs*/, fDestFlags, 1348 1348 NULL /*pfnPhase*/, 0 /*cHistory*/, 0 /*cbHistoryFileMax*/, 0 /*cSecsHistoryTimeSlot*/, 1349 1349 NULL /*pErrInfo*/, pszFilenameFmt, va); … … 1356 1356 RTDECL(int) RTLogCreateEx(PRTLOGGER *ppLogger, const char *pszEnvVarBase, uint64_t fFlags, const char *pszGroupSettings, 1357 1357 unsigned cGroups, const char * const *papszGroups, uint32_t cMaxEntriesPerGroup, 1358 PFNRTLOGFLUSH pfnFlush,uint32_t cBufDescs, PRTLOGBUFFERDESC paBufDescs, uint32_t fDestFlags,1358 uint32_t cBufDescs, PRTLOGBUFFERDESC paBufDescs, uint32_t fDestFlags, 1359 1359 PFNRTLOGPHASE pfnPhase, uint32_t cHistory, uint64_t cbHistoryFileMax, uint32_t cSecsHistoryTimeSlot, 1360 1360 PRTERRINFO pErrInfo, const char *pszFilenameFmt, ...) … … 1365 1365 va_start(va, pszFilenameFmt); 1366 1366 rc = RTLogCreateExV(ppLogger, pszEnvVarBase, fFlags, pszGroupSettings, cGroups, papszGroups, cMaxEntriesPerGroup, 1367 pfnFlush,cBufDescs, paBufDescs, fDestFlags,1367 cBufDescs, paBufDescs, fDestFlags, 1368 1368 pfnPhase, cHistory, cbHistoryFileMax, cSecsHistoryTimeSlot, 1369 1369 pErrInfo, pszFilenameFmt, va); … … 2054 2054 2055 2055 #ifdef IN_RING0 2056 2056 2057 RTR0DECL(int) RTLogSetR0ThreadNameF(PRTLOGGER pLogger, const char *pszNameFmt, ...) 2057 2058 { … … 2078 2079 } 2079 2080 RT_EXPORT_SYMBOL(RTLogSetR0ThreadNameF); 2081 2082 2083 RTR0DECL(int) RTLogSetR0ProgramStart(PRTLOGGER pLogger, uint64_t nsStart) 2084 { 2085 PRTLOGGERINTERNAL pLoggerInt = (PRTLOGGERINTERNAL)pLogger; 2086 int rc; 2087 if (pLoggerInt) 2088 { 2089 rc = rtlogLock(pLoggerInt); 2090 if (RT_SUCCESS(rc)) 2091 { 2092 pLoggerInt->nsR0ProgramStart = nsStart; 2093 rtlogUnlock(pLoggerInt); 2094 } 2095 } 2096 else 2097 rc = VERR_INVALID_PARAMETER; 2098 return rc; 2099 } 2100 RT_EXPORT_SYMBOL(RTLogSetR0ProgramStart); 2101 2080 2102 #endif /* IN_RING0 */ 2081 2082 2103 2083 2104 /** -
trunk/src/VBox/VMM/VMMR0/VMMR0.cpp
r90859 r90862 392 392 */ 393 393 static int vmmR0InitLoggerOne(PGVMCPU pGVCpu, bool fRelease, PVMMR0PERVCPULOGGER pR0Log, PVMMR3CPULOGGER pShared, 394 uint32_t cbBuf, char *pchBuf, RTR3PTR pchBufR3 )394 uint32_t cbBuf, char *pchBuf, RTR3PTR pchBufR3, uint64_t nsProgramStart) 395 395 { 396 396 pR0Log->BufDesc.u32Magic = RTLOGBUFFERDESC_MAGIC; … … 412 412 int rc = RTLogCreateEx(&pR0Log->pLogger, fRelease ? "VBOX_RELEASE_LOG" : "VBOX_LOG", RTLOG_F_NO_LOCKING | RTLOGFLAGS_BUFFERED, 413 413 "all", RT_ELEMENTS(s_apszGroups), s_apszGroups, UINT32_MAX, 414 fRelease ? vmmR0LogRelFlush : vmmR0LogFlush, 1 /*cBufDescs*/, &pR0Log->BufDesc, 415 RTLOGDEST_DUMMY, 414 1 /*cBufDescs*/, &pR0Log->BufDesc, RTLOGDEST_DUMMY, 416 415 NULL /*pfnPhase*/, 0 /*cHistory*/, 0 /*cbHistoryFileMax*/, 0 /*cSecsHistoryTimeSlot*/, 417 416 NULL /*pErrInfo*/, NULL /*pszFilenameFmt*/); … … 423 422 pLogger->u64UserValue3 = (uintptr_t)pGVCpu; 424 423 425 RTLogSetR0ThreadNameF(pLogger, "EMT-%u-R0", pGVCpu->idCpu); 426 } 427 else 428 pR0Log->pLogger = NULL; 424 rc = RTLogSetFlushCallback(pLogger, fRelease ? vmmR0LogRelFlush : vmmR0LogFlush); 425 if (RT_SUCCESS(rc)) 426 { 427 RTLogSetR0ThreadNameF(pLogger, "EMT-%u-R0", pGVCpu->idCpu); 428 RTLogSetR0ProgramStart(pLogger, nsProgramStart); 429 return VINF_SUCCESS; 430 } 431 432 RTLogDestroy(pLogger); 433 } 434 pR0Log->pLogger = NULL; 429 435 return rc; 430 436 } … … 455 461 PVMMR0PERVCPULOGGER pR0Log = fRelease ? &pGVCpu->vmmr0.s.RelLogger : &pGVCpu->vmmr0.s.Logger; 456 462 PVMMR3CPULOGGER pShared = fRelease ? &pGVCpu->vmm.s.RelLogger : &pGVCpu->vmm.s.Logger; 457 rc = vmmR0InitLoggerOne(pGVCpu, fRelease, pR0Log, pShared, cbBuf, pchBuf + i * cbBuf, pchBufR3 + i * cbBuf); 463 rc = vmmR0InitLoggerOne(pGVCpu, fRelease, pR0Log, pShared, cbBuf, pchBuf + i * cbBuf, pchBufR3 + i * cbBuf, 464 pGVM->vmm.s.nsProgramStart); 458 465 if (RT_FAILURE(rc)) 459 466 { -
trunk/src/VBox/VMM/VMMR3/VMM.cpp
r90840 r90862 207 207 pVM->vmm.s.hEvtRendezvousRecursionPushCaller = NIL_RTSEMEVENT; 208 208 pVM->vmm.s.hEvtRendezvousRecursionPopCaller = NIL_RTSEMEVENT; 209 pVM->vmm.s.nsProgramStart = RTTimeProgramStartNanoTS(); 209 210 210 211 #if 0 /* pointless when timers doesn't run on EMT */ -
trunk/src/VBox/VMM/include/VMMInternal.h
r90836 r90862 285 285 /** Buffer for storing the custom message for a ring-0 assertion. */ 286 286 char szRing0AssertMsg2[256]; 287 288 /** Used when setting up ring-0 logger. */ 289 uint64_t nsProgramStart; 287 290 288 291 /** Number of VMMR0_DO_HM_RUN or VMMR0_DO_NEM_RUN calls. */
Note:
See TracChangeset
for help on using the changeset viewer.