-
Notifications
You must be signed in to change notification settings - Fork 25
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Naming the byte array as an explicit type gives us: - one Javadoc to explain the contents - memoized `new String(bytes)` Also clean up dead code and add missing changelog.
- Loading branch information
Showing
6 changed files
with
66 additions
and
94 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
23 changes: 23 additions & 0 deletions
23
src/main/kotlin/com/atlassian/performance/tools/report/api/jfr/MutableJvmSymbol.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
package com.atlassian.performance.tools.report.api.jfr | ||
|
||
/** | ||
* JVM symbol examples: | ||
* - package names, e.g. `org/apache/tomcat/util/modeler` | ||
* - class names, e.g. `webwork/action/factory/JspActionFactoryProxy` | ||
* - method names, e.g. `compileSoy` | ||
* - method signatures, e.g. `(Lcom/google/template/soy/exprtree/ExprNode$ParentExprNode;)Ljava/util/List;` | ||
* - native function names, e.g. `AddNode::Ideal` | ||
* | ||
* To optimize JFR filtering, the byte array is not defensively copied. | ||
*/ | ||
class MutableJvmSymbol( | ||
/** | ||
* The binary representation of the JVM symbol. The bytes can be overwritten. | ||
*/ | ||
val payload: ByteArray | ||
) { | ||
|
||
private val string = String(payload) | ||
|
||
override fun toString() = string | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters