[foreign-memaccess+abi] RFR: 8301262: Simplify the CaptureCallState support
    Jorn Vernee 
    jvernee at openjdk.org
       
    Fri Feb  3 17:51:04 UTC 2023
    
    
  
Simplify capture call state support based on Maurizio's suggestion.
We currently compute a layout to write the captured state into based on the values that the user wants to capture. However, we could simplify the API by using the same layout every time, that can hold every value that someone might want to capture. This is only 12 bytes, so the memory usage is not a big deal. The important part is to not read every thread local value every time, which works just as it does today.
The second issue in today's implementation, is that it is still possible to create a capture state linker option that captures `GetLastError` on Linux. But, this doesn't make any sense. In the new implementation the GetLastError and WSAGetLastError options are only available on Windows.
-------------
Commit messages:
 - doc tweaks
 - fix linux
 - Simplify captureCallState API
Changes: https://git.openjdk.org/panama-foreign/pull/778/files
 Webrev: https://webrevs.openjdk.org/?repo=panama-foreign&pr=778&range=00
  Issue: https://bugs.openjdk.org/browse/JDK-8301262
  Stats: 177 lines in 9 files changed: 80 ins; 73 del; 24 mod
  Patch: https://git.openjdk.org/panama-foreign/pull/778.diff
  Fetch: git fetch https://git.openjdk.org/panama-foreign pull/778/head:pull/778
PR: https://git.openjdk.org/panama-foreign/pull/778
    
    
More information about the panama-dev
mailing list