eclipse-openj9 / openj9

Eclipse OpenJ9: A Java Virtual Machine for OpenJDK that's optimized for small footprint, fast start-up, and high throughput. Builds on Eclipse OMR (https://github.com/eclipse/omr) and combines with the Extensions for OpenJDK for OpenJ9 repo.
Other
3.28k stars 721 forks source link

Implement a Java agent for collecting StringBuilderTransformer statistics #156

Open fjeremic opened 7 years ago

fjeremic commented 7 years ago

As suggested by @andrewcraik in https://github.com/eclipse/openj9/pull/133#issuecomment-332185691 and https://github.com/eclipse/openj9/pull/133#issuecomment-332515832 we should be able to implement a simple agent for the StringBuilderTransformer optimization and check it into our repository so that we can always collect statistics if need be.

The corresponding PR https://github.com/eclipse/openj9/pull/133 contains a rather large https://github.com/eclipse/openj9/pull/133#issuecomment-332006978 outlining the types of changes which are needed to StringBuilder class for the instrumentation to work.

dsouzai commented 4 years ago

Maybe this could be added as a feature for the perf-agent work over at https://github.com/amyhou/openj9-utils?

fjeremic commented 4 years ago

We've since switched to using OpenJDK's StringBuilder implementation, so this work becomes difficult on JDK11 onwards. However you're right if the JVMTI agent just inserts bytecode for instrumentation then yes that seems to be a much better path forward.