Cool VL Viewer forum

View unanswered posts | View active topics It is currently 2021-11-30 18:46:33



Reply to topic  [ 2 posts ] 
Reduce checks for hijacked last chance exception handler 
Author Message

Joined: 2011-10-07 10:39:20
Posts: 141
Reply with quote
The checkExceptionHandler() call isn't super cheap (around 0.5% CPU time on the rendering thread according to the VS profiler).

It should be good enough to only check periodically and not every single frame.

Code:
--- linden_orig/indra/newview/llappviewerwin32.cpp   Fri Jul  3 00:45:28 2020
+++ linden/indra/newview/llappviewerwin32.cpp   Wed Oct  7 23:32:28 2020
@@ -1482,11 +1482,17 @@
    return IsDebuggerPresent();
 }
 
 bool LLAppViewerWin32::restoreErrorTrap()
 {
-   return LLWinDebug::checkExceptionHandler();
+   static int call_count = 0;
+   call_count += 1;
+   if (call_count % 120 == 0) {
+      call_count = 0;
+      return LLWinDebug::checkExceptionHandler();
+   }
+   return true;
 }
 
 void LLAppViewerWin32::handleSyncCrashTrace()
 {
    // Free our reserved memory space before dumping the stack trace


2020-10-07 23:41:16
Profile

Joined: 2009-03-17 18:42:51
Posts: 4773
Reply with quote
Indeed... Checking every second or so will be enough. Implemented (with gFrameTimeSeconds) for next releases.


2020-10-08 12:00:15
Profile WWW
Display posts from previous:  Sort by  
Reply to topic   [ 2 posts ] 

Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB® Forum Software © phpBB Group
Designed by ST Software.