-
Notifications
You must be signed in to change notification settings - Fork 174
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
7167: Agent Plugin #226
7167: Agent Plugin #226
Conversation
👋 Welcome back jmatsuoka! A progress list of the required criteria for merging this PR into |
/contributor add aptmac |
@Josh-Matsuoka |
@Josh-Matsuoka |
@Josh-Matsuoka |
New plug-ins must have both 16x16 and 32x32 pixel versions of icons, and preferably also either a vector version, or a higher resolution variant checked into jmc-graphics. Let me know if you need help inventing something. :) |
I see. Do you have any ideas/preferences for what the icon should look like for the agent plugin? |
Hm. We've been talking about extending the agent with other stuff (i.e. not directly related to the JFR), so something JMC-ish? Rocket with sunglasses (since all agents have sunglasses)? Or just an agent icon (hat + sunglasses?). |
Webrevs
|
/reviewers 2 |
@thegreystone |
application/org.openjdk.jmc.console.ext.agent/META-INF/MANIFEST.MF
Outdated
Show resolved
Hide resolved
Since this is part of the core rcp distribution (not an optional downloadable plug-in), I think you can skip the "ext". |
Failing validation checks. |
This sounds like a possible agent bug, I'll take a look and get back to you on that |
@Josh-Matsuoka seems build works nicelly ! Thank you but the "org.openjdk.jmc.console.agen" module is still not properly displayed in side the Eclipse as Java project, sadly, there is something some where missing. btw: agent definition on void methods without inputs ()V , works properly, I've done a mistake. |
@Josh-Matsuoka I will look at it by the end of this week. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So I build upon you latest change ( 8f8398e ), and indeed this fixes most of the issues.
I have noted a few additional things :
For example if I open the agent on JMC itself
The help button on the dialog with the question mark does nothing.
If I only give the agent jar path eg : agent/target/org.openjdk.jmc.agent-1.0.0-SNAPSHOT.jar
Then the agent editor is empty:
Then doing something silly I clicked on the save preset and SAX error when saving as the preset is empty.
org.xml.sax.SAXParseException; lineNumber: 1; columnNumber: 1; Premature end of file.
at java.xml/com.sun.org.apache.xerces.internal.jaxp.validation.Util.toSAXParseException(Util.java:75)
at java.xml/com.sun.org.apache.xerces.internal.jaxp.validation.StreamValidatorHelper.validate(StreamValidatorHelper.java:178)
at java.xml/com.sun.org.apache.xerces.internal.jaxp.validation.ValidatorImpl.validate(ValidatorImpl.java:115)
at org.openjdk.jmc.console.agent.utils.ProbeValidator.validate(ProbeValidator.java:86)
at java.xml/javax.xml.validation.Validator.validate(Validator.java:124)
at org.openjdk.jmc.console.agent.manager.model.Preset.deserialize(Preset.java:147)
at org.openjdk.jmc.console.agent.editor.AgentEditorUi.savePreset(AgentEditorUi.java:185)
at org.openjdk.jmc.console.agent.editor.AgentEditorAction.run(AgentEditorAction.java:57)
at org.eclipse.jface.action.Action.runWithEvent(Action.java:474)
at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection(ActionContributionItem.java:579)
...
Is there no way to stop a running agent and restart the agent, so it's possible to give a different configuration. I didn't have the time to explore the agent at this time.
...gent/src/main/java/org/openjdk/jmc/console/agent/raweditor/internal/XmlDocumentProvider.java
Outdated
Show resolved
Hide resolved
That help button should just be hidden, the textbox hints already tell the user exactly what's needed
This is intended behaviour, there are no probes inserted, so there's nothing to display
We should have a more meaningful error if the preset is empty, I'll fix that
Not to stop/restart a running agent, but defineEventProbes already reverts existing instrumentation and inserts new probes (i.e. it will override the current configuration). |
@bric3 PR has been updated with the requested changes, let me know what you think when you get some time :) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes it looks good to me.
IWorkbenchWindow window = PlatformUI.getWorkbench().getActiveWorkbenchWindow(); | ||
DialogToolkit.showWarning(window.getShell(), Messages.AgentEditorUI_MESSAGE_EMPTY_PRESET_TITLE, | ||
Messages.AgentEditorUI_MESSAGE_EMPTY_PRESET); | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
@@ -61,6 +62,8 @@ | |||
public StartAgentWizard(AgentJmxHelper helper) { | |||
this.helper = helper; | |||
startAgentWizardPage = new StartAgentWizardPage(helper); | |||
this.setHelpAvailable(false); | |||
WizardDialog.setDialogHelpAvailable(false); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
@Gunde mind taking another look when you get some time? :) |
@Josh-Matsuoka This change now passes all automated pre-integration checks. ℹ️ This project also has non-automated pre-integration requirements. Please see the file CONTRIBUTING.md for details. After integration, the commit message for the final commit will be:
You can use pull request commands such as /summary, /contributor and /issue to adjust it as needed. At the time when this comment was updated there had been 43 new commits pushed to the
As there are no conflicts, your changes will automatically be rebased on top of these commits when integrating. If you prefer to avoid this automatic rebasing, please check the documentation for the /integrate command for further details. ➡️ To integrate this PR with the above commit message to the |
Thanks for all the reviews everyone, I'll integrate this shortly on behalf of Josh |
/integrate |
@aptmac Only the author (@Josh-Matsuoka) is allowed to issue the |
Jokes on me, I'll send him a ping to do so |
/integrate |
Going to push as commit 2e8a251.
Your commit was automatically rebased without conflicts. |
@Josh-Matsuoka Pushed as commit 2e8a251. 💡 You may see a message that your pull request was closed with unmerged commits. This can be safely ignored. |
This PR adds the Agent Plugin to JMC. This is a plugin for controlling the jmc agent and provides a way to attach it and add probes to any JVMs in the JVM browser, as well as providing a preset manager for creating/modifying probe presets.
There is still a small amount of cleanup to be done so I'll mark it as a draft for now but it would be great to get a review :)
Progress
Issue
Reviewers
Contributors
<aptmac@openjdk.org>
<jescolem@openjdk.org>
<kxu@openjdk.org>
Reviewing
Using
git
Checkout this PR locally:
$ git fetch https://git.openjdk.java.net/jmc pull/226/head:pull/226
$ git checkout pull/226
Update a local copy of the PR:
$ git checkout pull/226
$ git pull https://git.openjdk.java.net/jmc pull/226/head
Using Skara CLI tools
Checkout this PR locally:
$ git pr checkout 226
View PR using the GUI difftool:
$ git pr show -t 226
Using diff file
Download this PR as a diff file:
https://git.openjdk.java.net/jmc/pull/226.diff