Skip to content
Permalink
Browse files
6697: Moving the agent to a top level directory
Reviewed-by: jkang, hdafgard
  • Loading branch information
thegreystone committed Feb 24, 2020
1 parent 9c2076c commit c752ec141352487c8c493fc00d0ab6104dcf4f9c
Showing with 3 additions and 7 deletions.
  1. 0 {core/org.openjdk.jmc.agent → agent}/.classpath
  2. 0 {core/org.openjdk.jmc.agent → agent}/.project
  3. 0 {core/org.openjdk.jmc.agent → agent}/.settings/org.eclipse.jdt.core.prefs
  4. +3 −7 {core/org.openjdk.jmc.agent → agent}/README.md
  5. 0 {core/org.openjdk.jmc.agent → agent}/launchers/InstrumentMe.launch
  6. 0 {core/org.openjdk.jmc.agent → agent}/launchers/InstrumentMeConverter.launch
  7. 0 {core/org.openjdk.jmc.agent → agent}/license/LICENSE.txt
  8. 0 {core/org.openjdk.jmc.agent → agent}/pom.xml
  9. 0 {core/org.openjdk.jmc.agent → agent}/src/main/java/org/openjdk/jmc/agent/Agent.java
  10. 0 {core/org.openjdk.jmc.agent → agent}/src/main/java/org/openjdk/jmc/agent/Attribute.java
  11. 0 {core/org.openjdk.jmc.agent → agent}/src/main/java/org/openjdk/jmc/agent/Field.java
  12. 0 {core/org.openjdk.jmc.agent → agent}/src/main/java/org/openjdk/jmc/agent/Method.java
  13. 0 {core/org.openjdk.jmc.agent → agent}/src/main/java/org/openjdk/jmc/agent/Parameter.java
  14. 0 {core/org.openjdk.jmc.agent → agent}/src/main/java/org/openjdk/jmc/agent/ReturnValue.java
  15. 0 {core/org.openjdk.jmc.agent → agent}/src/main/java/org/openjdk/jmc/agent/TransformDescriptor.java
  16. 0 {core/org.openjdk.jmc.agent → agent}/src/main/java/org/openjdk/jmc/agent/TransformRegistry.java
  17. 0 {core/org.openjdk.jmc.agent → agent}/src/main/java/org/openjdk/jmc/agent/Transformer.java
  18. 0 ...jdk.jmc.agent → agent}/src/main/java/org/openjdk/jmc/agent/converters/DefaultStringConverter.java
  19. 0 ...rg.openjdk.jmc.agent → agent}/src/main/java/org/openjdk/jmc/agent/converters/DoubleConverter.java
  20. 0 ...org.openjdk.jmc.agent → agent}/src/main/java/org/openjdk/jmc/agent/converters/FloatConverter.java
  21. 0 ...e/org.openjdk.jmc.agent → agent}/src/main/java/org/openjdk/jmc/agent/converters/IntConverter.java
  22. 0 .../org.openjdk.jmc.agent → agent}/src/main/java/org/openjdk/jmc/agent/converters/LongConverter.java
  23. 0 ...rg.openjdk.jmc.agent → agent}/src/main/java/org/openjdk/jmc/agent/converters/StringConverter.java
  24. 0 ...e/org.openjdk.jmc.agent → agent}/src/main/java/org/openjdk/jmc/agent/converters/package-info.java
  25. 0 ...openjdk.jmc.agent → agent}/src/main/java/org/openjdk/jmc/agent/impl/DefaultTransformRegistry.java
  26. 0 ...rg.openjdk.jmc.agent → agent}/src/main/java/org/openjdk/jmc/agent/jfr/JFRTransformDescriptor.java
  27. 0 {core/org.openjdk.jmc.agent → agent}/src/main/java/org/openjdk/jmc/agent/jfr/VersionResolver.java
  28. 0 .../org.openjdk.jmc.agent → agent}/src/main/java/org/openjdk/jmc/agent/jfr/impl/JFRClassVisitor.java
  29. 0 ...enjdk.jmc.agent → agent}/src/main/java/org/openjdk/jmc/agent/jfr/impl/JFREventClassGenerator.java
  30. 0 {core/org.openjdk.jmc.agent → agent}/src/main/java/org/openjdk/jmc/agent/jfr/impl/JFREventType.java
  31. 0 ...org.openjdk.jmc.agent → agent}/src/main/java/org/openjdk/jmc/agent/jfr/impl/JFRMethodAdvisor.java
  32. 0 {core/org.openjdk.jmc.agent → agent}/src/main/java/org/openjdk/jmc/agent/jfr/impl/JFRUtils.java
  33. 0 ...njdk.jmc.agent → agent}/src/main/java/org/openjdk/jmc/agent/jfrnext/impl/JFRNextClassVisitor.java
  34. 0 ...c.agent → agent}/src/main/java/org/openjdk/jmc/agent/jfrnext/impl/JFRNextEventClassGenerator.java
  35. 0 ...jdk.jmc.agent → agent}/src/main/java/org/openjdk/jmc/agent/jfrnext/impl/JFRNextMethodAdvisor.java
  36. 0 {core/org.openjdk.jmc.agent → agent}/src/main/java/org/openjdk/jmc/agent/jmx/AgentController.java
  37. 0 .../org.openjdk.jmc.agent → agent}/src/main/java/org/openjdk/jmc/agent/jmx/AgentControllerMBean.java
  38. 0 ...rg.openjdk.jmc.agent → agent}/src/main/java/org/openjdk/jmc/agent/jmx/AgentManagementFactory.java
  39. 0 {core/org.openjdk.jmc.agent → agent}/src/main/java/org/openjdk/jmc/agent/util/AccessUtils.java
  40. 0 ...rg.openjdk.jmc.agent → agent}/src/main/java/org/openjdk/jmc/agent/util/InspectionClassLoader.java
  41. 0 {core/org.openjdk.jmc.agent → agent}/src/main/java/org/openjdk/jmc/agent/util/TypeUtils.java
  42. 0 ...dk.jmc.agent → agent}/src/main/java/org/openjdk/jmc/agent/util/expression/ExpressionResolver.java
  43. 0 ...mc.agent → agent}/src/main/java/org/openjdk/jmc/agent/util/expression/IllegalSyntaxException.java
  44. 0 ...penjdk.jmc.agent → agent}/src/main/java/org/openjdk/jmc/agent/util/expression/ReferenceChain.java
  45. 0 ...jmc.agent → agent}/src/main/java/org/openjdk/jmc/agent/util/expression/ReferenceChainElement.java
  46. 0 ...k.jmc.agent → agent}/src/test/java/org/openjdk/jmc/agent/converters/test/GurkConverterDouble.java
  47. 0 ...dk.jmc.agent → agent}/src/test/java/org/openjdk/jmc/agent/converters/test/GurkConverterFloat.java
  48. 0 ...njdk.jmc.agent → agent}/src/test/java/org/openjdk/jmc/agent/converters/test/GurkConverterInt.java
  49. 0 ...jdk.jmc.agent → agent}/src/test/java/org/openjdk/jmc/agent/converters/test/GurkConverterLong.java
  50. 0 ...k.jmc.agent → agent}/src/test/java/org/openjdk/jmc/agent/converters/test/GurkConverterString.java
  51. 0 ...jmc.agent → agent}/src/test/java/org/openjdk/jmc/agent/converters/test/InstrumentMeConverter.java
  52. 0 ...c.agent → agent}/src/test/java/org/openjdk/jmc/agent/converters/test/TestConverterTransforms.java
  53. 0 {core/org.openjdk.jmc.agent → agent}/src/test/java/org/openjdk/jmc/agent/test/AllTests.java
  54. 0 {core/org.openjdk.jmc.agent → agent}/src/test/java/org/openjdk/jmc/agent/test/Gurka.java
  55. 0 {core/org.openjdk.jmc.agent → agent}/src/test/java/org/openjdk/jmc/agent/test/InstrumentMe.java
  56. 0 ...jdk.jmc.agent → agent}/src/test/java/org/openjdk/jmc/agent/test/TestDefaultTransformRegistry.java
  57. 0 ...rg.openjdk.jmc.agent → agent}/src/test/java/org/openjdk/jmc/agent/test/TestDefineEventProbes.java
  58. 0 ...e/org.openjdk.jmc.agent → agent}/src/test/java/org/openjdk/jmc/agent/test/TestJFRTransformer.java
  59. 0 ...org.openjdk.jmc.agent → agent}/src/test/java/org/openjdk/jmc/agent/test/TestPermissionChecks.java
  60. 0 {core/org.openjdk.jmc.agent → agent}/src/test/java/org/openjdk/jmc/agent/test/TestUtils.java
  61. 0 {core/org.openjdk.jmc.agent → agent}/src/test/java/org/openjdk/jmc/agent/test/util/TestToolkit.java
  62. 0 {core/org.openjdk.jmc.agent → agent}/src/test/java/org/openjdk/jmc/agent/test/util/TestVisitor.java
  63. 0 ...mc.agent → agent}/src/test/resources/org/openjdk/jmc/agent/converters/test/jfrprobes_template.xml
  64. 0 ...mc.agent → agent}/src/test/resources/org/openjdk/jmc/agent/test/failing_control_permission.policy
  65. 0 ...g.openjdk.jmc.agent → agent}/src/test/resources/org/openjdk/jmc/agent/test/jfrprobes_template.xml
File renamed without changes.
File renamed without changes.
File renamed without changes.
@@ -1,10 +1,10 @@
# The JMC Agent
The JMC agent is an agent currently under development to add JFR instrumentation declaratively to a running program. The agent can, for example, be used to add flight recorder events to third party code for which the source is not available.
The JMC agent allows users to add JFR instrumentation declaratively to a running program. The agent can, for example, be used to add flight recorder events to third party code for which the source is not available.

To build the agent you will need a JDK 7 or later. To run the agent, a JDK 7 or later will be needed as well.

## Building the agent
To build the agent, simply use maven in the agent folder. Since the agent is not ready for prime time yet, it is not built with the rest of the core libraries.
To build the agent, simply use maven in the agent folder.

```bash
mvn clean package
@@ -26,15 +26,11 @@ java --add-opens java.base/jdk.internal.misc=ALL-UNNAMED -XX:+FlightRecorder -ja
```

## Interacting with the agent
At runtime the agent can be used to modify the transformed state of a class. To specify a desired state, supply the defineEventProbes function with a XML description of event probes to add, keep or modify, and leave out all those that should be reverted to their preinstrumentation versions.
At runtime the agent can be used to modify the transformed state of a class. To specify a desired state, supply the defineEventProbes function with an XML description of event probes to add, keep or modify, and leave out all those that should be reverted to their pre-instrumentation versions.

### Using a security manager
When running with a security manager, the 'control' Management Permission must be granted to control the agent through the MBean. To set fine grained permissions for authenticated remote users, see [here](https://docs.oracle.com/javadb/10.10.1.2/adminguide/radminjmxenablepolicy.html#radminjmxenablepolicy) and [here](https://docs.oracle.com/javase/7/docs/technotes/guides/management/agent.html#gdeup).

## Known Issues
* The full converter support is still to be merged into the open source repo
* Support for emitting an event only on exception has yet to be implemented
* Support for reflective access to fields has yet to be implemented
* Support for emitting event even though an exception was raised in a called method (try-finally)
* XML probe definition validation (schema)
* Support for redefinitions and controlling the agent over JMX is not yet completed
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 comments on commit c752ec1

Please sign in to comment.