Re: RFR: JDK-8302455: VM.classloader_stats memory size values are wrong [v3]

2023-02-15 Thread Thomas Stuefe
On Wed, 15 Feb 2023 10:50:11 GMT, Thomas Stuefe wrote: >> VM.classloader_stats shows metaspace consumption in words, but should show >> bytes. >> >> Patch fixes that, and adjusts the associated jtreg test to catch regressions >> like this. >> >> I m

Re: RFR: JDK-8302455: VM.classloader_stats memory size values are wrong [v3]

2023-02-15 Thread Thomas Stuefe
ession shows up, it does. > > Tested the patch on x64 (fastdebug, release) and x86. > > Note: "calculate_jfr_stats" is misnamed, actually only ever used by this > dcmd, not by jfr. I will clear this up in a separate RFE. Thomas Stuefe has updated the pull request incrementally wi

Re: RFR: JDK-8302455: VM.classloader_stats memory size values are wrong [v2]

2023-02-15 Thread Thomas Stuefe
ession shows up, it does. > > Tested the patch on x64 (fastdebug, release) and x86. > > Note: "calculate_jfr_stats" is misnamed, actually only ever used by this > dcmd, not by jfr. I will clear this up in a separate RFE. Thomas Stuefe has updated the pull request incrementally wi

Re: RFR: JDK-8302455: VM.classloader_stats memory size values are wrong

2023-02-15 Thread Thomas Stuefe
On Wed, 15 Feb 2023 07:49:24 GMT, David Holmes wrote: > Given the reason this bug likely arose is the fact the parameters to > `calculate_jfr_stats` say they are "bytes" then fixing that is not a mere > cleanup IMO. Can we at least fix that in this PR? Hi David, I reformed the ill-named

Re: RFR: JDK-8302455: VM.classloader_stats memory size values are wrong

2023-02-14 Thread Thomas Stuefe
On Wed, 15 Feb 2023 05:49:14 GMT, David Holmes wrote: > That said, given: > > ``` > // This only exists for JFR and jcmd VM.classloader_stats. We may want to > // change this. Capacity as a stat is of questionable use since it may > // contain committed and uncommitted areas. For now we do

RFR: JDK-8302455: VM.classloader_stats memory size values are wrong

2023-02-14 Thread Thomas Stuefe
VM.classloader_stats shows metaspace consumption in words, but should show bytes. Patch fixes that, and adjusts the associated jtreg test to catch regressions like this. I manually tested the test with the unpatched hotspot to see if the regression shows up, it does. Tested the patch on x64

Re: RFR: 8302337: JDK crashes if lib/modules contains non-zero byte containing ATTRIBUTE_END

2023-02-13 Thread Thomas Stuefe
On Mon, 13 Feb 2023 16:57:17 GMT, Severin Gehwolf wrote: > The `jimage` location attributes are terminated with `ATTRIBUTE_END`-kinds. > However, > the byte containing `ATTRIBUTE_END` (most significant 5 bits, represent > `kind`), might > be non-zero in the lower 3 bits (values up to `0x07`

Re: RFR: 8302124: HotSpot Style Guide should permit noreturn attribute

2023-02-09 Thread Thomas Stuefe
On Fri, 10 Feb 2023 05:26:38 GMT, Kim Barrett wrote: > Please review this change to permit the use of noreturn attributes in HotSpot > code. > > http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2008/n2761.pdf > https://en.cppreference.com/w/cpp/language/attributes/noreturn > > This will

Re: RFR: 8300139 : [AIX] Use pthreads to avoid JNI_createVM call from primordial thread [v4]

2023-02-09 Thread Thomas Stuefe
On Thu, 9 Feb 2023 13:46:05 GMT, Varada M wrote: >> 1. test/jdk/jni/nullCaller/NullCallerTest.java >> 2. test/jdk/java/lang/reflect/exeCallerAccessTest/CallerAccessTest.java >> 3. test/hotspot/jtreg/runtime/jni/CalleeSavedRegisters/FPRegs.java >> >> The above tests were blocked on AIX

Re: RFR: 8300139 : [AIX] Use pthreads to avoid JNI_createVM call from primordial thread [v3]

2023-02-09 Thread Thomas Stuefe
On Thu, 9 Feb 2023 11:17:54 GMT, Varada M wrote: >> 1. test/jdk/jni/nullCaller/NullCallerTest.java >> 2. test/jdk/java/lang/reflect/exeCallerAccessTest/CallerAccessTest.java >> 3. test/hotspot/jtreg/runtime/jni/CalleeSavedRegisters/FPRegs.java >> >> The above tests were blocked on AIX

Re: RFR: 8300139 : [AIX] Use pthreads to avoid JNI_createVM call from primordial thread [v3]

2023-02-09 Thread Thomas Stuefe
On Thu, 9 Feb 2023 11:28:47 GMT, Thomas Stuefe wrote: >> Varada M has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Fixes > > test/jdk/java/lang/reflect/exeCallerAccessTest/exeCallerAccessTest.c line 48: &g

Re: RFR: JDK-8298445: Add LeakSanitizer support in HotSpot [v6]

2023-02-08 Thread Thomas Stuefe
On Wed, 8 Feb 2023 15:39:17 GMT, Justin King wrote: > > I read through your explanation, and through the [design > > docs](https://github.com/google/sanitizers/wiki/AddressSanitizerLeakSanitizerDesignDocument), > > but my question remains unanswered. See below. > > > > Metaspace objects hold

Re: RFR: 8300139 : [AIX] Use pthreads to avoid JNI_createVM call from primordial thread [v2]

2023-02-08 Thread Thomas Stuefe
On Wed, 8 Feb 2023 11:33:07 GMT, Varada M wrote: > I hate to see the code duplication, but we don't have a sharing mechanism for > the native parts of tests so that can't be helped. It may be interesting to invest some time to find out if the "don't start on primordial thread" rule still

Re: RFR: JDK-8298445: Add LeakSanitizer support in HotSpot [v6]

2023-02-07 Thread Thomas Stuefe
On Tue, 7 Feb 2023 15:40:34 GMT, Justin King wrote: >> Adds initial LSan (LeakSanitizer) support to Hotspot. This setup has been >> used to identify multiple leaks so far. It can run most of the test suite >> except those that also fail with ASan, which is being looked at separately. >> It is

Re: RFR: JDK-8298445: Add LeakSanitizer support in HotSpot [v6]

2023-02-07 Thread Thomas Stuefe
On Wed, 8 Feb 2023 03:11:32 GMT, Justin King wrote: > > The bot can only check the required number of Reviewers (strictly 1 per > > OpenJDK rules but changeable as here via `/reviewers` command) but it > > doesn't know about the informal rules such as having reviewers from each > > affected

Re: RFR: JDK-8301983: Refactor MEMFLAGS and AllocFailStrategy [v3]

2023-02-07 Thread Thomas Stuefe
On Tue, 7 Feb 2023 14:43:01 GMT, Coleen Phillimore wrote: >> Justin King has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Fix refactor mistake >> >> Signed-off-by: Justin King > > I think also having a PR with a bullet list is a

Re: RFR: JDK-8298445: Add LeakSanitizer support in HotSpot [v2]

2023-02-02 Thread Thomas Stuefe
On Thu, 2 Feb 2023 06:34:56 GMT, Thomas Stuefe wrote: >> Justin King has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Support CDS >> >> Signed-off-by: Justin King > > Think

Re: RFR: JDK-8298445: Add LeakSanitizer support in HotSpot [v2]

2023-02-01 Thread Thomas Stuefe
On Wed, 1 Feb 2023 15:26:27 GMT, Justin King wrote: >> Adds initial LSan (LeakSanitizer) support to Hotspot. This setup has been >> used to identify multiple leaks so far. It can run most of the test suite >> except those that rely on testing compressed oops or compressed class >> pointers.

Re: RFR: JDK-8298445: Add LeakSanitizer support in HotSpot [v2]

2023-02-01 Thread Thomas Stuefe
On Wed, 1 Feb 2023 15:26:27 GMT, Justin King wrote: >> Adds initial LSan (LeakSanitizer) support to Hotspot. This setup has been >> used to identify multiple leaks so far. It can run most of the test suite >> except those that rely on testing compressed oops or compressed class >> pointers.

Re: RFR: JDK-8301070: Replace NULL with nullptr in share/memory/

2023-01-26 Thread Thomas Stuefe
On Wed, 25 Jan 2023 11:45:47 GMT, Johan Sjölen wrote: > Do the conversion in the share/memory/ sub-directory and all of its files. Metaspace changes are good. src/hotspot/share/memory/metaspace/blockTree.hpp line 228: > 226: DEBUG_ONLY(check_node(insertion_point);) > 227: if

Re: RFR: 8299858: [Metrics] Swap memory limit reported incorrectly when too large [v3]

2023-01-25 Thread Thomas Stuefe
On Wed, 25 Jan 2023 13:22:45 GMT, Severin Gehwolf wrote: >> src/java.base/linux/native/libjava/CgroupMetrics.c line 45: >> >>> 43: jlong pages = sysconf(_SC_PHYS_PAGES); >>> 44: jlong page_size = sysconf(_SC_PAGESIZE); >>> 45: return pages * page_size; >> >> Preexisting, and

Re: RFR: 8299858: [Metrics] Swap memory limit reported incorrectly when too large [v4]

2023-01-25 Thread Thomas Stuefe
On Wed, 25 Jan 2023 13:45:28 GMT, Severin Gehwolf wrote: >> Please review this fix to >> [JDK-8292541](https://bugs.openjdk.org/browse/JDK-8292541) which adds the >> same handling for swap values exceeding what's possible in the non-container >> case. I.e. treats it as unlimited and fixes the

Re: RFR: 8299858: [Metrics] Swap memory limit reported incorrectly when too large [v3]

2023-01-25 Thread Thomas Stuefe
On Wed, 25 Jan 2023 13:22:45 GMT, Severin Gehwolf wrote: >> src/java.base/linux/native/libjava/CgroupMetrics.c line 45: >> >>> 43: jlong pages = sysconf(_SC_PHYS_PAGES); >>> 44: jlong page_size = sysconf(_SC_PAGESIZE); >>> 45: return pages * page_size; >> >> Preexisting, and

Re: RFR: 8299858: [Metrics] Swap memory limit reported incorrectly when too large [v4]

2023-01-25 Thread Thomas Stuefe
On Wed, 25 Jan 2023 13:45:28 GMT, Severin Gehwolf wrote: >> Please review this fix to >> [JDK-8292541](https://bugs.openjdk.org/browse/JDK-8292541) which adds the >> same handling for swap values exceeding what's possible in the non-container >> case. I.e. treats it as unlimited and fixes the

Re: RFR: 8299858: [Metrics] Swap memory limit reported incorrectly when too large [v3]

2023-01-25 Thread Thomas Stuefe
On Wed, 25 Jan 2023 11:24:55 GMT, Severin Gehwolf wrote: >> Please review this fix to >> [JDK-8292541](https://bugs.openjdk.org/browse/JDK-8292541) which adds the >> same handling for swap values exceeding what's possible in the non-container >> case. I.e. treats it as unlimited and fixes the

Re: RFR: 8299915: Remove ArrayAllocatorMallocLimit and associated code [v4]

2023-01-12 Thread Thomas Stuefe
On Wed, 11 Jan 2023 14:49:59 GMT, Thomas Stuefe wrote: >> Justin King has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Initialize memory to zero in zGranuleMap >> >> Signed-off-by: Justin King

Re: RFR: JDK-8298908: Instrument Metaspace for ASan [v12]

2023-01-11 Thread Thomas Stuefe
On Tue, 10 Jan 2023 23:17:06 GMT, Justin King wrote: >> This change instruments Metaspace for ASan. Metaspace allocates memory using >> `mmap`/`munmap` which ASan is not aware of. Fortunately ASan supports >> applications [manually poisoning/unpoisoning >>

Re: RFR: JDK-8298908: Instrument Metaspace for ASan [v12]

2023-01-11 Thread Thomas Stuefe
On Thu, 12 Jan 2023 05:44:55 GMT, Ioi Lam wrote: >> Justin King has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Update sanitizers/address.h based on review >> >> Signed-off-by: Justin King > >

Re: RFR: 8299915: Remove ArrayAllocatorMallocLimit and associated code [v4]

2023-01-11 Thread Thomas Stuefe
On Tue, 10 Jan 2023 22:50:11 GMT, Justin King wrote: >> Remove abstraction that is a holdover from Solaris. Direct usages of >> `MmapArrayAllocator` have been switched to normal `malloc`. The >> justification is that none of the code paths are called from signal >> handlers, so using `mmap`

Re: RFR: JDK-8298908: Instrument Metaspace for ASan [v2]

2023-01-10 Thread Thomas Stuefe
On Tue, 10 Jan 2023 06:57:01 GMT, David Holmes wrote: > > Forcing 2 reviewers to ensure @dholmes-ora can chime in before moving > > forward. > > Well I won't be able to Review as not familiar enough with the code, so > you'll need a second reviewer anyway. I don't hate this to the point of >

Re: RFR: JDK-8298908: Instrument Metaspace for ASan [v7]

2023-01-09 Thread Thomas Stuefe
On Mon, 9 Jan 2023 15:57:53 GMT, Justin King wrote: >> This change instruments Metaspace for ASan. Metaspace allocates memory using >> `mmap`/`munmap` which ASan is not aware of. Fortunately ASan supports >> applications [manually poisoning/unpoisoning >>

Re: RFR: JDK-8298908: Instrument Metaspace for ASan [v6]

2023-01-09 Thread Thomas Stuefe
On Thu, 5 Jan 2023 16:29:13 GMT, Justin King wrote: >> This change instruments Metaspace for ASan. Metaspace allocates memory using >> `mmap`/`munmap` which ASan is not aware of. Fortunately ASan supports >> applications [manually poisoning/unpoisoning >>

Re: RFR: JDK-8298908: Instrument Metaspace for ASan [v2]

2023-01-09 Thread Thomas Stuefe
On Thu, 5 Jan 2023 02:53:54 GMT, David Holmes wrote: >> This helps with maintenance. All builds will still compile the `addr` and >> `size` statements, ensuring they are valid, but will strip them when ASan is >> not enabled. In the event that refactoring occurs and one of the statements >>

Re: RFR: JDK-8298908: Instrument Metaspace for ASan [v3]

2023-01-04 Thread Thomas Stuefe
On Wed, 4 Jan 2023 18:41:05 GMT, Justin King wrote: > > Does Asan assume 8-byte-alignment? I'm hesitant to set this alignment in > > stone since Metaspace could be allocated, at least now, with smaller > > alignments. We don't do this now, but I'd like to keep the option open. But > > see my

Re: RFR: JDK-8298908: Instrument Metaspace for ASan [v3]

2023-01-04 Thread Thomas Stuefe
On Wed, 4 Jan 2023 13:55:15 GMT, Justin King wrote: >> This change instruments Metaspace for ASan. Metaspace allocates memory using >> `mmap`/`munmap` which ASan is not aware of. Fortunately ASan supports >> applications [manually poisoning/unpoisoning >>

Re: RFR: JDK-8296360: Track native memory used by zlib via NMT

2022-12-11 Thread Thomas Stuefe
On Fri, 4 Nov 2022 14:35:00 GMT, Thomas Stuefe wrote: > This patch adds NMT tracking to the zlib. > > *Please note: we currently discuss whether NMT can be expanded across the JDK > in this ML discussion [1]. This PR depends on the outcome of that discussion > and won't

Re: RFR: 8296812: sprintf is deprecated in Xcode 14 [v18]

2022-12-08 Thread Thomas Stuefe
On Wed, 7 Dec 2022 21:25:11 GMT, Xue-Lei Andrew Fan wrote: >> Hi, >> >> May I have this update reviewed? >> >> The sprintf is deprecated in Xcode 14 because of security concerns, and the >> use of it causing building failure. The build could pass if warnings are >> disabled for codes that

Re: RFR: JDK-8298170 : Introduce a macro for exception check, free and return

2022-12-07 Thread Thomas Stuefe
On Wed, 7 Dec 2022 16:27:43 GMT, Roger Riggs wrote: > > Good idea, though perhaps the return (and value if any) could be explicit in > the macro invocation, instead of implicit (plus arg). A single macro would > suffice, instead of multiples. > > Usage Example: > > ``` >

Re: RFR: JDK-8298170 : Introduce a macro for exception check, free and return

2022-12-07 Thread Thomas Stuefe
On Wed, 7 Dec 2022 16:27:43 GMT, Roger Riggs wrote: > > Good idea, though perhaps the return (and value if any) could be explicit in > the macro invocation, instead of implicit (plus arg). A single macro would > suffice, instead of multiples. > > Usage Example: > > ``` >

Re: RFR: JDK-8298170 : Introduce a macro for exception check, free and return

2022-12-07 Thread Thomas Stuefe
On Wed, 7 Dec 2022 16:27:43 GMT, Roger Riggs wrote: > > Good idea, though perhaps the return (and value if any) could be explicit in > the macro invocation, instead of implicit (plus arg). A single macro would > suffice, instead of multiples. > > Usage Example: > > ``` >

Re: RFR: 8296812: sprintf is deprecated in Xcode 14 [v17]

2022-12-07 Thread Thomas Stuefe
On Tue, 29 Nov 2022 07:57:36 GMT, Xue-Lei Andrew Fan wrote: >> Hi, >> >> May I have this update reviewed? >> >> The sprintf is deprecated in Xcode 14 because of security concerns, and the >> use of it causing building failure. The build could pass if warnings are >> disabled for codes that

Re: RFR: JDK-8298035: Provide better descriptions for JIT compiler JFR events [v3]

2022-12-06 Thread Thomas Stuefe
On Tue, 6 Dec 2022 14:51:29 GMT, Matthias Baesken wrote: >> Most Compiler related JFR events lack descriptions, see >> https://sap.github.io/SapMachine/jfrevents/20.html#jvm-compiler >> >> We should add some helpful description texts for these JFR events. > > Matthias Baesken has updated the

RFR: JDK-8296360: Track native memory used by zlib via NMT

2022-12-05 Thread Thomas Stuefe
This patch adds NMT tracking to the zlib. *Please note: we currently discuss whether NMT can be expanded across the JDK in this ML discussion [1]. This PR depends on the outcome of that discussion and won't proceed unless greenlighted. But since [1] is stalled, I post the PR for RFR to get

RFR: JDK-8296360: Track native memory used by zlib via NMT

2022-12-05 Thread Thomas Stuefe
This patch adds NMT tracking to the zlib. *Please note: we currently discuss whether NMT can be expanded across the JDK in this ML discussion [1]. This PR depends on the outcome of that discussion and won't proceed unless greenlighted. But since [1] is stalled, I post the PR for RFR to get

Re: RFR: 8296812: sprintf is deprecated in Xcode 14 [v12]

2022-11-27 Thread Thomas Stuefe
On Tue, 22 Nov 2022 08:02:51 GMT, Kim Barrett wrote: > Given all the near-duplicated checking of os::snprintf results, I think there > is a place for a helper function to package this up. Maybe something like > > ``` > // in class os > // Performs snprintf and asserts the result is

Re: RFR: JDK-8297523 : Various GetPrimitiveArrayCritical miss result - NULL check

2022-11-25 Thread Thomas Stuefe
On Fri, 25 Nov 2022 09:15:08 GMT, Matthias Baesken wrote: > There are still a few places where GetPrimitiveArrayCritical calls miss the > result check. This should be adjusted. > A similar case was recently adjusted here : > https://bugs.openjdk.org/browse/JDK-8297480 Hi Matthias, But all

Re: RFR: 8296886: Fix various include sort order issues [v2]

2022-11-22 Thread Thomas Stuefe
On Wed, 16 Nov 2022 16:17:48 GMT, Stefan Karlsson wrote: >> The sorted blocks of includes have deteriorated to the point that I felt >> compelled to clean up some of the issues. >> >> *EDIT*: The below discussion has been deferred out of this PR. Now this only >> deals with fixing the

Re: RFR: 8296886: Fix various include sort order issues [v2]

2022-11-22 Thread Thomas Stuefe
On Wed, 16 Nov 2022 16:17:48 GMT, Stefan Karlsson wrote: >> The sorted blocks of includes have deteriorated to the point that I felt >> compelled to clean up some of the issues. >> >> *EDIT*: The below discussion has been deferred out of this PR. Now this only >> deals with fixing the

Integrated: JDK-8296796: Provide clean, platform-agnostic interface to C-heap trimming

2022-11-19 Thread Thomas Stuefe
On Thu, 10 Nov 2022 13:23:34 GMT, Thomas Stuefe wrote: > This is a breakout from > [JDK-8293114](https://bugs.openjdk.org/browse/JDK-8293114), which is starved > for reviews. So I attempt to break up that fix into smaller units which are > hopefully easier to review separately.

Re: RFR: JDK-8296796: Provide clean, platform-agnostic interface to C-heap trimming [v3]

2022-11-18 Thread Thomas Stuefe
On Sat, 19 Nov 2022 06:48:24 GMT, Thomas Stuefe wrote: >> This is a breakout from >> [JDK-8293114](https://bugs.openjdk.org/browse/JDK-8293114), which is starved >> for reviews. So I attempt to break up that fix into smaller units which are >> hopefully easier to revi

Re: RFR: JDK-8296796: Provide clean, platform-agnostic interface to C-heap trimming [v3]

2022-11-18 Thread Thomas Stuefe
ce > [JDK-8268893](https://bugs.openjdk.org/browse/JDK-8268893). This patch > reshapes this code, cleaning it up in an OS-agnostic way. That will allow us > to add implementions for other platforms (I have this on my list for AIX at > least) and make review of 8293114 easier. Thom

Re: RFR: 8293422: DWARF emitted by Clang cannot be parsed [v6]

2022-11-18 Thread Thomas Stuefe
On Fri, 18 Nov 2022 16:06:38 GMT, Christian Hagedorn wrote: >> The DWARF debugging symbols emitted by Clang is different from what GCC is >> emitting. While GCC produces a complete `.debug_aranges` section (which is >> required in the DWARF parser), Clang does not. As a result, the DWARF

Re: RFR: JDK-8297147: UnexpectedSourceImageSize test times out on slow machines when fastdebug is used

2022-11-18 Thread Thomas Stuefe
On Fri, 18 Nov 2022 13:38:47 GMT, Matthias Baesken wrote: > The image related test UnexpectedSourceImageSize test introduced with > https://bugs.openjdk.org/browse/JDK-8264666 > sometimes times out on slow machines when fastdebug is used. This happens > especially in 11 and 17; in 20 it seems

Re: RFR: JDK-8296796: Provide clean, platform-agnostic interface to C-heap trimming [v2]

2022-11-18 Thread Thomas Stuefe
On Fri, 18 Nov 2022 12:54:34 GMT, Roman Kennke wrote: > Looks good to me. Thank you! > I kinda like the OS interface. If the proliferation of lots of unimplemented > methods in os/* is a concern, we could provide default impls in shared if > !**GLIBC** as a middle-ground. WDYT? I fear this

Re: RFR: 8296812: sprintf is deprecated in Xcode 14 [v9]

2022-11-17 Thread Thomas Stuefe
On Fri, 18 Nov 2022 06:42:24 GMT, Xue-Lei Andrew Fan wrote: >> Hi, >> >> May I have this update reviewed? >> >> The sprintf is deprecated in Xcode 14 because of security concerns, and the >> use of it causing building failure. The build could pass if warnings are >> disabled for codes that

Re: RFR: JDK-8296796: Provide clean, platform-agnostic interface to C-heap trimming [v2]

2022-11-17 Thread Thomas Stuefe
On Fri, 18 Nov 2022 02:23:54 GMT, David Holmes wrote: > Okay. I have some reservations about this style of approach but the > precedents are there. I'd argue that for single-use situations like this and > os::map_stack_shadow_pages that a XXX_ONLY(foo();) in the shared code would > be

Re: RFR: JDK-8296796: Provide clean, platform-agnostic interface to C-heap trimming [v2]

2022-11-17 Thread Thomas Stuefe
On Thu, 17 Nov 2022 02:17:09 GMT, David Holmes wrote: > I don't disagree that C-heap trimming is useful even if only Linux does it. > My objection is to defining a platform-agnostic API when only Linux does it. I see. It will allow us to use these APIs in shared code though, without having to

Re: RFR: 8296812: sprintf is deprecated in Xcode 14

2022-11-16 Thread Thomas Stuefe
On Sun, 13 Nov 2022 22:55:52 GMT, Xue-Lei Andrew Fan wrote: >> Please don't add uses of `jio_snprintf` or `::snprintf` to hotspot. Use >> `os::snprintf`. >> >> Regarding `jio_snprintf`, see https://bugs.openjdk.org/browse/JDK-8198918. >> Regarding `os::snprintf` and `os::vsnprintf`, see >>

Re: RFR: 8293422: DWARF emitted by Clang cannot be parsed [v4]

2022-11-16 Thread Thomas Stuefe
On Wed, 16 Nov 2022 15:50:31 GMT, Christian Hagedorn wrote: >> src/hotspot/share/utilities/elfFile.cpp line 1651: >> >>> 1649: int bytes_written = jio_snprintf(dst, count, "%s", src); >>> 1650: // Add null terminator. >>> 1651: dst[count - 1] = '\0'; >> >> Does it make sense to return a

Re: RFR: 8296812: sprintf is deprecated in Xcode 14 [v7]

2022-11-16 Thread Thomas Stuefe
On Wed, 16 Nov 2022 07:03:12 GMT, Xue-Lei Andrew Fan wrote: >> Hi, >> >> May I have this update reviewed? >> >> The sprintf is deprecated in Xcode 14 because of security concerns, and the >> use of it causing building failure. The build could pass if warnings are >> disabled for codes that

Re: RFR: 8293422: DWARF emitted by Clang cannot be parsed [v4]

2022-11-16 Thread Thomas Stuefe
On Tue, 11 Oct 2022 08:18:08 GMT, Christian Hagedorn wrote: >> The DWARF debugging symbols emitted by Clang is different from what GCC is >> emitting. While GCC produces a complete `.debug_aranges` section (which is >> required in the DWARF parser), Clang does not. As a result, the DWARF

Re: RFR: 8296812: sprintf is deprecated in Xcode 14 [v7]

2022-11-16 Thread Thomas Stuefe
On Wed, 16 Nov 2022 07:03:12 GMT, Xue-Lei Andrew Fan wrote: >> Hi, >> >> May I have this update reviewed? >> >> The sprintf is deprecated in Xcode 14 because of security concerns, and the >> use of it causing building failure. The build could pass if warnings are >> disabled for codes that

Re: RFR: 8296812: sprintf is deprecated in Xcode 14 [v6]

2022-11-16 Thread Thomas Stuefe
On Wed, 16 Nov 2022 05:45:34 GMT, Xue-Lei Andrew Fan wrote: >> A result of -1 only occurs for an encoding error. An encoding error is only >> possible with multi-byte / wide characters. (See the definition of "encoding >> error" in C99 7.19.3/14.) We don't use those, so there won't be any

Re: RFR: 8293422: DWARF emitted by Clang cannot be parsed [v4]

2022-11-16 Thread Thomas Stuefe
On Wed, 16 Nov 2022 08:46:15 GMT, Christian Hagedorn wrote: > Yes, I think it would be good to get a second review of the DWARF parser > changes. Maybe @tstuefe? I'm a bit swamped, but try to take a look later today. - PR: https://git.openjdk.org/jdk/pull/10287

Re: RFR: 8296812: sprintf is deprecated in Xcode 14 [v6]

2022-11-15 Thread Thomas Stuefe
On Tue, 15 Nov 2022 07:13:49 GMT, Kim Barrett wrote: >> Xue-Lei Andrew Fan has updated the pull request incrementally with one >> additional commit since the last revision: >> >> delete swp file > > src/hotspot/os/bsd/attachListener_bsd.cpp line 294: > >> 292: (atoi(buf) !=

Re: RFR: 8296812: sprintf is deprecated in Xcode 14 [v6]

2022-11-15 Thread Thomas Stuefe
On Mon, 14 Nov 2022 19:44:17 GMT, Xue-Lei Andrew Fan wrote: >> Hi, >> >> May I have this update reviewed? >> >> The sprintf is deprecated in Xcode 14 because of security concerns, and the >> use of it causing building failure. The build could pass if warnings are >> disabled for codes that

Re: RFR: 8296812: sprintf is deprecated in Xcode 14 [v4]

2022-11-14 Thread Thomas Stuefe
On Mon, 14 Nov 2022 05:32:20 GMT, Xue-Lei Andrew Fan wrote: >> Hi, >> >> May I have this update reviewed? >> >> The sprintf is deprecated in Xcode 14 because of security concerns, and the >> use of it causing building failure. The build could pass if warnings are >> disabled for codes that

Re: RFR: 8295146: Clean up native code with newer C/C++ language features [v2]

2022-11-14 Thread Thomas Stuefe
On Mon, 14 Nov 2022 04:14:24 GMT, Julian Waters wrote: >> After [JDK-8292008](https://bugs.openjdk.org/browse/JDK-8292008) and >> [JDK-8247283](https://bugs.openjdk.org/browse/JDK-8247283), some C and C++ >> code across the JDK can be replaced and simplified with cleaner language >> features

Re: RFR: 8295146: Clean up native code with newer C/C++ language features [v2]

2022-11-14 Thread Thomas Stuefe
On Mon, 14 Nov 2022 04:14:24 GMT, Julian Waters wrote: >> After [JDK-8292008](https://bugs.openjdk.org/browse/JDK-8292008) and >> [JDK-8247283](https://bugs.openjdk.org/browse/JDK-8247283), some C and C++ >> code across the JDK can be replaced and simplified with cleaner language >> features

Re: RFR: 8295146: Clean up native code with newer C/C++ language features [v2]

2022-11-14 Thread Thomas Stuefe
On Mon, 14 Nov 2022 04:14:24 GMT, Julian Waters wrote: >> After [JDK-8292008](https://bugs.openjdk.org/browse/JDK-8292008) and >> [JDK-8247283](https://bugs.openjdk.org/browse/JDK-8247283), some C and C++ >> code across the JDK can be replaced and simplified with cleaner language >> features

Re: RFR: 8295146: Clean up native code with newer C/C++ language features [v2]

2022-11-14 Thread Thomas Stuefe
On Mon, 14 Nov 2022 04:14:24 GMT, Julian Waters wrote: >> After [JDK-8292008](https://bugs.openjdk.org/browse/JDK-8292008) and >> [JDK-8247283](https://bugs.openjdk.org/browse/JDK-8247283), some C and C++ >> code across the JDK can be replaced and simplified with cleaner language >> features

Re: RFR: 8296812: sprintf is deprecated in Xcode 14

2022-11-14 Thread Thomas Stuefe
On Sun, 13 Nov 2022 22:55:52 GMT, Xue-Lei Andrew Fan wrote: > Please don't add uses of `jio_snprintf` or `::snprintf` to hotspot. Use > `os::snprintf`. I did not know this was our policy now. Sorry for giving the wrong advice. Maybe we should add this to the hotspot style guide since I'm

Re: RFR: 8296796: Provide clean, platform-agnostic interface to C-heap trimming [v2]

2022-11-13 Thread Thomas Stuefe
ce > [JDK-8268893](https://bugs.openjdk.org/browse/JDK-8268893). This patch > reshapes this code, cleaning it up in an OS-agnostic way. That will allow us > to add implementions for other platforms (I have this on my list for AIX at > least) and make review of 8293114 easier. Thom

Re: RFR: 8296796: Provide clean, platform-agnostic interface to C-heap trimming

2022-11-13 Thread Thomas Stuefe
On Mon, 14 Nov 2022 01:35:35 GMT, David Holmes wrote: > This looks good for doing what it says, but I have to wonder whether it is > actually worthwhile doing this unless most OS/lib will support it? What will > the implementation be in AIX? I think C-Heap trimming is useful even if only

Re: RFR: 8296796: Provide clean, platform-agnostic interface to C-heap trimming

2022-11-13 Thread Thomas Stuefe
On Thu, 10 Nov 2022 13:23:34 GMT, Thomas Stuefe wrote: > This is a breakout from > [JDK-8293114](https://bugs.openjdk.org/browse/JDK-8293114), which is starved > for reviews. So I attempt to break up that fix into smaller units which are > hopefully easier to review separately.

Re: RFR: 8296812: sprintf is deprecated in Xcode 14

2022-11-13 Thread Thomas Stuefe
On Sun, 13 Nov 2022 08:25:57 GMT, Xue-Lei Andrew Fan wrote: > > could you use `jio_snprintf` instead (see include/jvm_io.h)? That is what > > we usually do for snprintf. jio_snprintf hides platform particularities wrt > > snprintf. > > Good to know that. Thank you! > > While I was doing the

Re: RFR: 8296812: sprintf is deprecated in Xcode 14

2022-11-12 Thread Thomas Stuefe
On Fri, 11 Nov 2022 22:41:19 GMT, Xue-Lei Andrew Fan wrote: > Hi, > > May I have this update reviewed? > > The sprintf is deprecated in Xcode 14 because of security concerns, and the > use of it causing building failure. The build could pass if warnings are > disabled for codes that use

Re: RFR: 8296796: Provide clean, platform-agnostic interface to C-heap trimming

2022-11-10 Thread Thomas Stuefe
On Thu, 10 Nov 2022 13:23:34 GMT, Thomas Stuefe wrote: > This is a breakout from > [JDK-8293114](https://bugs.openjdk.org/browse/JDK-8293114), which is starved > for reviews. So I attempt to break up that fix into smaller units which are > hopefully easier to review separately.

RFR: 8296796: Provide clean, platform-agnostic interface to C-heap trimming

2022-11-10 Thread Thomas Stuefe
This is a breakout from [JDK-8293114](https://bugs.openjdk.org/browse/JDK-8293114), which is starved for reviews. So I attempt to break up that fix into smaller units which are hopefully easier to review separately. We can trim the C-heap manually using jcmd since

Re: RFR: 8295884: Support for development with the Eclipse IDE [v2]

2022-10-26 Thread Thomas Stuefe
On Wed, 26 Oct 2022 10:07:12 GMT, Julian Waters wrote: >> Eclipse is a popular and very well-known IDE in the world of Java >> development, utilized widely in many contexts, by beginners and experienced >> teams alike. Although a relatively lightweight IDE, it features surprisingly >>

Re: RFR: 8295657: SA: Allow larger object alignments

2022-10-19 Thread Thomas Stuefe
On Wed, 19 Oct 2022 12:04:49 GMT, Aleksey Shipilev wrote: > Found this when working on JOL support > ([CODETOOLS-7903364](https://bugs.openjdk.org/browse/CODETOOLS-7903364)). If > you try to attach to VM running with -XX:ObjectAlignmentInBytes=32, then SA > would fail with: > > > Caused by:

Re: RFR: 8295231: Move all linking of native libraries to make

2022-10-17 Thread Thomas Stuefe
On Mon, 10 Oct 2022 14:15:37 GMT, Julian Waters wrote: > Some external libraries required by native code are linked via linker > comments embedded in pragmas. Searching for which libraries are linked can > then become frustrating and confusing since they may be included in an > obscure place,

Re: RFR: 8295231: Move all linking of native libraries to make

2022-10-17 Thread Thomas Stuefe
On Mon, 10 Oct 2022 14:15:37 GMT, Julian Waters wrote: > Some external libraries required by native code are linked via linker > comments embedded in pragmas. Searching for which libraries are linked can > then become frustrating and confusing since they may be included in an > obscure place,

Re: RFR: 8295231: Move all linking of native libraries to make

2022-10-17 Thread Thomas Stuefe
On Mon, 10 Oct 2022 14:15:37 GMT, Julian Waters wrote: > Some external libraries required by native code are linked via linker > comments embedded in pragmas. Searching for which libraries are linked can > then become frustrating and confusing since they may be included in an > obscure place,

Re: RFR: 8291555: Replace stack-locking with fast-locking

2022-10-06 Thread Thomas Stuefe
On Mon, 8 Aug 2022 13:45:06 GMT, Roman Kennke wrote: > The bar for acceptance for a brand new locking scheme with no fallback is > extremely high and needs a lot of bake time and broad performance > measurements, to watch for pathologies. That bar is lower if the scheme can > be reverted to

Re: RFR: 8291555: Replace stack-locking with fast-locking

2022-10-06 Thread Thomas Stuefe
On Sun, 7 Aug 2022 12:50:01 GMT, Roman Kennke wrote: > > Happens when the main thread detaches itself upon VM exit. VM attempts to > > release OMs that are owned by the finished main thread (side note: if that > > is the sole surviving thread, maybe that step could be skipped?). That > >

Re: RFR: 8291555: Replace stack-locking with fast-locking

2022-10-06 Thread Thomas Stuefe
On Thu, 28 Jul 2022 19:58:34 GMT, Roman Kennke wrote: > This change replaces the current stack-locking implementation with a > fast-locking scheme that retains the advantages of stack-locking (namely fast > locking in uncontended code-paths), while avoiding the overload of the mark > word.

Re: RFR: 8234262: Unmask SIGQUIT in a child process [v3]

2022-09-23 Thread Thomas Stuefe
On Thu, 22 Sep 2022 22:41:21 GMT, Roger Riggs wrote: >> Clear the signal mask of the child when launching with posix_spawn. >> >> SIGQUIT signals are handled on non-Java Threads by the VM. >> For Java threads the signal mask blocks SIGQUIT. >> The ProcessBuilder uses posix_spawn on all

Re: RFR: 8234262: Unmask SIGQUIT in a child process [v3]

2022-09-22 Thread Thomas Stuefe
On Thu, 22 Sep 2022 22:41:21 GMT, Roger Riggs wrote: >> Clear the signal mask of the child when launching with posix_spawn. >> >> SIGQUIT signals are handled on non-Java Threads by the VM. >> For Java threads the signal mask blocks SIGQUIT. >> The ProcessBuilder uses posix_spawn on all

Re: RFR: 8234262: Unmask SIGQUIT in a child process [v2]

2022-09-22 Thread Thomas Stuefe
On Thu, 22 Sep 2022 14:26:51 GMT, Roger Riggs wrote: > Hi Roger, Using the spawn attributes seems more far reaching than simply > temporarily changing the signal mask of the calling thread. I'd be concerned > this has some unintended side-effects. I don't think that is a good idea. If the

Integrated: JDK-8293156: Dcmd VM.classloaders fails to print the full hierarchy

2022-09-21 Thread Thomas Stuefe
On Fri, 16 Sep 2022 14:55:42 GMT, Thomas Stuefe wrote: > Fixes a bug in the `VM.classloaders` jcmd that causes class loaders to be > omitted from the output if a parent class loader never loaded any class and > therefore had no associated DCmd. > > The fix changes the comm

Re: RFR: JDK-8293156: Dcmd VM.classloaders fails to print the full hierarchy [v3]

2022-09-21 Thread Thomas Stuefe
On Wed, 21 Sep 2022 16:32:30 GMT, Chris Plummer wrote: >> Thomas Stuefe has updated the pull request incrementally with three >> additional commits since the last revision: >> >> - Fix test error in GHAs >> - feedback dholmes >> - childs->child

Re: RFR: JDK-8293156: Dcmd VM.classloaders fails to print the full hierarchy [v2]

2022-09-21 Thread Thomas Stuefe
On Tue, 20 Sep 2022 05:37:44 GMT, Thomas Stuefe wrote: >> Fixes a bug in the `VM.classloaders` jcmd that causes class loaders to be >> omitted from the output if a parent class loader never loaded any class and >> therefore had no associated DCmd. >> >> The fix c

Re: RFR: JDK-8293156: Dcmd VM.classloaders fails to print the full hierarchy

2022-09-21 Thread Thomas Stuefe
On Tue, 20 Sep 2022 05:33:10 GMT, Thomas Stuefe wrote: > Hi @plummercj , thanks for your Review. I worked most of your your feedback. > > .. Thomas - PR: https://git.openjdk.org/jdk/pull/10312

Re: RFR: JDK-8293156: Dcmd VM.classloaders fails to print the full hierarchy [v3]

2022-09-21 Thread Thomas Stuefe
> Thanks to @dholmes-ora for finding this bug. Thomas Stuefe has updated the pull request incrementally with three additional commits since the last revision: - Fix test error in GHAs - feedback dholmes - childs->children - Changes: - all: https://git.openjdk.org/jdk/pull/10

Re: RFR: JDK-8293156: Dcmd VM.classloaders fails to print the full hierarchy [v2]

2022-09-21 Thread Thomas Stuefe
On Wed, 21 Sep 2022 02:26:02 GMT, David Holmes wrote: >> Thomas Stuefe has updated the pull request incrementally with one additional >> commit since the last revision: >> >> cjplummer feedback > > src/hotspot/share/classfile/classLoaderHierarchyDCmd.cpp l

Re: RFR: JDK-8293156: Dcmd VM.classloaders fails to print the full hierarchy [v2]

2022-09-19 Thread Thomas Stuefe
On Mon, 19 Sep 2022 18:45:35 GMT, Chris Plummer wrote: >> Thomas Stuefe has updated the pull request incrementally with one additional >> commit since the last revision: >> >> cjplummer feedback > > src/hotspot/share/classfile/classLoaderHierarchyDCmd.cpp l

Re: RFR: JDK-8293156: Dcmd VM.classloaders fails to print the full hierarchy [v2]

2022-09-19 Thread Thomas Stuefe
> Thanks to @dholmes-ora for finding this bug. Thomas Stuefe has updated the pull request incrementally with one additional commit since the last revision: cjplummer feedback - Changes: - all: https://git.openjdk.org/jdk/pull/10312/files - new: https://git.openjdk.org/jdk/pull/

Re: RFR: JDK-8293156: Dcmd VM.classloaders fails to print the full hierarchy

2022-09-19 Thread Thomas Stuefe
On Fri, 16 Sep 2022 14:55:42 GMT, Thomas Stuefe wrote: > Fixes a bug in the `VM.classloaders` jcmd that causes class loaders to be > omitted from the output if a parent class loader never loaded any class and > therefore had no associated DCmd. > > The fix changes the comm

Re: RFR: JDK-8293659: Improve UnsatisfiedLinkError error message to include dlopen error details

2022-09-17 Thread Thomas Stuefe
On Thu, 15 Sep 2022 17:56:09 GMT, Mandy Chung wrote: >> When trying to load a x64 lib on macOS aarch64 one got previously this >> detailed message before >> [JDK-8275703](https://bugs.openjdk.org/browse/JDK-8275703): >> >> java.lang.UnsatisfiedLinkError:

<    1   2   3   4   5   6   7   8   9   10   >