BTrace 1.3
Fixed Issues
What's New
#98 Services
Now it is possible to enhance the core BTrace functionality via external services. You can read more about it in this blog entry
#112 StatsD Integration
In addition to printing the output to stdout or an external file it is now possible to use statsd backend to process the metrics. Read more in blog
Sampled Tracing
Capturing and timing all the method invocations is a great way of obtaining a relatively precise application performance profile. Unless you need to do that for short and frequently called methods, that is. In those cases sampled tracing will come very handy.
#95 String concatenation via "+"
In addition to BTraceUtils.strcat(str1, str2) it is now possible to use more standard str1 + str2
Therefore, println("Hello" + "world") is a valid BTrace statement.
Improved Launchers
Some BTrace launchers (btrace and btracer) received a facelift allowing them to receive and process various command line options.
btrace
| Option | Description |
|---|---|
| --version | Show the version |
| -v | Run in verbose mode |
| -u | Run in unsafe mode |
| -d <path> | Dump the instrumented classes to the specified path |
| -pd <path> | The search path for the probe XML descriptors |
| -classpath <path> | Specify where to find user class files and annotation processors |
| -cp <path> | Specify where to find user class files and annotation processors |
| -I <path> | Specify where to find include files |
| -p <port> | Specify port to which the btrace |
btracer
| Option | Description |
|---|---|
| --version | Show BTrace version |
| -v | Run in verbose mode |
| -u | Run in unsafe mode |
| -p | BTrace agent server port |
| -statsd <host>[:<port>] | Use this StatsD server |
| -o <file> | The path to a file the btrace agent will store its output |
| -d <path> | Dump modified classes to the provided location |
| -pd <lpath> | Search for the probe XML descriptors here |
| --noserver | Don't start the socket server |
| --stdout | Redirect the btrace output to stdout instead of writing it to an arbitrary file |
| -bcp <cp> | Append to bootstrap class path |
| -scp <cp> | Append to system class path |
| -h | This message |
#118 Gradle
A great contribution from Thomas Mohme. Thanks to this it is now possible to use Gradle to build and test BTrace.
cd <btrace>
# build the project
./gradlew --daemon assemble
# run tests
./gradlew --daemon check
# build distributions
./gradlew --daemon buildDistributionsPerformance Improvements
A bunch of performance improvements in the BTrace core have been delivered
- #67 Unbounded queue used for dispatching commands may slow down application
- #90 Optimize the BTraceRuntime.enter/leave/get() methods
- #92 Replace Collections.synchronizedMap() with ConcurrentHashMap in BTraceRuntime
- #93 FileClient issues flush() after each single data command store
- #94 WireIO flushes after each command
- #109 Improve performance of MethodInvocationProfiler
DEB and RPM Packaging
BTrace is available as DEB and RPM packages.