Re: RFR: 8268425: Show decimal nid of OSThread instead of hex format one

2021-06-28 Thread Yi Yang
On Mon, 28 Jun 2021 06:16:14 GMT, Thomas Stuefe wrote: >> From users' perspective, we can find corresponding os thread via top >> directly, otherwise, we must convert hex format based nid to an integer, and >> find that thread via `top -pid `. This slightly facilitates our >> debugging process

Re: RFR: 8268425: Show decimal nid of OSThread instead of hex format one [v2]

2021-06-28 Thread Yi Yang
> From users' perspective, we can find corresponding os thread via top > directly, otherwise, we must convert hex format based nid to an integer, and > find that thread via `top -pid `. This slightly facilitates our > debugging process, but would obviously break some existing jstack analysis >

Re: RFR: 8268425: Show decimal nid of OSThread instead of hex format one [v2]

2021-06-28 Thread Thomas Stuefe
On Mon, 28 Jun 2021 07:37:10 GMT, Yi Yang wrote: >> src/hotspot/share/runtime/osThread.cpp line 41: >> >>> 39: // Printing >>> 40: void OSThread::print_on(outputStream *st) const { >>> 41: st->print("nid=%d ", thread_id()); >> >> thread_id is of an opaque type (eg pthread_t). I think we can r

Re: RFR: 8268425: Show decimal nid of OSThread instead of hex format one [v2]

2021-06-28 Thread Kevin Walls
On Mon, 28 Jun 2021 07:46:29 GMT, Yi Yang wrote: >> From users' perspective, we can find corresponding os thread via top >> directly, otherwise, we must convert hex format based nid to an integer, and >> find that thread via `top -pid `. This slightly facilitates our >> debugging process, but

Re: RFR: 8268425: Show decimal nid of OSThread instead of hex format one [v2]

2021-06-28 Thread Thomas Stuefe
On Mon, 28 Jun 2021 08:58:09 GMT, Kevin Walls wrote: > Hi, > If you attach WinDbg on Windows to a JVM, you might be glad of the nid=0x... > format as that is its choice of base for the thread ids. > So this depends on your tools. Maybe frustrated top users outnumber happy > WinDbg users for the

Re: RFR: 8268425: Show decimal nid of OSThread instead of hex format one [v2]

2021-06-28 Thread Kevin Walls
On Mon, 28 Jun 2021 09:16:33 GMT, Thomas Stuefe wrote: > Why not do it platform dependent then? ... Checked Visual Studio, and that goes with decimal for thread IDs. 8-) It's the tools rather than the platform. But yes, hex for thread IDs seems to be in the minority. (I have occasionally fou

Re: [jdk17] RFR: 8269409: Post JEP 411 refactoring: core-libs with maximum covering > 10K [v2]

2021-06-28 Thread Daniel Fuchs
On Sat, 26 Jun 2021 23:55:46 GMT, Weijun Wang wrote: >> src/jdk.attach/share/classes/sun/tools/attach/HotSpotVirtualMachine.java >> line 53: >> >>> 51: private static final long CURRENT_PID = >>> AccessController.doPrivileged( >>> 52: (PrivilegedAction) >>> ProcessHandle::curr

Re: RFR: 8268425: Show decimal nid of OSThread instead of hex format one [v2]

2021-06-28 Thread David Holmes
On 28/06/2021 6:49 pm, Thomas Stuefe wrote: On Mon, 28 Jun 2021 07:37:10 GMT, Yi Yang wrote: src/hotspot/share/runtime/osThread.cpp line 41: 39: // Printing 40: void OSThread::print_on(outputStream *st) const { 41: st->print("nid=%d ", thread_id()); thread_id is of an opaque type (eg pth

Re: [jdk17] RFR: 8269409: Post JEP 411 refactoring: core-libs with maximum covering > 10K [v3]

2021-06-28 Thread Weijun Wang
> More refactoring to limit the scope of `@SuppressWarnings` annotations. > > Sometimes I introduce new methods. Please feel free to suggest method names > you like to use. Weijun Wang has updated the pull request incrementally with one additional commit since the last revision: one more ref

Re: [jdk17] RFR: 8269409: Post JEP 411 refactoring: core-libs with maximum covering > 10K [v2]

2021-06-28 Thread Weijun Wang
On Fri, 25 Jun 2021 23:40:27 GMT, Weijun Wang wrote: >> More refactoring to limit the scope of `@SuppressWarnings` annotations. >> >> Sometimes I introduce new methods. Please feel free to suggest method names >> you like to use. > > Weijun Wang has updated the pull request incrementally with o

Re: [jdk17] RFR: 8269409: Post JEP 411 refactoring: core-libs with maximum covering > 10K [v2]

2021-06-28 Thread Weijun Wang
On Mon, 28 Jun 2021 12:20:38 GMT, Daniel Fuchs wrote: >> This cast is only to tell the compiler which overloaded method to call, and >> I don't think there will be a real cast at runtime. It might look a little >> ugly but extracting it into a variable declaration/definition plus a new >> `ini

Re: RFR: 8268425: Show decimal nid of OSThread instead of hex format one

2021-06-28 Thread Kevin Walls
On Fri, 18 Jun 2021 06:14:49 GMT, Yi Yang wrote: > Do you think this would facilitate debugging process? And is it acceptable? > Any feedback is appreciated! My first comments were to say that this makes things better for some people, but a little worse for others. Maybe overall this looks lik

Re: RFR: 8268425: Show decimal nid of OSThread instead of hex format one

2021-06-28 Thread Thomas Stuefe
On Mon, 28 Jun 2021 12:41:35 GMT, David Holmes wrote: > > You'd do: > > print("nid: " UINT64_FORMAT, (uint64_t) id):; > > thread_t is, among other things, pthread_t, which is opaque. Any current > > code treating that as signed int is incorrect too. > > If it is opaque then I don't see how sign

[jdk17] Withdrawn: 8269409: Post JEP 411 refactoring: core-libs with maximum covering > 10K

2021-06-28 Thread Weijun Wang
On Fri, 25 Jun 2021 20:04:37 GMT, Weijun Wang wrote: > More refactoring to limit the scope of `@SuppressWarnings` annotations. > > Sometimes I introduce new methods. Please feel free to suggest method names > you like to use. This pull request has been closed without being integrated. ---

RFR: 8269409: Post JEP 411 refactoring: core-libs with maximum covering > 10K

2021-06-28 Thread Weijun Wang
More refactoring to limit the scope of `@SuppressWarnings` annotations. Sometimes I introduce new methods. Please feel free to suggest method names you like to use. Note: this is copied from https://github.com/openjdk/jdk17/pull/152. - Commit messages: - copy all code change from

Re: RFR: 8269409: Post JEP 411 refactoring: core-libs with maximum covering > 10K

2021-06-28 Thread Lance Andersen
On Mon, 28 Jun 2021 18:03:56 GMT, Weijun Wang wrote: > More refactoring to limit the scope of `@SuppressWarnings` annotations. > > Sometimes I introduce new methods. Please feel free to suggest method names > you like to use. > > Note: this is copied from https://github.com/openjdk/jdk17/pull/

Integrated: 8269409: Post JEP 411 refactoring: core-libs with maximum covering > 10K

2021-06-28 Thread Weijun Wang
On Mon, 28 Jun 2021 18:03:56 GMT, Weijun Wang wrote: > More refactoring to limit the scope of `@SuppressWarnings` annotations. > > Sometimes I introduce new methods. Please feel free to suggest method names > you like to use. > > Note: this is copied from https://github.com/openjdk/jdk17/pull/

Re: RFR: 8260540: serviceability/jdwp/AllModulesCommandTest.java failed with "Debuggee error: 'ERROR: transport error 202: bind failed: Address already in use'"

2021-06-28 Thread Alex Menkov
On Tue, 22 Jun 2021 21:01:46 GMT, Alex Menkov wrote: > Updated AllModulesCommandTest to use dynamic port launching debuggee. > Parsing debuggee listening address functionality is required in several tests > (and we have other tests which need to be fixed the same way), so moved the > code to ne

Re: RFR: 8269268: JDWP: Properly fix thread lookup assert in findThread() [v2]

2021-06-28 Thread Serguei Spitsyn
On Thu, 24 Jun 2021 16:51:59 GMT, Chris Plummer wrote: >> Re-enable the assert that was disabled (with some overhead) by >> [JDK-8265683](https://bugs.openjdk.java.net/browse/JDK-8265683). Explanation >> is in the CR and also in comments included with the changes. >> >> I tested by running `vm

[jdk17] RFR: 8269232: assert(!is_jweak(handle)) failed: wrong method for detroying jweak

2021-06-28 Thread Chris Plummer
Don't let node->strongRef go below 0, or we end up thinking we still have a strongref when it is a weakref. Note the fact that we are doing nesting counts is still a bug (and the main cause of this issue). However, the fix for that is more complex, and for 17 I would prefer to just apply this si

RFR: 8245877: assert(_value != __null) failed: resolving NULL _value in JvmtiExport::post_compiled_method_load

2021-06-28 Thread Leonid Mesnik
The crash happens because nmethod might become a zombie before it is enqueued in JvmtiDeferredEventQueue or after it is dequeued from it. The crash is reproduced by serviceability/jvmti/CompiledMethodLoad/Zombie.java. However, it takes ~3K runs to hit it. I verified the fix by running this test

Re: [jdk17] RFR: 8269232: assert(!is_jweak(handle)) failed: wrong method for detroying jweak

2021-06-28 Thread Roman Kennke
On Mon, 28 Jun 2021 20:41:35 GMT, Chris Plummer wrote: > Don't let node->strongRef go below 0, or we end up thinking we still have a > strongref when it is a weakref. Note the fact that we are doing nesting > counts is still a bug (and the main cause of this issue). However, the fix > for that

Re: RFR: 8260540: serviceability/jdwp/AllModulesCommandTest.java failed with "Debuggee error: 'ERROR: transport error 202: bind failed: Address already in use'"

2021-06-28 Thread Serguei Spitsyn
On Tue, 22 Jun 2021 21:01:46 GMT, Alex Menkov wrote: > Updated AllModulesCommandTest to use dynamic port launching debuggee. > Parsing debuggee listening address functionality is required in several tests > (and we have other tests which need to be fixed the same way), so moved the > code to ne

Re: [jdk17] RFR: 8269232: assert(!is_jweak(handle)) failed: wrong method for detroying jweak

2021-06-28 Thread Alex Menkov
On Mon, 28 Jun 2021 20:41:35 GMT, Chris Plummer wrote: > Don't let node->strongRef go below 0, or we end up thinking we still have a > strongref when it is a weakref. Note the fact that we are doing nesting > counts is still a bug (and the main cause of this issue). However, the fix > for that

Re: [jdk17] RFR: 8269232: assert(!is_jweak(handle)) failed: wrong method for detroying jweak

2021-06-28 Thread Serguei Spitsyn
On Mon, 28 Jun 2021 20:41:35 GMT, Chris Plummer wrote: > Don't let node->strongRef go below 0, or we end up thinking we still have a > strongref when it is a weakref. Note the fact that we are doing nesting > counts is still a bug (and the main cause of this issue). However, the fix > for that

Re: RFR: 8245877: assert(_value != __null) failed: resolving NULL _value in JvmtiExport::post_compiled_method_load

2021-06-28 Thread Serguei Spitsyn
On Sat, 26 Jun 2021 17:48:15 GMT, Leonid Mesnik wrote: > The crash happens because nmethod might become a zombie before it is enqueued > in JvmtiDeferredEventQueue or after it is dequeued from it. The crash is > reproduced by serviceability/jvmti/CompiledMethodLoad/Zombie.java. However, > it t

Re: RFR: 8268857: Merge VM_PrintJNI and VM_PrintThreads and remove the unused field 'is_deadlock' of DeadlockCycle [v7]

2021-06-28 Thread Serguei Spitsyn
On Fri, 18 Jun 2021 06:51:53 GMT, Denghui Dong wrote: >> Hi, >> >> Could I have a review of this change that merges three vm >> operations(VM_PrintThreads, VM_PrintJNI, VM_FindDeadlocks) in thread_dump >> and signal_thread_entry. >> >> `jstack` is a very common command, even in the production

Re: RFR: 8260540: serviceability/jdwp/AllModulesCommandTest.java failed with "Debuggee error: 'ERROR: transport error 202: bind failed: Address already in use'"

2021-06-28 Thread Alex Menkov
On Mon, 28 Jun 2021 21:36:08 GMT, Serguei Spitsyn wrote: >> Updated AllModulesCommandTest to use dynamic port launching debuggee. >> Parsing debuggee listening address functionality is required in several >> tests (and we have other tests which need to be fixed the same way), so >> moved the co

Re: RFR: 8245877: assert(_value != __null) failed: resolving NULL _value in JvmtiExport::post_compiled_method_load

2021-06-28 Thread David Holmes
On Sat, 26 Jun 2021 17:48:15 GMT, Leonid Mesnik wrote: > The crash happens because nmethod might become a zombie before it is enqueued > in JvmtiDeferredEventQueue or after it is dequeued from it. The crash is > reproduced by serviceability/jvmti/CompiledMethodLoad/Zombie.java. However, > it t

Re: RFR: 8268425: Show decimal nid of OSThread instead of hex format one

2021-06-28 Thread Yi Yang
On Mon, 28 Jun 2021 13:07:21 GMT, Kevin Walls wrote: > If so (and if we don't discover more tools that prefer hex for thread IDs!), > then we want to be consistent, so in addition to the native/built in > implementation, we should also update: > src/jdk.hotspot.agent/share/classes/sun/jvm/hots

Re: RFR: 8268425: Show decimal nid of OSThread instead of hex format one [v3]

2021-06-28 Thread Yi Yang
> From users' perspective, we can find corresponding os thread via top > directly, otherwise, we must convert hex format based nid to an integer, and > find that thread via `top -pid `. This slightly facilitates our > debugging process, but would obviously break some existing jstack analysis >

Re: RFR: 8245877: assert(_value != __null) failed: resolving NULL _value in JvmtiExport::post_compiled_method_load [v2]

2021-06-28 Thread Leonid Mesnik
> The crash happens because nmethod might become a zombie before it is enqueued > in JvmtiDeferredEventQueue or after it is dequeued from it. The crash is > reproduced by serviceability/jvmti/CompiledMethodLoad/Zombie.java. However, > it takes ~3K runs to hit it. I verified the fix by running t

Re: RFR: 8245877: assert(_value != __null) failed: resolving NULL _value in JvmtiExport::post_compiled_method_load [v2]

2021-06-28 Thread Leonid Mesnik
On Tue, 29 Jun 2021 02:24:37 GMT, David Holmes wrote: >> Leonid Mesnik has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Added comment. > > Hi Leonid, > > I'm not clear on the details here - please see comments below. > > Thanks, > David