Re: RFR: 8269537: memset() is called after operator new [v5]

2022-04-19 Thread Leo Korinth
On Tue, 19 Apr 2022 16:49:12 GMT, Leo Korinth wrote: >> The basic problem is that we are relying on undefined behaviour, as >> documented in the code: >> >> // This whole business of passing information from ResourceObj::operator new >> // to the Reso

Re: RFR: 8269537: memset() is called after operator new [v5]

2022-04-19 Thread Leo Korinth
on_stack()`. > > I have also tried to update the comments. In doing that I not only changed > the comments for this change, but also for the *incorrect* advice to always > delete object you allocate with new. > > Testing on debug build tier1-3 > Testing on release build tier1

Re: RFR: 8269537: memset() is called after operator new [v4]

2022-04-11 Thread Leo Korinth
On Wed, 20 Oct 2021 09:36:38 GMT, Leo Korinth wrote: >> The basic problem is that we are relying on undefined behaviour, as >> documented in the code: >> >> // This whole business of passing information from ResourceObj::operator new >> // to the Reso

Re: RFR: 8269537: memset() is called after operator new [v4]

2022-02-16 Thread Leo Korinth
On Wed, 20 Oct 2021 09:36:38 GMT, Leo Korinth wrote: >> The basic problem is that we are relying on undefined behaviour, as >> documented in the code: >> >> // This whole business of passing information from ResourceObj::operator new >> // to the Reso

Integrated: 8281585: Remove unused imports under test/lib and jtreg/gc

2022-02-14 Thread Leo Korinth
On Thu, 10 Feb 2022 15:39:53 GMT, Leo Korinth wrote: > Remove unused imports under test/lib and jtreg/gc. They create lots of > warnings if editing using an IDE. Tests in hotspot_gc passed. This pull request has now been integrated. Changeset: 2604a88f Author: Leo Korint

Re: RFR: 8281585: Remove unused imports under test/lib and jtreg/gc [v2]

2022-02-14 Thread Leo Korinth
On Fri, 11 Feb 2022 08:54:51 GMT, Leo Korinth wrote: >> Remove unused imports under test/lib and jtreg/gc. They create lots of >> warnings if editing using an IDE. Tests in hotspot_gc passed. > > Leo Korinth has updated the pull request incrementally with one additional >

Re: RFR: 8281585: Remove unused imports under test/lib and jtreg/gc [v2]

2022-02-11 Thread Leo Korinth
> Remove unused imports under test/lib and jtreg/gc. They create lots of > warnings if editing using an IDE. Tests in hotspot_gc passed. Leo Korinth has updated the pull request incrementally with one additional commit since the last revision: updating copyright - C

Re: RFR: 8281585: Remove unused imports under test/lib and jtreg/gc [v2]

2022-02-11 Thread Leo Korinth
On Fri, 11 Feb 2022 08:54:51 GMT, Leo Korinth wrote: >> Remove unused imports under test/lib and jtreg/gc. They create lots of >> warnings if editing using an IDE. Tests in hotspot_gc passed. > > Leo Korinth has updated the pull request incrementally with one additional >

RFR: 8281585: Remove unused imports under test/lib and jtreg/gc

2022-02-10 Thread Leo Korinth
Remove unused imports under test/lib and jtreg/gc. They create lots of warnings if editing using an IDE. Tests in hotspot_gc passed. - Commit messages: - 8281585: Remove unused imports under test/lib and jtreg/gc Changes: https://git.openjdk.java.net/jdk/pull/7426/files Webrev:

Re: RFR: 8269537: memset() is called after operator new [v4]

2022-01-18 Thread Leo Korinth
On Wed, 20 Oct 2021 09:36:38 GMT, Leo Korinth wrote: >> The basic problem is that we are relying on undefined behaviour, as >> documented in the code: >> >> // This whole business of passing information from ResourceObj::operator new >> // to the Reso

Re: RFR: 8269537: memset() is called after operator new [v4]

2021-11-26 Thread Leo Korinth
On Wed, 20 Oct 2021 09:36:38 GMT, Leo Korinth wrote: >> The basic problem is that we are relying on undefined behaviour, as >> documented in the code: >> >> // This whole business of passing information from ResourceObj::operator new >> // to the Reso

Re: RFR: 8276337: Use override specifier in HeapDumper [v2]

2021-11-09 Thread Leo Korinth
On Fri, 5 Nov 2021 14:14:43 GMT, Leo Korinth wrote: >> Use override specifier in HeapDumper. It is safer. > > Leo Korinth has updated the pull request incrementally with one additional > commit since the last revision: > > restart failed github tests Th

Integrated: 8276337: Use override specifier in HeapDumper

2021-11-09 Thread Leo Korinth
On Fri, 5 Nov 2021 11:32:24 GMT, Leo Korinth wrote: > Use override specifier in HeapDumper. It is safer. This pull request has now been integrated. Changeset: daf77ebf Author: Leo Korinth URL: https://git.openjdk.java.net/jdk/commit/daf77ebfc4ca6d537ef55acbd62b908b5575ad08 St

Re: RFR: 8276337: Use override specifier in HeapDumper [v2]

2021-11-05 Thread Leo Korinth
On Fri, 5 Nov 2021 14:30:33 GMT, Thomas Stuefe wrote: >> Leo Korinth has updated the pull request incrementally with one additional >> commit since the last revision: >> >> restart failed github tests > > src/hotspot/share/services/heapDumper.cpp line 626

Re: RFR: 8276337: Use override specifier in HeapDumper [v2]

2021-11-05 Thread Leo Korinth
> Use override specifier in HeapDumper. It is safer. Leo Korinth has updated the pull request incrementally with one additional commit since the last revision: restart failed github tests - Changes: - all: https://git.openjdk.java.net/jdk/pull/6274/files - new: ht

Re: RFR: 8276337: Use override specifier in HeapDumper

2021-11-05 Thread Leo Korinth
On Fri, 5 Nov 2021 12:45:56 GMT, David Holmes wrote: > In what way is it "safer" ?? What are you trying to guard against? If you use `override`, you can not forget to update a method signature if you change the method signature in the base class. You can also not by mistake change the method

Re: RFR: 8276337: Use override specifier in HeapDumper

2021-11-05 Thread Leo Korinth
On Fri, 5 Nov 2021 11:32:24 GMT, Leo Korinth wrote: > Use override specifier in HeapDumper. It is safer. I have some new code in the pipe, and I want to use `override` in that code without changing unrelated code in heapDumper.cpp. Thus I first make this change so that my future change

RFR: 8276337: Use override specifier in HeapDumper

2021-11-05 Thread Leo Korinth
Use override specifier in HeapDumper. It is safer. - Commit messages: - 8276337: Use override specifier in HeapDumper Changes: https://git.openjdk.java.net/jdk/pull/6274/files Webrev: https://webrevs.openjdk.java.net/?repo=jdk=6274=00 Issue:

Integrated: 8276173: Clean up and remove unneeded casts in HeapDumper

2021-11-05 Thread Leo Korinth
On Tue, 2 Nov 2021 13:51:42 GMT, Leo Korinth wrote: > HeapDumper does a lot of unneeded casts. Some arguments should be const. > Headers are not correctly sorted. Comment about identifier size on Windows > and Solaris is not true. > > First I cleaned up casting in the

Re: RFR: 8276173: Clean up and remove unneeded casts in HeapDumper [v2]

2021-11-05 Thread Leo Korinth
On Tue, 2 Nov 2021 19:25:40 GMT, Leo Korinth wrote: >> HeapDumper does a lot of unneeded casts. Some arguments should be const. >> Headers are not correctly sorted. Comment about identifier size on Windows >> and Solaris is not true. >> >> First I cleaned up

Re: RFR: 8269537: memset() is called after operator new [v4]

2021-10-20 Thread Leo Korinth
on_stack()`. > > I have also tried to update the comments. In doing that I not only changed > the comments for this change, but also for the *incorrect* advice to always > delete object you allocate with new. > > Testing on debug build tier1-3 > Testing on release build tier1 Leo

Re: RFR: 8269537: memset() is called after operator new [v3]

2021-10-19 Thread Leo Korinth
On Thu, 7 Oct 2021 06:18:00 GMT, Kim Barrett wrote: >> Leo Korinth has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Use a thread local buffer so that the compiler might reorder operator new. > > src/hots

Re: RFR: 8269537: memset() is called after operator new [v3]

2021-10-19 Thread Leo Korinth
On Thu, 7 Oct 2021 06:21:52 GMT, Kim Barrett wrote: >> Leo Korinth has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Use a thread local buffer so that the compiler might reorder operator new. > > src/hotsp

Re: RFR: 8269537: memset() is called after operator new [v3]

2021-10-19 Thread Leo Korinth
On Thu, 7 Oct 2021 06:21:09 GMT, Kim Barrett wrote: >> Leo Korinth has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Use a thread local buffer so that the compiler might reorder operator new. > > src/hotsp

Re: RFR: 8269537: memset() is called after operator new [v3]

2021-10-19 Thread Leo Korinth
On Tue, 19 Oct 2021 13:01:10 GMT, Leo Korinth wrote: >> src/hotspot/share/memory/allocation.hpp line 398: >> >>> 396: class ResourceObj ALLOCATION_SUPER_CLASS_SPEC { >>> 397: public: >>> 398: enum allocation_type : uint8_t { STACK_OR_EMBE

Re: RFR: 8269537: memset() is called after operator new [v3]

2021-10-19 Thread Leo Korinth
On Thu, 7 Oct 2021 06:12:07 GMT, Kim Barrett wrote: >> Leo Korinth has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Use a thread local buffer so that the compiler might reorder operator new. > > src/hotsp

Re: RFR: 8269537: memset() is called after operator new [v3]

2021-10-19 Thread Leo Korinth
On Thu, 7 Oct 2021 05:54:55 GMT, Kim Barrett wrote: >> Leo Korinth has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Use a thread local buffer so that the compiler might reorder operator new. > > src/hotspot

Re: RFR: 8269537: memset() is called after operator new [v3]

2021-10-19 Thread Leo Korinth
On Thu, 7 Oct 2021 05:49:24 GMT, Kim Barrett wrote: >> Leo Korinth has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Use a thread local buffer so that the compiler might reorder operator new. > > src/hotspot

Re: RFR: 8269537: memset() is called after operator new [v3]

2021-10-06 Thread Leo Korinth
On Tue, 5 Oct 2021 20:39:30 GMT, Leo Korinth wrote: >> The basic problem is that we are relying on undefined behaviour, as >> documented in the code: >> >> // This whole business of passing information from ResourceObj::operator new >> // to the Reso

Re: RFR: 8269537: memset() is called after operator new [v3]

2021-10-05 Thread Leo Korinth
On Sun, 26 Sep 2021 04:50:07 GMT, Kim Barrett wrote: >> Thanks Ioi for making me adding the assert!!! The sequencing of the >> allocation function and the arguments to the constructor is not what I >> thought, so my "solution" is not working. I am unsure how to resolve this in >> a good way.

Re: RFR: 8269537: memset() is called after operator new [v3]

2021-10-05 Thread Leo Korinth
on_stack()`. > > I have also tried to update the comments. In doing that I not only changed > the comments for this change, but also for the *incorrect* advice to always > delete object you allocate with new. > > Testing on debug build tier1-3 > Testing on release build

Re: RFR: 8269537: memset() is called after operator new [v2]

2021-09-24 Thread Leo Korinth
On Wed, 8 Sep 2021 12:57:18 GMT, Leo Korinth wrote: >> Hmm, u8 was not what I was thinking, I will change that to a uint8_t in the >> next update... > > I hit the new assert when not on Linux, I guess it has to do with the > initialization of the thread local variable.

Re: RFR: 8269537: memset() is called after operator new [v2]

2021-09-08 Thread Leo Korinth
On Wed, 8 Sep 2021 11:40:25 GMT, Leo Korinth wrote: >> I added a `set_type` method that ensures that the `_thread_last_allocated` >> always transition over a `STACK_OR_EMBEDDED`. I did *not* create a PUSH/POP >> macro pair because i believe it would give the false

Re: RFR: 8269537: memset() is called after operator new [v2]

2021-09-08 Thread Leo Korinth
On Wed, 8 Sep 2021 11:34:21 GMT, Leo Korinth wrote: >> src/hotspot/share/memory/allocation.hpp line 439: >> >>> 437: void* operator new(size_t size, const std::nothrow_t& >>> nothrow_constant) throw() { >>> 438: address

Re: RFR: 8269537: memset() is called after operator new [v2]

2021-09-08 Thread Leo Korinth
On Tue, 7 Sep 2021 23:29:10 GMT, Ioi Lam wrote: >> Leo Korinth has updated the pull request incrementally with one additional >> commit since the last revision: >> >> First update >> >> * Change backing type of ResourceObj::allocation_type to be u8. A

Re: RFR: 8269537: memset() is called after operator new [v2]

2021-09-08 Thread Leo Korinth
on_stack()`. > > I have also tried to update the comments. In doing that I not only changed > the comments for this change, but also for the *incorrect* advice to always > delete object you allocate with new. > > Testing on debug build tier1-3 > Testing on release build tier1

RFR: 8269537: memset() is called after operator new

2021-09-07 Thread Leo Korinth
The basic problem is that we are relying on undefined behaviour, as documented in the code: // This whole business of passing information from ResourceObj::operator new // to the ResourceObj constructor via fields in the "object" is technically UB. // But it seems to work within the limitations

Re: RFR: 8196337 Add commit methods that take all event properties as argument

2018-03-09 Thread Leo Korinth
On 09/03/18 15:19, Erik Helin wrote: On 03/09/2018 02:34 PM, Leo Korinth wrote: I still need another reviewer (and a sponsor). Looks good (well XSLT combined with C++ is awful, but the patch is good :D), Reviewed. I can sponsor this patch. Great! Thanks, Leo Thanks, Erik Thanks

Re: RFR: 8196337 Add commit methods that take all event properties as argument

2018-03-09 Thread Leo Korinth
-Original Message- From: Leo Korinth Sent: den 13 februari 2018 12:26 To: hotspot-runtime-...@openjdk.java.net; serviceability-dev@openjdk.java.net Subject: Re: RFR: 8196337 Add commit methods that take all event properties as argument Hi, I would be happy for reviews! Thanks, Leo On 31/01

Re: RFR: 8196337 Add commit methods that take all event properties as argument

2018-02-13 Thread Leo Korinth
Hi, I would be happy for reviews! Thanks, Leo On 31/01/18 11:00, Leo Korinth wrote: Hi, I am adding commit methods that take all event properties as argument. For instant events (without start and stop times) a static commit method is created (taking all properties). For non-instant

RFR: 8196337 Add commit methods that take all event properties as argument

2018-01-31 Thread Leo Korinth
Hi, I am adding commit methods that take all event properties as argument. For instant events (without start and stop times) a static commit method is created (taking all properties). For non-instant events, a non static commit method is created (taking all properties). Also a static commit