RFR: 6913: Add daemon thread information to the console threads view

Alex Macdonald aptmac at openjdk.java.net
Tue Sep 29 21:06:48 UTC 2020


On Thu, 24 Sep 2020 16:06:29 GMT, Jan S. <github.com+924885+jpstotz at openjdk.org> wrote:

> My current approach uses a Getter in `org.openjdk.jmc.console.ui.tabs.threads.ThreadInfoCompositeSupport` that catches
> potential `InvalidKeyException` that occur when enabling the Daemon column on a Java 8 VM. In such a case a defined
> error string like "Data not available" is returned and shown for each thread as value in the Daemon column.
> Do you think this is a suitable approach?

Yes, catching the exception in the `Getter.getMember()` could work. Alternatively, it might be cleaner to implement
this like `IS_DEADLOCKED` or `GET_ALLOCATED_BYTES`, which also perform a check to see if the feature is enabled or not.

-------------

PR: https://git.openjdk.java.net/jmc/pull/110


More information about the jmc-dev mailing list