Title: [225735] trunk/Source/WTF
Revision
225735
Author
[email protected]
Date
2017-12-10 17:32:19 -0800 (Sun, 10 Dec 2017)

Log Message

[WTF] Reduce sizeof(Thread) by adjusting alignment
https://bugs.webkit.org/show_bug.cgi?id=180630

Reviewed by Saam Barati.

Reduce sizeof(Thread) slightly by adjusting alignment.

* wtf/Threading.h:

Modified Paths

Diff

Modified: trunk/Source/WTF/ChangeLog (225734 => 225735)


--- trunk/Source/WTF/ChangeLog	2017-12-11 01:10:32 UTC (rev 225734)
+++ trunk/Source/WTF/ChangeLog	2017-12-11 01:32:19 UTC (rev 225735)
@@ -1,5 +1,16 @@
 2017-12-10  Yusuke Suzuki  <[email protected]>
 
+        [WTF] Reduce sizeof(Thread) by adjusting alignment
+        https://bugs.webkit.org/show_bug.cgi?id=180630
+
+        Reviewed by Saam Barati.
+
+        Reduce sizeof(Thread) slightly by adjusting alignment.
+
+        * wtf/Threading.h:
+
+2017-12-10  Yusuke Suzuki  <[email protected]>
+
         Unreviewed, follow-up patch after r225726
         https://bugs.webkit.org/show_bug.cgi?id=180622
 

Modified: trunk/Source/WTF/wtf/Threading.h (225734 => 225735)


--- trunk/Source/WTF/wtf/Threading.h	2017-12-11 01:10:32 UTC (rev 225734)
+++ trunk/Source/WTF/wtf/Threading.h	2017-12-11 01:32:19 UTC (rev 225735)
@@ -187,8 +187,6 @@
         m_savedLastStackTop = lastStackTop;
     }
 
-    void* m_apiData { nullptr };
-
 #if OS(DARWIN)
     mach_port_t machThread() { return m_platformThread; }
 #endif
@@ -270,12 +268,13 @@
     // Thread from the threadMap, completing the cleanup.
     static void THREAD_SPECIFIC_CALL destructTLS(void* data);
 
-    // WordLock & Lock rely on ThreadSpecific. But Thread object can be destroyed even after ThreadSpecific things are destroyed.
-    std::mutex m_mutex;
     JoinableState m_joinableState { Joinable };
     bool m_isShuttingDown { false };
     bool m_didExit { false };
     bool m_isDestroyedOnce { false };
+
+    // WordLock & Lock rely on ThreadSpecific. But Thread object can be destroyed even after ThreadSpecific things are destroyed.
+    std::mutex m_mutex;
     StackBounds m_stack { StackBounds::emptyBounds() };
     Vector<std::weak_ptr<ThreadGroup>> m_threadGroups;
     PlatformThreadHandle m_handle;
@@ -296,6 +295,8 @@
 #endif
     void* m_savedStackPointerAtVMEntry { nullptr };
     void* m_savedLastStackTop;
+public:
+    void* m_apiData { nullptr };
 };
 
 inline Thread* Thread::currentMayBeNull()
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to