VirtualBox

Ignore:
Timestamp:
Nov 10, 2008 10:58:05 PM (16 years ago)
Author:
vboxsync
Message:

FE/Qt4: Removed some ancient VBOX_GUI_DEBUG stuff.

Location:
trunk/src/VBox/Frontends/VirtualBox4/include
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Frontends/VirtualBox4/include/VBoxDefs.h

    r14046 r14056  
    3333#include <iprt/alloc.h>
    3434
    35 #ifdef VBOX_GUI_DEBUG
     35#ifdef DEBUG
    3636
    3737#define AssertWrapperOk(w)      \
     
    4040    AssertMsg (w.isOk(), (#w ": " m " (RC=0x%08X)", w.lastRC()))
    4141
    42 #else // !VBOX_GUI_DEBUG
     42#else /* #ifdef DEBUG */
    4343
    4444#define AssertWrapperOk(w)          do {} while (0)
    4545#define AssertWrapperOkMsg(w, m)    do {} while (0)
    4646
    47 #endif // !VBOX_GUI_DEBUG
     47#endif /* #ifdef DEBUG */
    4848
    4949#ifndef SIZEOF_ARRAY
     
    6262  #endif
    6363#endif
    64 
    65 /////////////////////////////////////////////////////////////////////////////
    66 
    67 #if defined (VBOX_GUI_DEBUG)
    68 
    69 #include <QThread>
    70 #include <QDateTime>
    71 
    72 #include <VBox/types.h> // for uint64_t type
    73 
    74 /**
    75  * A class to measure intervals using rdtsc instruction.
    76  */
    77 class VMCPUTimer : public QThread // for crossplatform msleep()
    78 {
    79 public:
    80     /* don't inline this function to not depend on iprt/asm.h here */
    81     static uint64_t ticks();
    82     inline static uint64_t msecs( uint64_t tcks ) {
    83         return tcks / ticks_per_msec;
    84     }
    85     inline static uint64_t msecsSince( uint64_t tcks ) {
    86         tcks = ticks() - tcks;
    87         return tcks / ticks_per_msec;
    88     }
    89     inline static void calibrate( int ms )
    90     {
    91         QTime t;
    92         uint64_t tcks = ticks();
    93         t.start();
    94         msleep( ms );
    95         tcks = ticks() - tcks;
    96         int msecs = t.elapsed();
    97         ticks_per_msec = tcks / msecs;
    98     }
    99     inline static uint64_t ticksPerMsec() {
    100         return ticks_per_msec;
    101     }
    102 private:
    103     static uint64_t ticks_per_msec;
    104 };
    105 
    106 #endif // VBOX_GUI_DEBUG
    10764
    10865/** Null UUID constant to be used as a default value for reference parameters */
  • trunk/src/VBox/Frontends/VirtualBox4/include/VBoxFrameBuffer.h

    r12449 r14056  
    4646
    4747class VBoxConsoleView;
    48 
    49 //#define VBOX_GUI_FRAMEBUF_STAT
    50 
    51 #if defined (VBOX_GUI_DEBUG) && defined (VBOX_GUI_FRAMEBUF_STAT)
    52 #define FRAMEBUF_DEBUG_START(prefix) \
    53     uint64_t prefix##elapsed = VMCPUTimer::ticks();
    54 #define FRAMEBUF_DEBUG_STOP(prefix,w,h) { \
    55         prefix##elapsed = VMCPUTimer::ticks() - prefix##elapsed; \
    56         V_DEBUG(( "Last update: %04d x %04d px, %03.3f ms, %.0f ticks", \
    57             (w), (h), \
    58             (double) prefix##elapsed / (double) VMCPUTimer::ticksPerMsec(), \
    59             (double) prefix##elapsed \
    60         )); \
    61     }
    62 #else
    63 #define FRAMEBUF_DEBUG_START(prefix) {}
    64 #define FRAMEBUF_DEBUG_STOP(prefix,w,h) {}
    65 #endif
    6648
    6749/////////////////////////////////////////////////////////////////////////////
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