<AWT Dev> [8u] RFR: 8196681: Java Access Bridge logging and debug flags dynamically controlled

Alex Kashchenko akashche at redhat.com
Mon Sep 9 16:29:56 UTC 2019


Please review the code change required to backport JDK-8196681 to 8u.

Bug: https://bugs.openjdk.java.net/browse/JDK-8196681

Original review thread: 

11u changeset: 

Patch does not apply cleanly, because std::chrono is used for 
timestamps. And this part of C++11 standard is not supported by VS2010 
toolchain that is used for 8u windows builds. The following change 
reimplements the same timestamps without std::chrono:

  auto getTimeStamp() -> long long {
-    using namespace std::chrono;
-    auto timeNow = 
-    return timeNow.count();
+    LARGE_INTEGER freqLarge;
+    ::QueryPerformanceFrequency(&freqLarge);
+    long long freq = freqLarge.QuadPart;
+    LARGE_INTEGER counterLarge;
+    ::QueryPerformanceCounter(&counterLarge);
+    long long counter = counterLarge.QuadPart;
+    long long milliDen = 1000;
+    long long whole = (counter / freq) * milliDen;
+    long long part = (counter % freq) * milliDen / freq;
+    return whole + part;

Backport also depends on JDK-8077707 and JDK-8132249 (both apply 
cleanly), "jdk8u-fix-request" label was added for them.

Backport requires CSR that was filed in JDK-8230699.



More information about the awt-dev mailing list