VirtualBox

Changeset 84737 in vbox for trunk/src/VBox/Devices/Graphics


Ignore:
Timestamp:
Jun 9, 2020 12:29:43 PM (5 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
138527
Message:

Devices/Graphics: optional release logging of performance metrics

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Devices/Graphics/DevVGA-SVGA.cpp

    r84722 r84737  
    47494749                        STAM_REL_COUNTER_INC(&pSVGAState->StatR3Cmd3dSurfaceScreen);
    47504750
     4751                        static uint64_t u64FrameStartNanoTS = 0;
     4752                        static uint64_t u64ElapsedPerSecNano = 0;
     4753                        static int cFrames = 0;
    47514754                        uint64_t u64NanoTS = 0;
    47524755                        if (LogRelIs3Enabled())
     
    47594762                        if (LogRelIs3Enabled())
    47604763                        {
     4764                            uint64_t u64ElapsedNano = RTTimeNanoTS() - u64NanoTS;
     4765                            u64ElapsedPerSecNano += u64ElapsedNano;
     4766
    47614767                            SVGASignedRect *pFirstRect = cRects ? (SVGASignedRect *)(pCmd + 1) : &pCmd->destRect;
    47624768                            LogRel3(("VMSVGA: SURFACE_TO_SCREEN: %d us %d rects %d,%d %dx%d\n",
    4763                                 (RTTimeNanoTS() - u64NanoTS) / 1000ULL, cRects,
     4769                                (u64ElapsedNano) / 1000ULL, cRects,
    47644770                                pFirstRect->left, pFirstRect->top,
    47654771                                pFirstRect->right - pFirstRect->left, pFirstRect->bottom - pFirstRect->top));
     4772
     4773                            ++cFrames;
     4774                            if (u64NanoTS - u64FrameStartNanoTS >= UINT64_C(1000000000))
     4775                            {
     4776                                LogRel3(("VMSVGA: SURFACE_TO_SCREEN: FPS %d, elapsed %llu us\n",
     4777                                         cFrames, u64ElapsedPerSecNano / 1000ULL));
     4778                                u64FrameStartNanoTS = u64NanoTS;
     4779                                cFrames = 0;
     4780                                u64ElapsedPerSecNano = 0;
     4781                            }
    47664782                        }
    47674783                        break;
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