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

6875: Add agent MXBean operation to return instrumented xml configuration #99

Closed
wants to merge 4 commits into from

Conversation

jessyec-s
Copy link
Contributor

@jessyec-s jessyec-s commented Jul 24, 2020

This patch adds the MXBean operation AgentControllerMXBean.retrieveEventProbes() to the agent. This function is the counterpart of AgentControllerMXBean.defineEventProbes().


Progress

  • Commit message must refer to an issue
  • Change must be properly reviewed

Issue

  • JMC-6875: Add agent MXBean operation to return instrumented xml configuration

Reviewers

  • Marcus Hirt (hirt - Reviewer)

Download

$ git fetch https://git.openjdk.java.net/jmc pull/99/head:pull/99
$ git checkout pull/99

@bridgekeeper
Copy link

@bridgekeeper bridgekeeper bot commented Jul 24, 2020

👋 Welcome back jescolem! A progress list of the required criteria for merging this PR into master will be added to the body of your pull request.

@openjdk openjdk bot added the rfr label Jul 24, 2020
@mlbridge
Copy link

@mlbridge mlbridge bot commented Jul 24, 2020

Webrevs

@Josh-Matsuoka
Copy link
Collaborator

@Josh-Matsuoka Josh-Matsuoka commented Aug 7, 2020

Hi Jessye,

Changes look good to me!

Copy link
Member

@thegreystone thegreystone left a comment

I think it would be nice with a few tests showing the failure modes, and some javadocs around what to expect from the API (especially in terms of failure modes / exceptions), for example setting invalid XML, setting invalid XML and then attempting reading it back and so on.

@openjdk
Copy link

@openjdk openjdk bot commented Aug 18, 2020

@jessyec-s this pull request can not be integrated into master due to one or more merge conflicts. To resolve these merge conflicts and update this pull request you can run the following commands in the local repository for your personal fork:

git checkout JMC-6875
git fetch https://git.openjdk.java.net/jmc master
git merge FETCH_HEAD
# resolve conflicts and follow the instructions given by git merge
git commit -m "Merge master"
git push

@jessyec-s
Copy link
Contributor Author

@jessyec-s jessyec-s commented Aug 18, 2020

I think it would be nice with a few tests showing the failure modes, and some javadocs around what to expect from the API (especially in terms of failure modes / exceptions), for example setting invalid XML, setting invalid XML and then attempting reading it back and so on.

Currently, an XML configuration is only stored if it can be successfully instrumented. If a new configuration cannot be instrumented, the current configuration that has already been successfully applied is not overwritten.

I have added a test TestDefaultTransformRegistry.testModifyInvalidXml that makes sure that an invalid configuration is not instrumented or stored. I have added the test within this file as DefaultTransformRegistry.modify is where a new XML configuration is stored if it has no errors.

In my initial commit I added a general test for AgentControllerMXBean.retrieveCurrentTransforms that covers the case when a XML configuration is successfully applied.

Let me know if these tests cover the failure modes properly!

I have also added a javadoc for the AgentControllerMXBean.retrieveCurrentTransforms operation - hopefully its functionality is more clear now.

@openjdk
Copy link

@openjdk openjdk bot commented Aug 19, 2020

@jessyec-s This change now passes all automated pre-integration checks. When the change also fulfills all project specific requirements, type /integrate in a new comment to proceed. After integration, the commit message will be:

6875: Add agent MXBean operation to return instrumented xml configuration

Reviewed-by: hirt
  • If you would like to add a summary, use the /summary command.
  • To credit additional contributors, use the /contributor command.
  • To add additional solved issues, use the /issue command.

There are currently no new commits on the master branch since the last update of the source branch of this PR. If another commit should be pushed before you perform the /integrate command, your PR will be automatically rebased. If you would like to avoid potential automatic rebasing, specify the current head hash when integrating, like this: /integrate 3aa92e4e7edfddf868ebe6d55e6e3495652b64b9.

As you do not have Committer status in this project, an existing Committer must agree to sponsor your change. Possible candidates are the reviewers of this PR (@thegreystone) but any other Committer may sponsor as well.

➡️ To flag this PR as ready for integration with the above commit message, type /integrate in a new comment. (Afterwards, your sponsor types /sponsor in a new comment to perform the integration).

@openjdk openjdk bot added the ready label Aug 19, 2020
@jessyec-s
Copy link
Contributor Author

@jessyec-s jessyec-s commented Aug 19, 2020

/integrate

@openjdk openjdk bot added the sponsor label Aug 19, 2020
@openjdk
Copy link

@openjdk openjdk bot commented Aug 19, 2020

@jessyec-s
Your change (at version 80b5757) is now ready to be sponsored by a Committer.

@thegreystone
Copy link
Member

@thegreystone thegreystone commented Aug 20, 2020

/integrate

@openjdk
Copy link

@openjdk openjdk bot commented Aug 20, 2020

@thegreystone Only the author (@jessyec-s) is allowed to issue the integrate command. As this PR is ready to be sponsored, and you are an eligible sponsor, did you mean to issue the /sponsor command?

@thegreystone
Copy link
Member

@thegreystone thegreystone commented Aug 20, 2020

/sponsor

@openjdk openjdk bot closed this Aug 20, 2020
@openjdk openjdk bot added the integrated label Aug 20, 2020
@openjdk
Copy link

@openjdk openjdk bot commented Aug 20, 2020

@thegreystone @jessyec-s
Pushed as commit f157e54.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
3 participants