Changeset 40759 in vbox
- Timestamp:
- Apr 3, 2012 7:57:32 PM (13 years ago)
- Location:
- trunk
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/include/VBox/sup.h
r40756 r40759 1280 1280 1281 1281 struct VTGOBJHDR; 1282 struct VTGPROBELOC; 1282 1283 1283 1284 /** … … 1331 1332 uint32_t u32Version; 1332 1333 1333 DECLR0CALLBACKMEMBER(int, pfnTodo1, (PCSUPDRVTRACERREG pThis)); 1334 DECLR0CALLBACKMEMBER(int, pfnTodo2, (PCSUPDRVTRACERREG pThis)); 1335 DECLR0CALLBACKMEMBER(int, pfnTodo3, (PCSUPDRVTRACERREG pThis)); 1336 DECLR0CALLBACKMEMBER(int, pfnTodo4, (PCSUPDRVTRACERREG pThis)); 1337 DECLR0CALLBACKMEMBER(int, pfnTodo5, (PCSUPDRVTRACERREG pThis)); 1334 /** 1335 * Fire off a probe. 1336 * 1337 * @param pVtgProbeLoc The probe location record. 1338 * @param uArg0 The first raw probe argument. 1339 * @param uArg1 The second raw probe argument. 1340 * @param uArg2 The third raw probe argument. 1341 * @param uArg3 The fourth raw probe argument. 1342 * @param uArg4 The fifth raw probe argument. 1343 * 1344 * @remarks SUPR0VtgFireProbe will do a tail jump thru this member, so no extra 1345 * stack frames will be added. 1346 * @remarks This does not take a 'this' pointer argument because it doesn't map 1347 * well onto VTG or DTrace. 1348 * 1349 */ 1350 DECLR0CALLBACKMEMBER(void, pfnFireProbe, (struct VTGPROBELOC *pVtgProbeLoc, uintptr_t uArg0, uintptr_t uArg1, uintptr_t uArg2, 1351 uintptr_t uArg3, uintptr_t uArg4)); 1352 1353 /** 1354 * Opens up the tracer. 1355 * 1356 * @returns VBox status code. 1357 * @param pThis Pointer to the registration record. 1358 * @param pSession The session doing the opening. 1359 * @param uCookie A cookie (magic) unique to the tracer, so it can 1360 * fend off incompatible clients. 1361 * @param uArg Tracer specific argument. 1362 * @param puSessionData Pointer to the session data variable. This must be 1363 * set to a non-zero value on success. 1364 */ 1365 DECLR0CALLBACKMEMBER(int, pfnOpenTracer, (PCSUPDRVTRACERREG pThis, PSUPDRVSESSION pSession, uint32_t uCookie, uintptr_t uArg, 1366 uintptr_t *puSessionData)); 1367 1368 /** 1369 * I/O control style tracer communication method. 1370 * 1371 * 1372 * @returns VBox status code. 1373 * @param pThis Pointer to the registration record. 1374 * @param pSession The session. 1375 * @param uSessionData The session data value. 1376 * @param uCmd The tracer specific command. 1377 * @param uArg The tracer command specific argument. 1378 * @param piRetVal The tracer specific return value. 1379 */ 1380 DECLR0CALLBACKMEMBER(int, pfnIoctl, (PCSUPDRVTRACERREG pThis, PSUPDRVSESSION pSession, uintptr_t uSessionData, 1381 uintptr_t uCmd, uintptr_t uArg, int32_t *piRetVal)); 1382 1383 /** 1384 * Cleans up data the tracer has associated with a session. 1385 * 1386 * @param pThis Pointer to the registration record. 1387 * @param pSession The session handle. 1388 * @param uSessionData The data assoicated with the session. 1389 */ 1390 DECLR0CALLBACKMEMBER(void, pfnCloseTrace, (PCSUPDRVTRACERREG pThis, PSUPDRVSESSION pSession, uintptr_t uSessionData)); 1338 1391 1339 1392 /** -
trunk/src/VBox/HostDrivers/Support/Makefile.kmk
r40756 r40759 310 310 # 311 311 if1of ($(KBUILD_TARGET), darwin linux solaris) 312 # Leopard (x86) and Snow Leopard (x86/amd64) 313 SYSMODS += VBoxDrv 312 ifdef VBOX_WITH_VBOXDRV 313 SYSMODS += VBoxDrv 314 endif 314 315 VBoxDrv_TEMPLATE = VBOXR0DRV 315 316 VBoxDrv_NAME.freebsd = vboxdrv -
trunk/src/VBox/HostDrivers/Support/SUPDrv-tracer.cpp
r40756 r40759 875 875 876 876 /** 877 * Called when a session is being cleaned up. 878 * 879 * @param pDevExt The device extension structure. 880 * @param pSession The session that is being torn down. 881 */ 882 void VBOXCALL supdrvTracerCleanupSession(PSUPDRVDEVEXT pDevExt, PSUPDRVSESSION pSession) 883 { 884 /* 885 * If ring-0 session, make sure it has deregistered VTG objects and the tracer. 886 */ 887 if (pSession->R0Process == NIL_RTR0PROCESS) 888 { 889 SUPDRVTPPROVIDER *pNextProv; 890 SUPDRVTPPROVIDER *pProv; 891 892 RTSemFastMutexRequest(pDevExt->mtxTracer); 893 RTListForEachSafe(&pDevExt->TracerProviderList, pProv, pProvNext, SUPDRVTPPROVIDER, ListEntry) 894 { 895 if (pProv->pSession == pSession) 896 { 897 RTListNodeRemove(&pProv->ListEntry); 898 supdrvTracerDeregisterVtgObj(pDevExt, pProv); 899 } 900 } 901 RTSemFastMutexRelease(pDevExt->mtxTracer); 902 903 (void)SUPR0TracerDeregister(pSession); 904 } 905 906 /* 907 * Clean up instance data the trace may have associated with the session. 908 */ 909 if (pSession->uTracerData) 910 { 911 RTSemFastMutexRequest(pDevExt->mtxTracer); 912 if ( pSession->uTracerData 913 && pDevExt->pTracerOps) 914 pSession->pTracerOps->pfnCloseTrace(pSession->pTracerOps, pSession, pSession->uTracerData); 915 pSession->uTracerData = 0; 916 RTSemFastMutexRelease(pDevExt->mtxTracer); 917 } 918 } 919 920 921 /** 877 922 * Early module initialization hook. 878 923 * … … 891 936 /** @todo */ 892 937 pDevExt->TracerHlp.uEndVersion = SUPDRVTRACERHLP_VERSION; 893 894 938 RTListInit(&pDevExt->TracerProviderList); 895 939 RTListInit(&pDevExt->TracerProviderZombieList); 940 896 941 rc = supdrvTracerRegisterVtgObj(pDevExt, &g_VTGObjHeader, _1M, NULL /*pImage*/, NULL /*pSession*/, "vboxdrv"); 897 942 if (RT_SUCCESS(rc)) -
trunk/src/VBox/HostDrivers/Support/SUPDrvInternal.h
r40758 r40759 436 436 * This is NIL_RTR0PROCESS for kernel sessions and valid for user ones. */ 437 437 RTR0PROCESS R0Process; 438 #ifdef VBOX_WITH_SUPDRV_GENERIC_TRACER 439 /** Per session tracer specfic data. */ 440 uintptr_t uTracerData; 441 #endif 438 442 #ifndef SUPDRV_AGNOSTIC 439 443 # if defined(RT_OS_DARWIN)
Note:
See TracChangeset
for help on using the changeset viewer.