Changeset 61634 in vbox
- Timestamp:
- Jun 9, 2016 6:23:17 PM (9 years ago)
- Location:
- trunk
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/include/VBox/vmm/dbgf.h
r61628 r61634 967 967 * Display a piece of info writing to the log if enabled. 968 968 * 969 * This is for execution on EMTs and will only show the items on the calling 970 * EMT. This is to avoid deadlocking against other CPUs if a rendezvous is 971 * initiated in parallel to this call. (Besides, nobody really wants or need 972 * info for the other EMTs when using this macro.) 973 * 974 * @param a_pVM The shared VM handle. 975 * @param a_pVCpu The cross context per CPU structure of the calling EMT. 976 * @param a_pszName The identifier of the info to display. 977 * @param a_pszArgs Arguments to the info handler. 978 */ 979 #ifdef LOG_ENABLED 980 # define DBGFR3_INFO_LOG(a_pVM, a_pVCpu, a_pszName, a_pszArgs) \ 981 do { \ 982 if (LogIsEnabled()) \ 983 DBGFR3InfoEx((a_pVM)->pUVM, (a_pVCpu)->idCpu, a_pszName, a_pszArgs, NULL); \ 984 } while (0) 985 #else 986 # define DBGFR3_INFO_LOG(a_pVM, a_pVCpu, a_pszName, a_pszArgs) do { } while (0) 987 #endif 988 989 /** @def DBGFR3_INFO_LOG_SAFE 990 * Display a piece of info (rendezvous safe) writing to the log if enabled. 991 * 969 992 * @param a_pVM The shared VM handle. 970 993 * @param a_pszName The identifier of the info to display. 971 994 * @param a_pszArgs Arguments to the info handler. 995 * 996 * @remarks Use DBGFR3_INFO_LOG where ever possible! 972 997 */ 973 998 #ifdef LOG_ENABLED 974 # define DBGFR3_INFO_LOG (a_pVM, a_pszName, a_pszArgs) \999 # define DBGFR3_INFO_LOG_SAFE(a_pVM, a_pszName, a_pszArgs) \ 975 1000 do { \ 976 1001 if (LogIsEnabled()) \ … … 978 1003 } while (0) 979 1004 #else 980 # define DBGFR3_INFO_LOG (a_pVM, a_pszName, a_pszArgs) do { } while (0)1005 # define DBGFR3_INFO_LOG_SAFE(a_pVM, a_pszName, a_pszArgs) do { } while (0) 981 1006 #endif 982 1007 -
trunk/src/VBox/VMM/VMMR3/CPUM.cpp
r61570 r61634 2565 2565 DBGFR3Info(pVM->pUVM, "cpuid", "verbose", DBGFR3InfoLogRelHlp()); 2566 2566 LogRel(("\n")); 2567 DBGFR3_INFO_LOG (pVM, "cpuid", "verbose"); /* macro */2567 DBGFR3_INFO_LOG_SAFE(pVM, "cpuid", "verbose"); /* macro */ 2568 2568 RTLogRelSetBuffering(fOldBuffered); 2569 2569 LogRel(("******************** End of CPUID dump **********************\n")); -
trunk/src/VBox/VMM/VMMR3/EMHM.cpp
r58998 r61634 185 185 if (pszPrefix) 186 186 { 187 DBGFR3_INFO_LOG(pVM, "cpumguest", pszPrefix);187 DBGFR3_INFO_LOG(pVM, pVCpu, "cpumguest", pszPrefix); 188 188 DBGFR3_DISAS_INSTR_CUR_LOG(pVCpu, pszPrefix); 189 189 } -
trunk/src/VBox/VMM/VMMR3/EMRaw.cpp
r60900 r61634 281 281 if (pszPrefix) 282 282 { 283 DBGFR3_INFO_LOG(pVM, "cpumguest", pszPrefix);283 DBGFR3_INFO_LOG(pVM, pVCpu, "cpumguest", pszPrefix); 284 284 DBGFR3_DISAS_INSTR_CUR_LOG(pVCpu, pszPrefix); 285 285 } … … 580 580 581 581 #ifdef LOG_ENABLED 582 DBGFR3_INFO_LOG(pVM, "cpumguest", "Guest trap");582 DBGFR3_INFO_LOG(pVM, pVCpu, "cpumguest", "Guest trap"); 583 583 DBGFR3_DISAS_INSTR_CUR_LOG(pVCpu, "Guest trap"); 584 584 … … 716 716 { 717 717 #ifdef LOG_ENABLED 718 DBGFR3_INFO_LOG(pVM, "cpumguest", "Trap in patch code");718 DBGFR3_INFO_LOG(pVM, pVCpu, "cpumguest", "Trap in patch code"); 719 719 DBGFR3_DISAS_INSTR_CUR_LOG(pVCpu, "Patch code"); 720 720 … … 870 870 { 871 871 #ifdef LOG_ENABLED 872 DBGFR3_INFO_LOG(pVM, "cpumguest", "PRIV");872 DBGFR3_INFO_LOG(pVM, pVCpu, "cpumguest", "PRIV"); 873 873 #endif 874 874 AssertMsgFailed(("FATAL ERROR: executing random instruction inside generated patch jump %08x\n", pCtx->eip)); … … 884 884 { 885 885 #ifdef LOG_ENABLED 886 DBGFR3_INFO_LOG(pVM, "cpumguest", "PRIV");886 DBGFR3_INFO_LOG(pVM, pVCpu, "cpumguest", "PRIV"); 887 887 #endif 888 888 DBGFR3_DISAS_INSTR_CUR_LOG(pVCpu, "Patched privileged instruction"); … … 895 895 if (!PATMIsPatchGCAddr(pVM, pCtx->eip)) 896 896 { 897 DBGFR3_INFO_LOG(pVM, "cpumguest", "PRIV");897 DBGFR3_INFO_LOG(pVM, pVCpu, "cpumguest", "PRIV"); 898 898 DBGFR3_DISAS_INSTR_CUR_LOG(pVCpu, "Privileged instr"); 899 899 } … … 1035 1035 if (PATMIsPatchGCAddr(pVM, pCtx->eip)) 1036 1036 { 1037 DBGFR3_INFO_LOG(pVM, "cpumguest", "PRIV");1037 DBGFR3_INFO_LOG(pVM, pVCpu, "cpumguest", "PRIV"); 1038 1038 DBGFR3_DISAS_INSTR_CUR_LOG(pVCpu, "Privileged instr"); 1039 1039 } -
trunk/src/VBox/VMM/VMMR3/PGM.cpp
r61570 r61634 2603 2603 2604 2604 #ifdef DEBUG 2605 DBGFR3_INFO_LOG (pVM, "mappings", NULL);2606 DBGFR3_INFO_LOG (pVM, "handlers", "all nostat");2605 DBGFR3_INFO_LOG_SAFE(pVM, "mappings", NULL); 2606 DBGFR3_INFO_LOG_SAFE(pVM, "handlers", "all nostat"); 2607 2607 #endif 2608 2608 -
trunk/src/VBox/VMM/VMMR3/TRPM.cpp
r60884 r61634 1505 1505 1506 1506 # ifdef LOG_ENABLED 1507 DBGFR3_INFO_LOG(pVM, "cpumguest", "TRPMInject");1507 DBGFR3_INFO_LOG(pVM, pVCpu, "cpumguest", "TRPMInject"); 1508 1508 DBGFR3_DISAS_INSTR_CUR_LOG(pVCpu, "TRPMInject"); 1509 1509 # endif -
trunk/src/recompiler/VBoxRecompiler.c
r60804 r61634 4081 4081 */ 4082 4082 if (fLog2) 4083 DBGFR3_INFO_LOG(pVM, "cpumguest", pszPrefix);4083 DBGFR3_INFO_LOG(pVM, env->pVCpu, "cpumguest", pszPrefix); 4084 4084 4085 4085 /*
Note:
See TracChangeset
for help on using the changeset viewer.