VirtualBox

Changeset 40405 in vbox for trunk/include/VBox


Ignore:
Timestamp:
Mar 8, 2012 6:27:45 PM (13 years ago)
Author:
vboxsync
Message:

VMM/PDM: Some simple tracepoint infastructure.

Location:
trunk/include/VBox
Files:
8 edited

Legend:

Unmodified
Added
Removed
  • trunk/include/VBox/err.h

    r40280 r40405  
    297297/** Internal processing error \#2 in the DBGF stack code. */
    298298#define VERR_DBGF_STACK_IPE_2               (-1218)
     299/** No trace buffer available, please change the VM config. */
     300#define VERR_DBGF_NO_TRACE_BUFFER           (-1219)
    299301/** @} */
    300302
  • trunk/include/VBox/vmm/dbgftrace.h

    r37413 r40405  
    44
    55/*
    6  * Copyright (C) 2006-2010 Oracle Corporation
     6 * Copyright (C) 2006-2012 Oracle Corporation
    77 *
    88 * This file is part of VirtualBox Open Source Edition (OSE), as
     
    2828
    2929#include <iprt/trace.h>
     30#include <VBox/types.h>
    3031
    3132RT_C_DECLS_BEGIN
     
    4546# define DBGFTRACE_DISABLED
    4647#endif
     48
     49VMMDECL(int) DBGFR3TraceConfig(PVM pVM, const char *pszConfig);
     50
    4751
    4852/** @name VMM Internal Trace Macros
  • trunk/include/VBox/vmm/pdmapi.h

    r37466 r40405  
    134134VMMR3DECL(int)  PDMR3VMMDevHeapFree(PVM pVM, RTR3PTR pv);
    135135VMMR3DECL(int)  PDMR3UnregisterVMMDevHeap(PVM pVM, RTGCPHYS GCPhys);
     136VMMR3_INT_DECL(int)     PDMR3TracingConfig(PVM pVM, const char *pszName, size_t cchName, bool fEnable, bool fApply);
     137VMMR3_INT_DECL(bool)    PDMR3TracingAreAll(PVM pVM, bool fEnabled);
     138VMMR3_INT_DECL(int)     PDMR3TracingQueryConfig(PVM pVM, char *pszConfig, size_t cbConfig);
    136139/** @} */
    137140
  • trunk/include/VBox/vmm/pdmdev.h

    r39136 r40405  
    39223922     * call PDMR3QueryDevice(). */
    39233923    PDMIBASE                    IBase;
     3924
     3925    /** Tracing indicator. */
     3926    uint32_t                    fTraceing;
     3927#if HC_ARCH_BITS == 64
    39243928    /** Align the internal data more naturally. */
    3925     RTR3PTR                     R3PtrPadding;
     3929    uint32_t                    u32Padding;
     3930#endif
    39263931
    39273932    /** Internal data. */
  • trunk/include/VBox/vmm/pdmdrv.h

    r38878 r40405  
    383383     * The driver constructor initializes this. */
    384384    PDMIBASE                    IBase;
     385
     386    /** Tracing indicator. */
     387    uint32_t                    fTraceing;
     388#if HC_ARCH_BITS == 64
    385389    /** Align the internal data more naturally. */
    386     RTR3PTR                     R3PtrPadding;
     390    uint32_t                    u32Padding;
     391#endif
    387392
    388393    /** Internal data. */
  • trunk/include/VBox/vmm/pdmusb.h

    r37859 r40405  
    729729     * The constructor sets this and the destructor frees it. */
    730730    R3PTRTYPE(char *)           pszName;
     731    /** Tracing indicator. */
     732    uint32_t                    fTraceing;
    731733    /** Padding to make achInstanceData aligned at 32 byte boundary. */
    732     uint32_t                    au32Padding[HC_ARCH_BITS == 32 ? 5 : 2];
     734    uint32_t                    au32Padding[HC_ARCH_BITS == 32 ? 4 : 1];
    733735    /** Device instance data. The size of this area is defined
    734736     * in the PDMUSBREG::cbInstanceData field. */
  • trunk/include/VBox/vmm/vm.h

    r40397 r40405  
    8484    /** Per CPU forced action.
    8585     * See the VMCPU_FF_* \#defines. Updated atomically. */
    86     uint32_t volatile       fLocalForcedActions;
     86    uint32_t volatile       fLocalForcedActions;                    /* 0 */
    8787    /** The CPU state. */
    88     VMCPUSTATE volatile     enmState;
     88    VMCPUSTATE volatile     enmState;                               /* 4 */
    8989
    9090    /** Pointer to the ring-3 UVMCPU structure. */
    91     PUVMCPU                 pUVCpu;
     91    PUVMCPU                 pUVCpu;                                 /* 8 */
    9292    /** Ring-3 Host Context VM Pointer. */
    93     PVMR3                   pVMR3;
     93    PVMR3                   pVMR3;                                  /* 16 / 12 */
    9494    /** Ring-0 Host Context VM Pointer. */
    95     PVMR0                   pVMR0;
    96     /** Flag indicating that tracing is enabled.  */
    97     bool                    fTracingEnabled;
    98     /** Alignment padding. */
    99     uint8_t                 abAlignment0[HC_ARCH_BITS == 32 ? 3 : 7];
     95    PVMR0                   pVMR0;                                  /* 24 / 16 */
    10096    /** Raw-mode Context VM Pointer. */
    101     PVMRC                   pVMRC;
     97    PVMRC                   pVMRC;                                  /* 32 / 20 */
    10298    /** The CPU ID.
    10399     * This is the index into the VM::aCpu array. */
    104     VMCPUID                 idCpu;
     100    VMCPUID                 idCpu;                                  /* 36 / 24 */
    105101    /** The native thread handle. */
    106     RTNATIVETHREAD          hNativeThread;
     102    RTNATIVETHREAD          hNativeThread;                          /* 40 / 28 */
    107103    /** The native R0 thread handle. (different from the R3 handle!) */
    108     RTNATIVETHREAD          hNativeThreadR0;
     104    RTNATIVETHREAD          hNativeThreadR0;                        /* 48 / 32 */
    109105    /** Which host CPU ID is this EMT running on.
    110106     * Only valid when in RC or HWACCMR0 with scheduling disabled. */
    111     RTCPUID volatile        idHostCpu;
    112     /** State data for use by ad hoc profiling. */
    113     uint32_t                uAdHoc;
    114     /** Profiling samples for use by ad hoc profiling. */
    115     STAMPROFILEADV          aStatAdHoc[8];
    116 
    117     /** Align the next bit on a 64-byte boundary and make sure it starts at the same
    118      *  offset in both 64-bit and 32-bit builds.
     107    RTCPUID volatile        idHostCpu;                              /* 56 / 36 */
     108
     109    /** Trace groups enable flags.  */
     110    uint32_t                fTraceGroups;                           /* 60 / 40 */
     111    /** Align the structures below bit on a 64-byte boundary and make sure it starts
     112     * at the same offset in both 64-bit and 32-bit builds.
    119113     *
    120114     * @remarks The alignments of the members that are larger than 48 bytes should be
     
    123117     *          following it (to grow into and align the struct size).
    124118     *   */
    125     uint8_t                 abAlignment1[HC_ARCH_BITS == 32 ? 16+64 : 56];
     119    uint8_t                 abAlignment1[HC_ARCH_BITS == 64 ? 60 : 16+64];
     120    /** State data for use by ad hoc profiling. */
     121    uint32_t                uAdHoc;
     122    /** Profiling samples for use by ad hoc profiling. */
     123    STAMPROFILEADV          aStatAdHoc[8];                          /* size: 40*8 = 320 */
    126124
    127125    /** CPUM part. */
  • trunk/include/VBox/vmm/vm.mac

    r40397 r40405  
    121121    .pVMR3                  RTR3PTR_RES 1
    122122    .pVMR0                  RTR0PTR_RES 1
    123     .fTracingEnabled        resb 1
    124 %if HC_ARCH_BITS == 32
    125     .abAlignment0           resb 3
    126 %else
    127     .abAlignment0           resb 7
    128 %endif
    129123    .pVMRC                  RTRCPTR_RES 1
    130124    .idCpu                  resd 1
     
    133127    .hNativeThreadR0        RTR0PTR_RES 1
    134128    .idHostCpu              resd 1
     129    .fTraceGroups           resd 1
     130%if HC_ARCH_BITS == 32
     131    .abAlignment1           resb 16+64
     132%else
     133    .abAlignment1           resb 60
     134%endif
    135135    .uAdHoc                 resd 1
    136136    .aStatAdHoc             resb STAMPROFILEADV_size * 8
    137137
    138 %if HC_ARCH_BITS == 32
    139     .abAlignment1           resd 16+1
    140 %endif
    141138    alignb 64
    142139
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