Skip to content

[GR-44559] Finish ThreadMXBean implementation for Native Image. #6101

@fniephaus

Description

@fniephaus

SubstrateThreadMXBean implements com.sun.management.ThreadMXBean for Native Image and is not fully implemented yet, for example:

@Override
public long[] getAllThreadIds() {
throw VMError.unsupportedFeature(MSG);
}
@Override
public ThreadInfo getThreadInfo(long id) {
throw VMError.unsupportedFeature(MSG);
}
@Override
public ThreadInfo[] getThreadInfo(long[] ids) {
throw VMError.unsupportedFeature(MSG);
}
@Override
public ThreadInfo getThreadInfo(long id, int maxDepth) {
throw VMError.unsupportedFeature(MSG);
}
@Override
public ThreadInfo[] getThreadInfo(long[] ids, int maxDepth) {
throw VMError.unsupportedFeature(MSG);
}

To improve JMX support (#4732), some of these methods throwing VMError.unsupportedFeature() will be switched to return reasonable, but empty default values (e.g., new ThreadInfo[0]). While this allows some JMX tools to work, some key functionality of ThreadMXBean is still missing and needs to be implemented.

Metadata

Metadata

Assignees

Type

No type

Projects

Status

In progress

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions