[Webkit-unassigned] [Bug 6145] New: Patch for better performance for JSC Linux support.

bugzilla-daemon at opendarwin.org bugzilla-daemon at opendarwin.org
Sun Dec 18 15:55:30 PST 2005


http://bugzilla.opendarwin.org/show_bug.cgi?id=6145

           Summary: Patch for better performance for JSC Linux support.
           Product: WebKit
           Version: 412+
          Platform: Other
        OS/Version: Linux
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: JavaScript
        AssignedTo: webkit-unassigned at opendarwin.org
        ReportedBy: maksim at kde.org


Hi.. For some odd reason, getting stack base under Linux (glibc 2.3.5, NPTL),  
is insanely slow. The following results in huge speed up on iBench, and other  
benchmarks (note: diff is with whitespace ignored):  
 #else  
-    void *stackBase = 0;  
+    static void*     stackBase = 0;  
+    static pthread_t stackThread;  
+    pthread_t curThread = pthread_self();  
+    if (stackBase == 0 || curThread != stackThread) {  
     pthread_attr_t sattr;  
     // FIXME: this function is non-portable; other POSIX systems may have  
different np alternatives  
-    pthread_getattr_np(pthread_self(), &sattr);  
+        pthread_getattr_np(curThread, &sattr);  
     // Should work but fails on Linux (?)  
     //  pthread_attr_getstack(&sattr, &stackBase, &stackSize);  
     pthread_attr_getstackaddr(&sattr, &stackBase);  
     assert(stackBase);  
+        stackThread = curThread;  
+    }  
 #endif

-- 
Configure bugmail: http://bugzilla.opendarwin.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.



More information about the webkit-unassigned mailing list