VirtualBox

Changeset 14056 in vbox for trunk/src/VBox/Frontends


Ignore:
Timestamp:
Nov 10, 2008 10:58:05 PM (16 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
39112
Message:

FE/Qt4: Removed some ancient VBOX_GUI_DEBUG stuff.

Location:
trunk/src/VBox/Frontends/VirtualBox4
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Frontends/VirtualBox4/Makefile.kmk

    r13806 r14056  
    150150
    151151VirtualBox4_DEFS           = VBOX_GUI_SEPARATE_VM_PROCESS
    152 VirtualBox4_DEFS.debug     = VBOX_GUI_DEBUG VBOX_CHECK_STATE # QT_FATAL_ASSERT
     152VirtualBox4_DEFS.debug     = VBOX_CHECK_STATE # QT_FATAL_ASSERT
    153153VirtualBox4_DEFS.darwin    = VBOX_GUI_USE_QUARTZ2D VBOX_GUI_USE_QIMAGE VBOX_WITHOUT_QHTTP
    154154VirtualBox4_DEFS.freebsd   = VBOX_GUI_USE_QIMAGE VBOX_GUI_USE_SDL
  • 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/////////////////////////////////////////////////////////////////////////////
  • trunk/src/VBox/Frontends/VirtualBox4/src/VBoxConsoleView.cpp

    r14044 r14056  
    813813    connect (QApplication::desktop(), SIGNAL (resized (int)),
    814814             this, SLOT (doResizeDesktop (int)));
    815 
    816 #if defined (VBOX_GUI_DEBUG) && defined (VBOX_GUI_FRAMEBUF_STAT)
    817     VMCPUTimer::calibrate (200);
    818 #endif
    819815
    820816#if defined (Q_WS_WIN)
  • trunk/src/VBox/Frontends/VirtualBox4/src/VBoxFrameBuffer.cpp

    r12449 r14056  
    350350#endif
    351351
    352     FRAMEBUF_DEBUG_START (xxx);
    353 
    354352    QPainter painter (mView->viewport());
    355353
     
    371369                            r.x() + mView->contentsX(), 0, 0, 0);
    372370    }
    373 
    374     FRAMEBUF_DEBUG_STOP (xxx, r.width(), r.height());
    375371}
    376372
  • trunk/src/VBox/Frontends/VirtualBox4/src/VBoxGlobal.cpp

    r13950 r14056  
    101101typedef long Q_LONG;                /* word up to 64 bit signed */
    102102typedef unsigned long Q_ULONG;      /* word up to 64 bit unsigned */
    103 #endif
    104 
    105 #if defined (VBOX_GUI_DEBUG)
    106 uint64_t VMCPUTimer::ticks_per_msec = (uint64_t) -1LL; // declared in VBoxDefs.h
    107 uint64_t VMCPUTimer::ticks()
    108 {
    109     return ASMReadTSC();
    110 }
    111103#endif
    112104
Note: See TracChangeset for help on using the changeset viewer.

© 2025 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette