VirtualBox

Changeset 41343 in vbox


Ignore:
Timestamp:
May 16, 2012 8:07:33 PM (12 years ago)
Author:
vboxsync
Message:

Convert some ring-3 addresses to ring-0 to ease structure access (PVM, PVMCPU and PCPUMCTX).

Location:
trunk
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/Config.kmk

    r41340 r41343  
    26732673endef
    26742674
     2675
    26752676#
    26762677# VBoxTpG tool - Disabled, only generate the header.
     
    26832684endef
    26842685TOOL_VBoxTpG-Disabled_DTRACE_OBJ_NOT_NEEDED := $(KBUILD_OSES)
     2686
     2687
     2688#
     2689# dtrace+VBoxTpG tool for ring-3 to ring-0 pointer conversion.
     2690#
     2691TOOL_DTraceAndVBoxTpG = DTrace and the VirtualBox Tracepoint Generator working together on static ring-3 probes.
     2692TOOL_DTraceAndVBoxTpG_EXTENDS = StandardDTrace
     2693TOOL_DTraceAndVBoxTpG_DTRACE_DEPEND   = $(VBOX_VBOXTPG)
     2694TOOL_DTraceAndVBoxTpG_DTRACE_HDR_CMDS =
     2695define TOOL_DTraceAndVBoxTpG_DTRACE_HDR_CMDS
     2696        $(TOOL_StandardDTrace_DTRACE_HDR_CMDS)
     2697        $(QUIET)$(VBOX_VBOXTPG) --generate-wrapper-header --host-$(VBOX_HC_ARCH_BITS)-bit --ring-3-context \
     2698                $(filter-out -C, $(filter-out -h,$(flags))) \
     2699                -o "$(out).tmp" -s "$(source)"
     2700        $(APPEND) "$(out).tmp"
     2701        $(SED) -e 's/\(#define.*\)(arg0/\1_ORIGINAL(arg0/' --append "$(out).tmp" "$(out)"
     2702        $(MV) -f -- "$(out).tmp" "$(out)"
     2703endef
     2704TOOL_DTraceAndVBoxTpG_DTRACE_OBJ_CMDS = $(TOOL_StandardDTrace_DTRACE_OBJ_CMDS)
    26852705
    26862706
     
    32173237TEMPLATE_VBOXR3EXE_USES                = dtrace
    32183238if defined(VBOX_WITH_DTRACE_R3) && defined(VBOX_WITH_NATIVE_DTRACE)
    3219  TEMPLATE_VBOXR3EXE_DTRACETOOL         = StandardDTrace
     3239 TEMPLATE_VBOXR3EXE_DTRACETOOL         = DTraceAndVBoxTpG
    32203240 TEMPLATE_VBOXR3EXE_DTRACE_OBJ_FLAGS   = -C
    32213241 TEMPLATE_VBOXR3EXE_DTRACE_HDR_FLAGS   = -C
  • trunk/include/VBox/VBoxTpG.h

    r41338 r41343  
    413413# define VTG_CPUMCTX_TO_R0(a_pVCpu, a_pCtx)      (a_pCtx)
    414414#else
    415 # define VTG_VM_TO_R0(a_pVM)                     ((a_pVM)->pVMR0)
    416 # define VTG_VMCPU_TO_R0(a_pVCpu)                VM_R0_ADDR((a_pVCpu)->CTX_SUFF(pVM), a_pVCpu)
    417 # define VTG_CPUMCTX_TO_R0(a_pVCpu, a_pCtx)      VM_R0_ADDR((a_pVCpu)->CTX_SUFF(pVM), a_pCtx)
     415# define VTG_VM_TO_R0(a_pVM)                     ((a_pVM)   ? (a_pVM)->pVMR0                                : NIL_RTR0PTR)
     416# define VTG_VMCPU_TO_R0(a_pVCpu)                ((a_pVCpu) ? VM_R0_ADDR((a_pVCpu)->CTX_SUFF(pVM), a_pVCpu) : NIL_RTR0PTR)
     417# define VTG_CPUMCTX_TO_R0(a_pVCpu, a_pCtx)      ((a_pVCpu) ? VM_R0_ADDR((a_pVCpu)->CTX_SUFF(pVM), a_pCtx)  : NIL_RTR0PTR)
    418418#endif
    419419/** @} */
  • trunk/src/bldprogs/VBoxTpG.cpp

    r41342 r41343  
    11441144            generateProbeDefineName(szTmp, sizeof(szTmp), pProv->pszName, pProbe->pszMangledName);
    11451145            ScmStreamPrintf(pStrm,
    1146                             ");\n"
    11471146                            "# define %s("
    11481147                            , szTmp);
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