Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bytecode version upgrade for invokedynamic dispatch #9239

Merged
merged 17 commits into from
Aug 25, 2023

Conversation

SylvainJuge
Copy link
Contributor

@SylvainJuge SylvainJuge commented Aug 17, 2023

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
Copy link
Member

@tylerbenson tylerbenson left a comment

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
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