Skip to content

Bytecode version upgrade for invokedynamic dispatch#9239

Merged
trask merged 17 commits into
open-telemetry:mainfrom
SylvainJuge:indy-patch-old-bytecode
Aug 25, 2023
Merged

Bytecode version upgrade for invokedynamic dispatch#9239
trask merged 17 commits into
open-telemetry:mainfrom
SylvainJuge:indy-patch-old-bytecode

Conversation

@SylvainJuge

@SylvainJuge SylvainJuge commented Aug 17, 2023

Copy link
Copy Markdown
Contributor

When using the invokedynamic dispatching strategy described in #8999, it requires the instrumented classes to at least have been compiled with Java 7 (51) in order to use the invokedynamic instruction.

This transformer allows to upgrade the instrumented classes bytecode to Java 7 (51).

Implementation checklist

  • testing with bytecode from java 1 to java 8
  • using generated bytecode as newer JDKs do not allow this.

Usage

This PR only adds and tests one AgentBuilder.Transformer, it is not yet applied on every instrumentation, that will be done in a later PR. Doing that will require to add this transformer in the io.opentelemetry.javaagent.tooling.instrumentation.InstrumentationModuleInstaller#install method.

@SylvainJuge SylvainJuge marked this pull request as ready for review August 22, 2023 12:55
@SylvainJuge SylvainJuge requested a review from a team August 22, 2023 12:55

@tylerbenson tylerbenson left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it would help to indicate in the description how you intend to hook this in, otherwise seems ok to me.

@SylvainJuge

Copy link
Copy Markdown
Contributor Author

I think it would help to indicate in the description how you intend to hook this in, otherwise seems ok to me.

@tylerbenson I've updated the PR description with an Usage section, let me know if you need more details or if that's enough for now.

@SylvainJuge SylvainJuge deleted the indy-patch-old-bytecode branch October 3, 2023 08:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants