[Git][java-team/byteman][upstream] New upstream version 4.0.19
Andrius Merkys (@merkys)
gitlab at salsa.debian.org
Fri Jun 10 08:04:53 BST 2022
Andrius Merkys pushed to branch upstream at Debian Java Maintainers / byteman
Commits:
be41a137 by Andrius Merkys at 2022-06-10T02:36:41-04:00
New upstream version 4.0.19
- - - - -
21 changed files:
- agent/pom.xml
- agent/src/main/java/org/jboss/byteman/rule/expression/MethodExpression.java
- agent/src/main/java/org/jboss/byteman/rule/expression/NewExpression.java
- agent/src/main/java/org/jboss/byteman/rule/expression/ThrowExpression.java
- byteman/pom.xml
- contrib/bmunit/pom.xml
- contrib/bmunit5/pom.xml
- contrib/dtest/pom.xml
- contrib/rulecheck-maven-plugin/example/pom.xml
- contrib/rulecheck-maven-plugin/pom.xml
- docs/asciidoc/pom.xml
- docs/asciidoc/src/main/asciidoc/chapters/Using-Byteman.adoc
- docs/pom.xml
- download/pom.xml
- install/pom.xml
- jigsaw/pom.xml
- layer/pom.xml
- pom.xml
- sample/pom.xml
- submit/pom.xml
- tests/pom.xml
Changes:
=====================================
agent/pom.xml
=====================================
@@ -34,7 +34,7 @@
<parent>
<groupId>org.jboss.byteman</groupId>
<artifactId>byteman-root</artifactId>
- <version>4.0.18</version>
+ <version>4.0.19</version>
</parent>
<properties>
=====================================
agent/src/main/java/org/jboss/byteman/rule/expression/MethodExpression.java
=====================================
@@ -275,7 +275,7 @@ public class MethodExpression extends Expression
// ensure we only look at static or non static methods as appropriate
if (Modifier.isStatic(modifiers) == isStatic) {
if (method.getName().equals(name) &&
- method.getParameterTypes().length == arity) {
+ method.getParameterCount() == arity) {
candidates.add(method);
}
}
=====================================
agent/src/main/java/org/jboss/byteman/rule/expression/NewExpression.java
=====================================
@@ -143,7 +143,7 @@ public class NewExpression extends Expression
boolean duplicates = false;
for (Constructor constructor : constructors) {
- if (constructor.getParameterTypes().length == arity) {
+ if (constructor.getParameterCount() == arity) {
candidates.add(constructor);
}
}
=====================================
agent/src/main/java/org/jboss/byteman/rule/expression/ThrowExpression.java
=====================================
@@ -119,7 +119,7 @@ public class ThrowExpression extends Expression
boolean duplicates = false;
for (Constructor constructor : constructors) {
- if (constructor.getParameterTypes().length == arity) {
+ if (constructor.getParameterCount() == arity) {
candidates.add(constructor);
}
}
=====================================
byteman/pom.xml
=====================================
@@ -7,7 +7,7 @@
<parent>
<groupId>org.jboss.byteman</groupId>
<artifactId>byteman-root</artifactId>
- <version>4.0.18</version>
+ <version>4.0.19</version>
</parent>
<description>
=====================================
contrib/bmunit/pom.xml
=====================================
@@ -32,7 +32,7 @@
<parent>
<groupId>org.jboss.byteman</groupId>
<artifactId>byteman-root</artifactId>
- <version>4.0.18</version>
+ <version>4.0.19</version>
<relativePath>../../pom.xml</relativePath>
</parent>
<build>
=====================================
contrib/bmunit5/pom.xml
=====================================
@@ -32,7 +32,7 @@
<parent>
<groupId>org.jboss.byteman</groupId>
<artifactId>byteman-root</artifactId>
- <version>4.0.18</version>
+ <version>4.0.19</version>
<relativePath>../../pom.xml</relativePath>
</parent>
<build>
=====================================
contrib/dtest/pom.xml
=====================================
@@ -33,7 +33,7 @@
<parent>
<groupId>org.jboss.byteman</groupId>
<artifactId>byteman-root</artifactId>
- <version>4.0.18</version>
+ <version>4.0.19</version>
<relativePath>../../pom.xml</relativePath>
</parent>
<dependencies>
=====================================
contrib/rulecheck-maven-plugin/example/pom.xml
=====================================
@@ -18,7 +18,7 @@
<plugin>
<groupId>org.jboss.byteman</groupId>
<artifactId>byteman-rulecheck-maven-plugin</artifactId>
- <version>4.0.18</version>
+ <version>4.0.19</version>
<executions>
<execution>
<id>rulecheck-test</id>
=====================================
contrib/rulecheck-maven-plugin/pom.xml
=====================================
@@ -32,7 +32,7 @@
<parent>
<groupId>org.jboss.byteman</groupId>
<artifactId>byteman-root</artifactId>
- <version>4.0.18</version>
+ <version>4.0.19</version>
<relativePath>../../pom.xml</relativePath>
</parent>
=====================================
docs/asciidoc/pom.xml
=====================================
@@ -6,7 +6,7 @@
<parent>
<groupId>org.jboss.byteman</groupId>
<artifactId>byteman-docs</artifactId>
- <version>4.0.18</version>
+ <version>4.0.19</version>
</parent>
<artifactId>byteman-asciidoc</artifactId>
=====================================
docs/asciidoc/src/main/asciidoc/chapters/Using-Byteman.adoc
=====================================
@@ -450,6 +450,41 @@ which allow the client to inject faults into the server code then record and val
the server. Consult the Javadoc of these two API classes and the contributed package `README`
files and source code for full details.
+=== The Byteman Agent Load and Unload Lifecycle
+
+Byteman is an implementation of the JVMTI Java agent API. This API allows agent code to be run
+in parallel with normal application code and provides it with privileged access to JVM functionality
+such as querying the loaded class base, intercepting bytecode load operations or rewriting class
+bytecode, including JDK runtime class bytecode. When Byteman is installed using the `-javaagent`
+command line argument then the agent code is loaded and starts running during early bootstrap of the
+JVM. If Byteman is installed into a running JVM using `bminstall` then agent code is loaded and
+starts running at the point of install.
+
+When the Byteman agent is installed from the command line *without* specifying the `listener` option
+then the agent code injects any rules specified using the `script` option and performs no further
+actions. The injected rules cannot be unloaded. The Byteman rule engine will execute the installed
+rules every time they are triggered.
+
+When the agent is installed from the command line *with* the `listener` option or, alternatively,
+using `bminstall`, the agent starts a dedicated thread that listens for requests on a socket opened
+for the configured hostname and port number. `bmsubmit` communicates with the agent using this socket.
+The agent thread runs as a daemon and cannot be closed down. It will continue listening for requests
+until the JVM exits. This normally has no noticeable overhead as the thread is only active when
+processing `bmsubmit` requests.
+
+The agent listener thread makes it possible to add and *unload* injected rules. The Byteman rule engine
+continues to execute injected rules when they are triggered. However, unloading a rule means that the
+bytecode for affected methods is reverted to its original definition. Effectively, the method runs
+as it would have done before injection. Removing all rules returns the program to running *as if*
+Byteman were not present. Note, however, that the socket for the configured hostname and port remains
+open and the agent thread is still available to upload, query and unload further rules.
+
+A Byteman agent can only be installed once. An attempt to re-install the agent will fail. Also,
+since Byteman agent classes can only be loaded via either the system loader or the bootstrap loader,
+the agent classes cannot be unloaded. This is generally not a problem because the footprint
+of the loaded class base is quite small and the Byteman implementation does not use libraries that
+will clash with application use.
+
=== Environment Settings
The agent is sensitive to various environment settings which configure its behaviour.
=====================================
docs/pom.xml
=====================================
@@ -6,7 +6,7 @@
<parent>
<groupId>org.jboss.byteman</groupId>
<artifactId>byteman-root</artifactId>
- <version>4.0.18</version>
+ <version>4.0.19</version>
</parent>
<artifactId>byteman-docs</artifactId>
=====================================
download/pom.xml
=====================================
@@ -28,7 +28,7 @@
<parent>
<groupId>org.jboss.byteman</groupId>
<artifactId>byteman-root</artifactId>
- <version>4.0.18</version>
+ <version>4.0.19</version>
</parent>
<description>
The Byteman download includes the byteman agent, submit and install jars. the contributed
=====================================
install/pom.xml
=====================================
@@ -33,7 +33,7 @@
<parent>
<groupId>org.jboss.byteman</groupId>
<artifactId>byteman-root</artifactId>
- <version>4.0.18</version>
+ <version>4.0.19</version>
</parent>
<profiles>
=====================================
jigsaw/pom.xml
=====================================
@@ -41,7 +41,7 @@
<parent>
<groupId>org.jboss.byteman</groupId>
<artifactId>byteman-root</artifactId>
- <version>4.0.18</version>
+ <version>4.0.19</version>
</parent>
<properties>
<!-- don't install or deploy this jar, instead use it to
=====================================
layer/pom.xml
=====================================
@@ -36,7 +36,7 @@
<parent>
<groupId>org.jboss.byteman</groupId>
<artifactId>byteman-root</artifactId>
- <version>4.0.18</version>
+ <version>4.0.19</version>
</parent>
<build>
<plugins>
=====================================
pom.xml
=====================================
@@ -33,7 +33,7 @@
into Java application and JVM runtime methods. Its primary purpose is to support execution tracing and fault
injection testing.
</description>
- <version>4.0.18</version>
+ <version>4.0.19</version>
<name>byteman-root</name>
<url>http://www.jboss.org/byteman</url>
@@ -106,7 +106,7 @@
<!-- for testing: command line args to enable debugger and verbose trace -->
<debug.args>-agentlib:jdwp=transport=dt_socket,server=y,suspend=y,address=5005 -Dorg.jboss.byteman.verbose</debug.args>
<!-- asm release version to use -->
- <asm.version>9.2</asm.version>
+ <asm.version>9.3</asm.version>
<!-- maven-verification-plugin -->
<tests.verification.file>access-verification.xml</tests.verification.file>
<agent.verification.file>verification.xml</agent.verification.file>
=====================================
sample/pom.xml
=====================================
@@ -28,7 +28,7 @@
<parent>
<groupId>org.jboss.byteman</groupId>
<artifactId>byteman-root</artifactId>
- <version>4.0.18</version>
+ <version>4.0.19</version>
</parent>
<description>
The Byteman sample jar contains some example helper classes and auxiliary classes used by the]
=====================================
submit/pom.xml
=====================================
@@ -33,7 +33,7 @@
<parent>
<groupId>org.jboss.byteman</groupId>
<artifactId>byteman-root</artifactId>
- <version>4.0.18</version>
+ <version>4.0.19</version>
</parent>
<build>
<plugins>
=====================================
tests/pom.xml
=====================================
@@ -7,7 +7,7 @@
<parent>
<groupId>org.jboss.byteman</groupId>
<artifactId>byteman-root</artifactId>
- <version>4.0.18</version>
+ <version>4.0.19</version>
</parent>
<description>
View it on GitLab: https://salsa.debian.org/java-team/byteman/-/commit/be41a13730a33dcbd8a0a4effa76b7aa5599512c
--
View it on GitLab: https://salsa.debian.org/java-team/byteman/-/commit/be41a13730a33dcbd8a0a4effa76b7aa5599512c
You're receiving this email because of your account on salsa.debian.org.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://alioth-lists.debian.net/pipermail/pkg-java-commits/attachments/20220610/f823abbc/attachment.htm>
More information about the pkg-java-commits
mailing list