BTrace - a safe, dynamic tracing tool for the Java platform

Overview

Dev build Download codecov.io huhu Join the chat at https://gitter.im/jbachorik/btrace Project Stats

btrace

A safe, dynamic tracing tool for the Java platform

Version

2.1.0

Quick Summary

BTrace is a safe, dynamic tracing tool for the Java platform.

BTrace can be used to dynamically trace a running Java program (similar to DTrace for OpenSolaris applications and OS). BTrace dynamically instruments the classes of the target application to inject tracing code ("bytecode tracing").

Credits

Building BTrace

Setup

You will need the following applications installed

  • Git
  • JDKs - JDK 8, Java 9 and Java 11 are required to be available
  • (optionally, the default launcher is the bundled gradlew wrapper) Gradle

In order to ease the pre-build config the config_build.sh script is provided. You should run it first as source config_build.sh to automatically download all required JDKs and set up the corresponding JAVA_*_HOME env variables.

Build

Java

Your JAVA_HOME must point to JDK 11 (eg. JAVA_11_HOME)

Gradle

cd <btrace>
./gradlew build
./gradlew buildDistributions

The binary dist packages can be found in <btrace>/btrace-dist/build/distributions as the *.tar.gz, *.zip, *.rpm and *.deb files. The exploded binary folder which can be used right away is located at <btrace>/btrace-dist/build/resources/main which serves as the BTRACE_HOME location.

Using BTrace

Installation

Download a distribution file from the release page. Explode the binary distribution file (either *.tar.gz or *.zip) to a directory of your choice.

You may set the system environment variable BTRACE_HOME to point to the directory containing the exploded distribution.

You may enhance the system environment variable PATH with $BTRACE_HOME/bin for your convenience.

Or, alternatively, you may install one of the *.rpm or *.deb packages

Running

  • <btrace>/bin/btrace <PID> <trace_script> will attach to the java application with the given PID and compile and submit the trace script
  • <btrace>/bin/btracec <trace_script> will compile the provided trace script
  • <btrace>/bin/btracer <compiled_script> <args to launch a java app> will start the specified java application with the btrace agent running and the script previously compiled by btracec loaded

For the detailed user guide, please, check the Wiki.

Maven Integration

The maven plugin is providing easy compilation of BTrace scripts as a part of the build process. As a bonus you can utilize the BTrace Project Archetype to bootstrap developing BTrace scripts.

Contributing - !!! Important !!!

Pull requests can be accepted only from the signers of Oracle Contributor Agreement

Deb Repository

Using the command line, add the following to your /etc/apt/sources.list system config file:

echo "deb http://dl.bintray.com/btraceio/deb xenial universe" | sudo tee -a /etc/apt/sources.list

Or, add the repository URLs using the "Software Sources" admin UI:

deb http://dl.bintray.com/btraceio/deb xenial universe

RPM Repository

Grab the *.repo file wget https://bintray.com/btraceio/rpm/rpm -O bintray-btraceio-rpm.repo and use it.

Comments
  • how to trace a application which is run by using a tcserver which runs tomcat inbuilt

    how to trace a application which is run by using a tcserver which runs tomcat inbuilt

    i want to trace a application which is run by using a tcserver. But it is not allowing the btrace to connect with the port. Normal tomcat applications are being traced but the application which use tcserver is not possible to trace. #168 is the type of error i am getting when i try to trace the application with tcserver. I tried to print the debug information while running the applicaiton and i am getting the following result DEBUG: accepting port 2024 DEBUG: assuming default classpath '.' . . . . DEBUG: loaded /usr/java/btracebin/build/btrace-agent.jar DEBUG: registering shutdown hook DEBUG: registering signal handler for SIGINT DEBUG: submitting the BTrace program DEBUG: opening socket to 2024 DEBUG: server not yet available; retrying ... DEBUG: server not yet available; retrying ... DEBUG: server not yet available; retrying ... DEBUG: server not yet available; retrying ... DEBUG: server not yet available; retrying ... DEBUG: server not yet available; retrying ... DEBUG: server not yet available; retrying ... DEBUG: server not yet available; retrying ... . . . . . . . DEBUG: server not yet available; retrying ... DEBUG: server not yet available; retrying ... DEBUG: server not yet available; retrying ... DEBUG: server not yet available; retrying ... Exception in thread "main" java.lang.NullPointerException at com.sun.btrace.client.Client.submit(Client.java:353) at com.sun.btrace.client.Main.main(Main.java:189) DEBUG: sending exit command Exception in thread "Thread-0" java.lang.IllegalStateException at com.sun.btrace.client.Client.send(Client.java:458) at com.sun.btrace.client.Client.sendExit(Client.java:392) at com.sun.btrace.client.Main$2.run(Main.java:226) at java.lang.Thread.run(Thread.java:745)

    opened by AbhishekPuligundla 28
  • Bug: java.lang.VerifyError: Bad type on operand stack

    Bug: java.lang.VerifyError: Bad type on operand stack

    I think this issue is related to: #160

    I have been using BTrace to trace a Java application, my BTrace script/class is:

        package com.negafinity.btrace;
        
        import com.sun.btrace.BTraceUtils;
        import com.sun.btrace.Profiler;
        import com.sun.btrace.annotations.BTrace;
        import com.sun.btrace.annotations.Duration;
        import com.sun.btrace.annotations.Kind;
        import com.sun.btrace.annotations.Location;
        import com.sun.btrace.annotations.OnMethod;
        import com.sun.btrace.annotations.OnTimer;
        import com.sun.btrace.annotations.ProbeMethodName;
        import com.sun.btrace.annotations.Property;
        
        @BTrace
        public class Logger
        {
        	@Property
        	static Profiler profiler = BTraceUtils.Profiling.newProfiler();
        
        	@OnMethod(clazz = "/^(?!sun|java).*$/", method = "/.*/")
        	public static void entry(@ProbeMethodName(fqn = true) String probeMethod)
        	{
        		BTraceUtils.Profiling.recordEntry(profiler, probeMethod);
        	}
        
        	@OnMethod(clazz = "/^(?!sun|java).*$/", method = "/.*/", location = @Location(value = Kind.RETURN))
        	public static void exit(@ProbeMethodName(fqn = true) String probeMethod, @Duration long duration)
        	{
        		BTraceUtils.Profiling.recordExit(profiler, probeMethod, duration);
        	}
        
        	@OnTimer(300000)
        	public static void timer()
        	{
        		BTraceUtils.println("Logging Time: " + BTraceUtils.Time.millis() + " " + BTraceUtils.timestamp());
        		BTraceUtils.Profiling.printSnapshot("Profiler Output:", profiler);
        	}
        }
    

    The issue I'm having is while the application is running, it sometimes crashes with this exception:

        java.lang.VerifyError: Bad type on operand stack
        Exception Details:
          Location:
            com/pixelmonmod/pixelmon/entities/pixelmon/helpers/EvolutionQuery.updateAllAround(Lcom/pixelmonmod/pixelmon/comm/packetHandlers/evolution/EvolutionStage;)V @39: getfield
          Reason:
            Type 'java/lang/Object' (current frame, stack[2]) is not assignable to 'net/minecraft/entity/EntityLivingBase'
          Current Frame:
            bci: @39
            flags: { }
            locals: { 'com/pixelmonmod/pixelmon/entities/pixelmon/helpers/EvolutionQuery', 'com/pixelmonmod/pixelmon/comm/packetHandlers/evolution/EvolutionStage', long, long_2nd, long, long_2nd, 'java/lang/Object' }
            stack: { uninitialized 33, uninitialized 33, 'java/lang/Object' }
          Bytecode:
            0x0000000: 0941 b802 8e37 0413 02ac b802 882a b400
            0x0000010: 32b6 0042 3a06 1906 c700 092a b400 323a
            0x0000020: 06bb 0007 5919 06b4 0223 1906 b402 2719
            0x0000030: 06b4 022a 1906 b402 2d14 022e b702 323a
            0x0000040: 07b2 00ba bb02 3459 2ab4 003c 2bb7 0237
            0x0000050: 1907 b602 3bb8 028e 1604 6541 1302 ac20
            0x0000060: b802 92b1                              
          Stackmap Table:
            append_frame(@33,Long,Long,Object[#4])
        
        	at com.pixelmonmod.pixelmon.entities.pixelmon.EntityPixelmon.startEvolution(EntityPixelmon.java:497)
        	at com.pixelmonmod.pixelmon.entities.pixelmon.stats.evolution.Evolution.evolve(Evolution.java:81)
        	at com.pixelmonmod.pixelmon.entities.pixelmon.stats.evolution.Evolution.handleEvolution(Evolution.java:64)
        	at com.pixelmonmod.pixelmon.entities.pixelmon.EntityPixelmon.checkEvolution(EntityPixelmon.java:549)
        	at com.pixelmonmod.pixelmon.entities.pixelmon.stats.Level.tryEvolution(Level.java:329)
        	at com.pixelmonmod.pixelmon.battles.controller.BattleControllerBase.checkEvolution(BattleControllerBase.java:845)
        	at com.pixelmonmod.pixelmon.battles.controller.BattleControllerBase.endBattleWithoutXP(BattleControllerBase.java:837)
        	at com.pixelmonmod.pixelmon.battles.controller.BattleControllerBase.forfeitBattle(BattleControllerBase.java:1039)
        	at com.pixelmonmod.pixelmon.battles.controller.BattleControllerBase.forfeitOrFlee(BattleControllerBase.java:956)
        	at com.pixelmonmod.pixelmon.battles.controller.BattleControllerBase.tryFlee(BattleControllerBase.java:936)
        	at com.pixelmonmod.pixelmon.battles.controller.BattleControllerBase.takeTurn(BattleControllerBase.java:910)
        	at com.pixelmonmod.pixelmon.battles.controller.BattleControllerBase.update(BattleControllerBase.java:352)
        	at com.pixelmonmod.pixelmon.battles.BattleRegistry.updateBattles(BattleRegistry.java:151)
        	at com.pixelmonmod.pixelmon.battles.BattleTickHandler.tickStart(BattleTickHandler.java:12)
        	at net.minecraftforge.fml.common.eventhandler.ASMEventHandler_36_BattleTickHandler_tickStart_WorldTickEvent.invoke(.dynamic)
        	at net.minecraftforge.fml.common.eventhandler.ASMEventHandler.invoke(ASMEventHandler.java:90)
        	at net.minecraftforge.fml.common.eventhandler.EventBus.post(EventBus.java:635)
        	at net.minecraftforge.fml.common.eventhandler.EventBus.post(EventBus.java:591)
        	at net.minecraftforge.fml.common.FMLCommonHandler.onPostWorldTick(FMLCommonHandler.java:269)
        	at net.minecraft.server.MinecraftServer.func_71190_q(MinecraftServer.java:718)
        	at net.minecraft.server.dedicated.DedicatedServer.func_71190_q(DedicatedServer.java:387)
        	at net.minecraft.server.MinecraftServer.func_71217_p(MinecraftServer.java:613)
        	at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:471)
        	at java.lang.Thread.run(Thread.java:745)
        
        
        A detailed walkthrough of the error, its code path and all known details is as follows:
        ---------------------------------------------------------------------------------------
        
        -- Head --
        Thread: Server thread
        Stacktrace:
        	at com.pixelmonmod.pixelmon.entities.pixelmon.EntityPixelmon.startEvolution(EntityPixelmon.java:497)
        	at com.pixelmonmod.pixelmon.entities.pixelmon.stats.evolution.Evolution.evolve(Evolution.java:81)
        	at com.pixelmonmod.pixelmon.entities.pixelmon.stats.evolution.Evolution.handleEvolution(Evolution.java:64)
        	at com.pixelmonmod.pixelmon.entities.pixelmon.EntityPixelmon.checkEvolution(EntityPixelmon.java:549)
        	at com.pixelmonmod.pixelmon.entities.pixelmon.stats.Level.tryEvolution(Level.java:329)
        	at com.pixelmonmod.pixelmon.battles.controller.BattleControllerBase.checkEvolution(BattleControllerBase.java:845)
        	at com.pixelmonmod.pixelmon.battles.controller.BattleControllerBase.endBattleWithoutXP(BattleControllerBase.java:837)
        	at com.pixelmonmod.pixelmon.battles.controller.BattleControllerBase.forfeitBattle(BattleControllerBase.java:1039)
        	at com.pixelmonmod.pixelmon.battles.controller.BattleControllerBase.forfeitOrFlee(BattleControllerBase.java:956)
        	at com.pixelmonmod.pixelmon.battles.controller.BattleControllerBase.tryFlee(BattleControllerBase.java:936)
        	at com.pixelmonmod.pixelmon.battles.controller.BattleControllerBase.takeTurn(BattleControllerBase.java:910)
        	at com.pixelmonmod.pixelmon.battles.controller.BattleControllerBase.update(BattleControllerBase.java:352)
        	at com.pixelmonmod.pixelmon.battles.BattleRegistry.updateBattles(BattleRegistry.java:151)
        	at com.pixelmonmod.pixelmon.battles.BattleTickHandler.tickStart(BattleTickHandler.java:12)
        	at net.minecraftforge.fml.common.eventhandler.ASMEventHandler_36_BattleTickHandler_tickStart_WorldTickEvent.invoke(.dynamic)
        	at net.minecraftforge.fml.common.eventhandler.ASMEventHandler.invoke(ASMEventHandler.java:90)
        	at net.minecraftforge.fml.common.eventhandler.EventBus.post(EventBus.java:635)
        	at net.minecraftforge.fml.common.eventhandler.EventBus.post(EventBus.java:591)
        	at net.minecraftforge.fml.common.FMLCommonHandler.onPostWorldTick(FMLCommonHandler.java:269)
    

    I decompiled the code that it crashed on; according to the error the most accurate one is this:

    private void updateAllAround(final EvolutionStage currentStage) {
            EntityLivingBase owner = this.pixelmon.func_70902_q();
            if (owner == null) {
                owner = (EntityLivingBase)this.pixelmon;
            }
            final NetworkRegistry.TargetPoint point = new NetworkRegistry.TargetPoint(owner.field_71093_bK, owner.field_70165_t, owner.field_70163_u, owner.field_70161_v, 60.0);
            Pixelmon.network.sendToAllAround((IMessage)new EvolvePokemon(this.pokemonID, currentStage), point);
        }
    

    Outdated

    ~~After researching the error for some time I found one that seems similar on JavaAssist's JIRA:~~

        Please see attached Eclipse project. In the JavassistErrorDemo.java if you run the program with line 64 uncommented, it works. However, including line 64 causes the program to fail with the following stack trace:
        Exception in thread "main" java.lang.VerifyError: Bad type on operand stack
        Exception Details:
        Location:
        com/javassist/test/Student$CopyExtractor.getValueList(Ljava/lang/Object;)Ljava/lang/String; @58: invokevirtual
        Reason:
        Type 'java/lang/Object' (current frame, stack[0]) is not assignable to 'com/javassist/test/GradeConverter'
        Current Frame:
        bci: @58
        flags: { }
        locals:
        { 'com/javassist/test/Student$CopyExtractor', 'java/lang/Object', 'java/lang/StringBuilder', 'com/javassist/test/Student', 'java/lang/Object' }
        stack:
        { 'java/lang/Object', 'com/javassist/test/Grade' }
        Bytecode:
        0000000: bb00 0c59 b700 104d 2bc0 0012 4e2c 2db6
        0000010: 0016 b600 1a57 2c12 1cb6 001a 572c 2db6
        0000020: 0020 b600 2357 2c12 1cb6 001a 5712 25b6
        0000030: 002b 3a04 1904 2db6 002f b600 3357 2c2d
        0000040: b600 2fb6 0036 572c b600 39b0 3a05 bb00
        0000050: 3d59 1905 b700 40bf 
        Exception Handler Table:
        bci [0, 76] => handler: 76
        Stackmap Table:
        same_locals_1_stack_item_extended(@76,Object59)
        at java.lang.Class.getDeclaredConstructors0(Native Method)
        at java.lang.Class.privateGetDeclaredConstructors(Class.java:2658)
        at java.lang.Class.getConstructor0(Class.java:2964)
        at java.lang.Class.newInstance(Class.java:403)
        at com.javassist.test.JavassistErrorDemo.makeClass(JavassistErrorDemo.java:83)
        at com.javassist.test.JavassistErrorDemo.main(JavassistErrorDemo.java:37)
    

    ~~The reply shed some light on my issue:~~

       The verification failed because the source code:
            com.javassist.test.GradeConverter c2 = com.javassist.test.GradeConverter.class.newInstance();
        
            must be
        
            com.javassist.test.GradeConverter c2 = (com.javassist.test.GradeConverter)com.javassist.test.GradeConverter.class.newInstance();
          
         Note that the cast operator is missing in the original. Although this cast is optional in Java 5 and later, the Javassist compiler assumes the source is in Java 4 (no generics!). This does not mean any performance penalties because the cast is still necessary in Java 8 at bytecode level.
           
         It is a sort of bug that Javassist does not report a type error. This design decision is just for avoiding runtime overhead.
    

    ~~So, based on this I figure the issue has to do with the fact that the Object in the code I decompiled is first set to an Entity (although in this case, it seems to be null) and then is changed to an EntityLivingBase~~

    ~~My question is, why would this be an issue when I attach BTrace to the Java application? Without my program attached, the application doesn't crash.~~

    bug Core BTRACE 
    opened by hsyyid 20
  • BTrace is crashing the applications that is attached with

    BTrace is crashing the applications that is attached with

    Even if i am using the jdk of the application it is still crashing.

    i am getting an error java.lang.reflect.InvocationTargetException

    caused by java.lang.VerifyError

    help wanted question BTRACE incomplete 
    opened by AbhishekPuligundla 20
  • Gradle adoption

    Gradle adoption

    • The easiest way to use gradle for a newcomer is "./gradlew build".
    • "./gradlew tasks" gives an overview of the available tasks (comparable to ant targets).
    • Tests should run & JAR creation should work.
    • Unaltered BTraceFunctionalTests fail on my box, because the client tries to open the socket before the server has opened it. I get around this by letting the client retry the socket creation. But changing productive code only to make a test pass is usually not a good strategy . . . (can provide debug log for this).
    • Haven't tested building on Solaris with dtrace.jar.
    • Haven't touched subproject "benchmark" because of compile problems.
    • Didn't implement uploading to external repositories. Yet, publishing to maven local should work.
    • Adding a gradle distribution task for zip & tgz creation should be fairly easy.
    • I suggest completing the gradle script and subsequently morphing the project structure to the grade/maven standard layout. This would simplify the build.
    BTRACE build 
    opened by tmohme 17
  • Btrace 2.0.2 get an error on Win10

    Btrace 2.0.2 get an error on Win10

    This issue is similar to #411. But I didn't find the solution at #411 I just use the example HelloWorld Class in docs/BTrace Tutorial

    package extra;
    abstract public class HelloWorld extends HelloWorldBase {
        protected int field = 0;
        public static void main(String[] args) throws Exception {
            System.out.println("ready when you are ...");
            System.in.read();
            callA();
        }
        private static void callA() {
            HelloWorld instance = new HelloWorldExt();
            long x = System.nanoTime();
            instance.callA("hello", 13);
            System.out.println("dur = " + (System.nanoTime() - x));
        }
        private void callA(String a, int b) {
            field++;
            callB(callC(a, b));
            field--;
        }
        private void callB(String s) {
            field++;
            System.out.println("You want " + s);
            field--;
        }
        abstract protected String callC(String a, int b);
    }
    

    and HelloWorldTrace

    package helloworld;
    import ...;
    
    @BTrace 
    public class HelloWorldTrace {
        @OnMethod(clazz="extra.HelloWorld")
        public static void onMethod(@ProbeMethodName String pmn) {
            println("Hello from method " + pmn);
        }
    }
    

    The console showed:

    ready when you are ...
    btrace INFO: "org.openjdk.btrace.core.cmdQueueLimit" not provided. Using the default cmd queue limit of 100
    btrace INFO: Can not load runtime factory: org.openjdk.btrace.runtime.BTraceRuntimeImpl_9$Factory
    btrace INFO: Can not load runtime factory: org.openjdk.btrace.runtime.BTraceRuntimeImpl_11$Factory
    he
    You want # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # hello-13
    dur = 7233700
    

    I didn't see the method names and any outputs like "println("Hello from method " + pmn);"

    Java version:

    java version "1.8.0_241"
    Java(TM) SE Runtime Environment (build 1.8.0_241-b07)
    Java HotSpot(TM) 64-Bit Server VM (build 25.241-b07, mixed mode)
    

    Btrace version:

    BTrace v.2.0.2 (6c0570ff2338a3708e90cfaad3bac80904c79633)
    

    on Windows10

    I appreciate your quick response. Thanks.

    opened by chLemon 16
  • java.lang.Error on BTraceRuntime.recordExit

    java.lang.Error on BTraceRuntime.recordExit

    After testing extensively, I was able to produce the following exception. I am not sure how this error is happening, and furthermore it appears that the try catch block that should catch an exception like this was never called.

    This error is especially odd because BTraceRuntime#recordExit shouldn't cause any issues as far as I can see.. https://github.com/hsyyid/btrace/blob/79e00d142437f4e435600851c60d5ef63dafd904/src/share/classes/com/sun/btrace/BTraceRuntime.java#L1947

    The code that it appears to be injected into is https://github.com/SpongePowered/SpongeCommon/blob/eb4dbb5e5c85306c7bd50421a7419f03b8bec15f/src/main/java/org/spongepowered/common/util/gen/AbstractBlockBuffer.java#L55

    Unsure if that has any effect.

    Any insight on why this is happening and how to prevent it would be very useful.

    (Also, no I am not able to reproduce this consistently, although I can try to see if I can)

    Thanks!

    Stacktrace:

    java.lang.Error
    	at com.sun.btrace.BTraceRuntime.recordExit(BTraceRuntime.java:1948)
    	at com.sun.btrace.BTraceUtils$Profiling.recordExit(BTraceUtils.java:5149)
    	at org.spongepowered.common.util.gen.AbstractBlockBuffer.$btrace$com$negafinity$btrace$Logger$exit(AbstractBlockBuffer.java)
    	at org.spongepowered.common.util.gen.AbstractBlockBuffer.checkRange(AbstractBlockBuffer.java:59)
    	at org.spongepowered.common.util.gen.ChunkPrimerBuffer.setBlock(ChunkPrimerBuffer.java:81)
    	at net.minecraft.world.gen.ChunkProviderOverworld.setBedrock(ChunkProviderOverworld.java:815)
    	at net.minecraft.world.gen.ChunkProviderOverworld.populate(ChunkProviderOverworld.java:803)
    	at org.spongepowered.common.world.gen.SpongeChunkGenerator.func_185932_a(SpongeChunkGenerator.java:243)
    	at net.minecraft.world.gen.ChunkProviderServer.func_186025_d(ChunkProviderServer.java:140)
    	at net.minecraft.world.World.func_72964_e(World.java:303)
    	at net.minecraft.world.World.func_175726_f(World.java:298)
    	at net.minecraft.world.WorldServer.func_180495_p(WorldServer.java:3104)
    	at net.minecraft.world.World.getBlock(World.java:4866)
    	at org.spongepowered.api.world.extent.BlockVolume.getBlock(BlockVolume.java:97)
    	at org.spongepowered.api.world.Location.getBlock(Location.java:513)
    	at org.spongepowered.common.data.property.store.common.AbstractBlockPropertyStore.getFor(AbstractBlockPropertyStore.java:98)
    	at org.spongepowered.common.data.property.PropertyStoreDelegate.getFor(PropertyStoreDelegate.java:59)
    	at net.minecraft.world.World.getProperty(World.java:6337)
    	at org.spongepowered.api.data.property.LocationBasePropertyHolder.getProperty(LocationBasePropertyHolder.java:52)
    	at org.spongepowered.api.util.blockray.BlockRay.advanceOneBlock(BlockRay.java:333)
    	at org.spongepowered.api.util.blockray.BlockRay.advance(BlockRay.java:268)
    	at org.spongepowered.api.util.blockray.BlockRay.hasNext(BlockRay.java:232)
    	at org.spongepowered.api.util.blockray.BlockRay.end(BlockRay.java:260)
    	at io.github.nucleuspowered.nucleus.modules.rtp.commands.RandomTeleportCommand$RTPTask.accept(RandomTeleportCommand.java:231)
    	at io.github.nucleuspowered.nucleus.modules.rtp.commands.RandomTeleportCommand$RTPTask.accept(RandomTeleportCommand.java:145)
    	at org.spongepowered.common.scheduler.SchedulerBase.lambda$startTask$0(SchedulerBase.java:183)
    	at org.spongepowered.common.scheduler.SchedulerBase$$Lambda$244/1173213045.run(Unknown Source)
    	at org.spongepowered.common.scheduler.SyncScheduler.executeTaskRunnable(SyncScheduler.java:81)
    	at org.spongepowered.common.scheduler.SchedulerBase.startTask(SchedulerBase.java:179)
    	at org.spongepowered.common.scheduler.SchedulerBase.processTask(SchedulerBase.java:165)
    	at org.spongepowered.common.scheduler.SchedulerBase$$Lambda$242/15679756.accept(Unknown Source)
    	at java.util.concurrent.ConcurrentHashMap$ValuesView.forEach(ConcurrentHashMap.java:4707)
    	at org.spongepowered.common.scheduler.SchedulerBase.runTick(SchedulerBase.java:108)
    	at org.spongepowered.common.scheduler.SyncScheduler.tick(SyncScheduler.java:51)
    	at org.spongepowered.common.scheduler.SpongeScheduler.tickSyncScheduler(SpongeScheduler.java:191)
    	at org.spongepowered.mod.SpongeMod.onTick(SpongeMod.java:271)
    	at net.minecraftforge.fml.common.eventhandler.ASMEventHandler_10_SpongeMod_onTick_ServerTickEvent.invoke(.dynamic)
    	at net.minecraftforge.fml.common.eventhandler.ASMEventHandler.invoke(ASMEventHandler.java:90)
    	at net.minecraftforge.fml.common.eventhandler.EventBus.post(EventBus.java:632)
    	at net.minecraftforge.fml.common.eventhandler.EventBus.post(EventBus.java:588)
    	at net.minecraftforge.fml.common.FMLCommonHandler.onPreServerTick(FMLCommonHandler.java:274)
    	at net.minecraft.server.MinecraftServer.func_71217_p(MinecraftServer.java:602)
    	at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:471)
    	at java.lang.Thread.run(Thread.java:748)
    
    
    opened by hsyyid 16
  • Problems tracing application server

    Problems tracing application server

    Hi,

    I'm trying to use BTrace to trace a Java EE Application Server, and it works fine when the classes I'm tracing are only instanced once, but when I try to trace a class that has been instanced by different ClassLoaders of differente Web Applications, I get this error in the Application Server Log:

    btrace DEBUG: retransforming loaded classes btrace DEBUG: filtering loaded classes btrace DEBUG: candidate class org.springframework.security.web.authentication.preauth.AbstractPreAuthenticatedProcessingFilter added btrace DEBUG: candidate class org.springframework.security.web.authentication.preauth.AbstractPreAuthenticatedProcessingFilter added btrace DEBUG: candidate class org.springframework.security.web.authentication.preauth.AbstractPreAuthenticatedProcessingFilter added btrace DEBUG: candidate class org.springframework.security.web.authentication.preauth.AbstractPreAuthenticatedProcessingFilter added btrace DEBUG: candidate class org.springframework.security.web.authentication.preauth.AbstractPreAuthenticatedProcessingFilter added btrace DEBUG: candidate class weblogic.servlet.internal.session.CoherenceWebSessionData added btrace DEBUG: candidate class weblogic.servlet.internal.RequestEventsFilter added btrace DEBUG: client CoherenceInvalidations$7: got com.sun.btrace.comm.RetransformationStartNotification@240cb732 btrace DEBUG: calling retransformClasses (7 classes to be retransformed) btrace DEBUG: transformed class org.springframework.security.web.authentication.preauth.AbstractPreAuthenticatedProcessingFilter btrace DEBUG: java.util.concurrent.ExecutionException: java.lang.InternalError java.util.concurrent.ExecutionException: java.lang.InternalError at java.util.concurrent.FutureTask.report(FutureTask.java:122) at java.util.concurrent.FutureTask.get(FutureTask.java:192) at com.sun.btrace.agent.Main.startServer(Main.java:487) at com.sun.btrace.agent.Main.access$000(Main.java:58) at com.sun.btrace.agent.Main$2.run(Main.java:119) at java.lang.Thread.run(Thread.java:745) Caused by: java.lang.InternalError at sun.instrument.InstrumentationImpl.retransformClasses0(Native Method) at sun.instrument.InstrumentationImpl.retransformClasses(InstrumentationImpl.java:144) at com.sun.btrace.agent.Client.retransformLoaded(Client.java:383) at com.sun.btrace.agent.Main$3.run(Main.java:506) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) at java.util.concurrent.FutureTask.run(FutureTask.java:266) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) ... 1 more

    Do you know why does this happen?

    bug help wanted Core BTRACE 
    opened by cpiment 15
  • Cannot print info to console

    Cannot print info to console

    Btrace cannot print info msg on console when using btrace pid scripts.java. but when using btrace -v pid scripts.java, the msg can be printed along with debug info.

    the trace scripts:

    
    import org.openjdk.btrace.core.annotations.BTrace;
    import org.openjdk.btrace.core.annotations.Injected;
    import org.openjdk.btrace.core.annotations.OnMethod;
    import org.openjdk.btrace.core.annotations.ProbeClassName;
    import org.openjdk.btrace.core.annotations.ProbeMethodName;
    import org.openjdk.btrace.core.annotations.Self;
    import org.openjdk.btrace.core.annotations.ServiceType;
    import org.openjdk.btrace.services.impl.Printer;
    
    import static org.openjdk.btrace.core.BTraceUtils.*;
    
    @BTrace
    public class AllMethods {
        @Injected(ServiceType.RUNTIME)
        private static Printer printer;
        @OnMethod(
            clazz="/voldemort\\.server\\..*/", 
            method="/.*/"//"${m}"
        )
        public static void m(@Self Object o, @ProbeClassName String probeClass, @ProbeMethodName String probeMethod) {
            printer.print("q");
            printer.print("entered " + probeClass);
            printer.println("." + probeMethod+"   TIME:"+ Time.millis());
        }
    }
    
    Core 
    opened by TheodoreSKong 14
  • Learning the BTrace Basics

    Learning the BTrace Basics

    Well, I've decided that since I can't get anything to work with BTrace, that I should back up and try some simple examples against a simple Java program running locally on my Windows 7. (That is, I am forgetting about trying to get btrace working against containerized Virgo Tomcat on a Linux node - that's out of my depth).

    So....I wrote a simple java program and saved it as a jar file. Its "main" method calls another method (also static) called makeFiles. makeFiles sleeps for 5 seconds and that does a File.createNewFile. It does this "forever".

    I found this example on the Web:

    import com.sun.btrace.annotations.*;
    import com.sun.btrace.BTraceUtils;
    
    @BTrace
    
    public class HelloWorld {
    @OnMethod(clazz="java.io.File",method="")
    public static void onNewFileCreated(String fileName) {
       BTraceUtils.println("New file is being created");
       BTraceUtils.println(fileName);
     }
    }
    
    I pasted it into JVisualVM where it compiles cleanly. But, after starting the jar file and seeing it appear in JVisualVM's left pane, there is no context menu entry for "Trace Application". Please note that there IS such an entry for another JVM (the one associated with the Eclipse editor). I suppose this has to do with Java versions. I started the 1.7.0_03 version of JVisualVM. The class/jar in question was compiled with 1.7.
    
    Any idea what I am doing wrong?
    
    Thanks.
    
    question 
    opened by moonlitSpider 13
  • [BTRACE-10] Porting BTrace to Maven

    [BTRACE-10] Porting BTrace to Maven

    [reporter="joachimhskeie", created="Sat, 3 Oct 2009 21:12:57 +0200"]

    I have made a first go at porting the project to Maven. I have moved classes into three subdirectories - btrace-agent, btrace-boot and btrace-client. I have tried to move the classes into the correct sub-project depending on the JAR files that are available, as well as the information in the ANT script supplied with the source.

    I am not all that familiar with HG, so I am not sure how to make a DIFF script. I have however Zipped up my project folder, which I am attaching to this issue.

    I also do not have enough experience with BTrace as of yet (I plan on starting to use it in a real project soon), so I would need someone more familiar with the project to test that the JARS built does not introduce more bugs.

    I am willing to do more work on this port if needed.

    Core BTRACE incomplete 
    opened by jbachorik 13
  • Cannot use with OpenJDK 15

    Cannot use with OpenJDK 15

    $ java -version
    openjdk version "15" 2020-09-15
    OpenJDK Runtime Environment (build 15+36-1562)
    OpenJDK 64-Bit Server VM (build 15+36-1562, mixed mode, sharing)
    
    $ bash -x /usr/local/btrace/bin/btrace -v 29164 IndexServiceTrace.java
    + '[' -z '' -o '!' -d '' ']'
    + PRG=/usr/local/btrace/bin/btrace
    ++ basename /usr/local/btrace/bin/btrace
    + progname=btrace
    ++ readlink /usr/local/btrace/bin/btrace
    + PRG=
    + '[' -z '' ']'
    + PRG=/usr/local/btrace/bin/btrace
    ++ dirname /usr/local/btrace/bin/btrace
    + BTRACE_HOME=/usr/local/btrace/bin/..
    ++ cd /usr/local/btrace/bin/..
    ++ pwd
    + BTRACE_HOME=/usr/local/btrace
    + JAVA_ARGS=-XX:+IgnoreUnrecognizedVMOptions
    + '[' -d /opt/elasticsearch/jdk/jmods ']'
    + JAVA_ARGS='-XX:+IgnoreUnrecognizedVMOptions -XX:+AllowRedefinitionToAddDeleteMethods'
    + JAVA_ARGS='-XX:+IgnoreUnrecognizedVMOptions -XX:+AllowRedefinitionToAddDeleteMethods --add-exports jdk.internal.jvmstat/sun.jvmstat.monitor=ALL-UNNAMED'
    + JAVA_ARGS='-XX:+IgnoreUnrecognizedVMOptions -XX:+AllowRedefinitionToAddDeleteMethods --add-exports jdk.internal.jvmstat/sun.jvmstat.monitor=ALL-UNNAMED --add-exports jdk.compiler/com.sun.tools.javac.processing=ALL-UNNAMED'
    + JAVA_ARGS='-XX:+IgnoreUnrecognizedVMOptions -XX:+AllowRedefinitionToAddDeleteMethods --add-exports jdk.internal.jvmstat/sun.jvmstat.monitor=ALL-UNNAMED --add-exports jdk.compiler/com.sun.tools.javac.processing=ALL-UNNAMED --add-exports jdk.compiler/com.sun.tools.javac.util=ALL-UNNAMED'
    + JAVA_ARGS='-XX:+IgnoreUnrecognizedVMOptions -XX:+AllowRedefinitionToAddDeleteMethods --add-exports jdk.internal.jvmstat/sun.jvmstat.monitor=ALL-UNNAMED --add-exports jdk.compiler/com.sun.tools.javac.processing=ALL-UNNAMED --add-exports jdk.compiler/com.sun.tools.javac.util=ALL-UNNAMED --add-exports jdk.compiler/com.sun.tools.javac.tree=ALL-UNNAMED'
    + JAVA_ARGS='-XX:+IgnoreUnrecognizedVMOptions -XX:+AllowRedefinitionToAddDeleteMethods --add-exports jdk.internal.jvmstat/sun.jvmstat.monitor=ALL-UNNAMED --add-exports jdk.compiler/com.sun.tools.javac.processing=ALL-UNNAMED --add-exports jdk.compiler/com.sun.tools.javac.util=ALL-UNNAMED --add-exports jdk.compiler/com.sun.tools.javac.tree=ALL-UNNAMED --add-exports jdk.compiler/com.sun.tools.javac.code=ALL-UNNAMED'
    + '[' -f /usr/local/btrace/libs/btrace-client.jar ']'
    + '[' -d /opt/elasticsearch/jdk ']'
    + TOOLS_JAR=/opt/elasticsearch/jdk/lib/tools.jar
    + '[' '!' -f /opt/elasticsearch/jdk/lib/tools.jar ']'
    + TOOLS_JAR=/opt/elasticsearch/jdk/../lib/tools.jar
    + '[' '!' -f /opt/elasticsearch/jdk/../lib/tools.jar ']'
    + '[' '!' -d /opt/elasticsearch/jdk/jmods ']'
    + '[' '!' -f /opt/elasticsearch/jdk/../lib/tools.jar ']'
    + '[' '!' -d /opt/elasticsearch/jdk/jmods ']'
    + /opt/elasticsearch/jdk/bin/java -XX:+IgnoreUnrecognizedVMOptions -XX:+AllowRedefinitionToAddDeleteMethods --add-exports jdk.internal.jvmstat/sun.jvmstat.monitor=ALL-UNNAMED --add-exports jdk.compiler/com.sun.tools.javac.processing=ALL-UNNAMED --add-exports jdk.compiler/com.sun.tools.javac.util=ALL-UNNAMED --add-exports jdk.compiler/com.sun.tools.javac.tree=ALL-UNNAMED --add-exports jdk.compiler/com.sun.tools.javac.code=ALL-UNNAMED -cp /usr/local/btrace/libs/btrace-client.jar:/opt/elasticsearch/jdk/../lib/tools.jar:/usr/share/lib/java/dtrace.jar org.openjdk.btrace.client.Main -v 29164 IndexServiceTrace.java
    OpenJDK 64-Bit Server VM warning: Option AllowRedefinitionToAddDeleteMethods was deprecated in version 13.0 and will likely be removed in a future release.
    DEBUG: assuming default port 2020
    DEBUG: assuming default classpath '.'
    btrace INFO: Attaching BTrace to PID: 29164
    DEBUG: compiling IndexServiceTrace.java
    DEBUG: compiled IndexServiceTrace.java
    DEBUG: Boot classpath: .
    DEBUG: attaching to 29164
    DEBUG: checking port availability: 2020
    DEBUG: attached to 29164
    DEBUG: loading /usr/local/btrace-v2.2.0-bin/libs/btrace-agent.jar
    DEBUG: agent args: port=2020,statsd=,debug=true,bootClassPath=.,systemClassPath=/opt/elasticsearch-7.9.3/jdk/lib/tools.jar,probeDescPath=.
    DEBUG: loaded /usr/local/btrace-v2.2.0-bin/libs/btrace-agent.jar
    DEBUG: registering shutdown hook
    DEBUG: registering signal handler for SIGINT
    DEBUG: submitting the BTrace program
    DEBUG: opening socket to 2020
    DEBUG: server not yet available; retrying ...
    <duplicated lines>
    DEBUG: server not yet available; retrying ...
    DEBUG: server not available. exiting.
    DEBUG: sending exit command
    Exception in thread "Thread-0" java.lang.IllegalStateException
    	at org.openjdk.btrace.client.Client.send(Client.java:678)
    	at org.openjdk.btrace.client.Client.sendExit(Client.java:600)
    	at org.openjdk.btrace.client.Main.lambda$registerExitHook$2(Main.java:303)
    	at java.base/java.lang.Thread.run(Thread.java:832)
    

    BTrace version: 2.2.0, and port 2020 is available.

    opened by Shawyeok 12
  • chore(deps): update plugin com.diffplug.spotless to v6.12.1

    chore(deps): update plugin com.diffplug.spotless to v6.12.1

    Mend Renovate

    This PR contains the following updates:

    | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | com.diffplug.spotless | 6.11.0 -> 6.12.1 | age | adoption | passing | confidence |


    Configuration

    📅 Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).

    🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

    Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

    🔕 Ignore: Close this PR and you won't be reminded about this update again.


    • [ ] If you want to rebase/retry this PR, check this box

    This PR has been generated by Mend Renovate. View repository job log here.

    opened by renovate[bot] 0
  • Dependency Dashboard

    Dependency Dashboard

    This issue lists Renovate updates and detected dependencies. Read the Dependency Dashboard docs to learn more.

    Open

    These updates have all been created already. Click a checkbox below to force a retry/rebase of any.

    Ignored or Blocked

    These are blocked by an existing closed PR and will not be recreated unless you click a checkbox below.

    Detected dependencies

    github-actions
    .github/workflows/codeql-analysis.yml
    • actions/checkout v3
    • github/codeql-action v2
    • github/codeql-action v2
    .github/workflows/continuous.yml
    • actions/setup-java v1
    • actions/setup-java v1
    • actions/setup-java v1
    • actions/checkout v3
    • gradle/gradle-build-action v2
    • actions/upload-artifact v3
    • actions/upload-artifact v3
    .github/workflows/release.yml
    • actions/checkout v3
    • actions/setup-java v1
    • actions/setup-java v1
    • actions/setup-java v1
    • actions/setup-java v1
    • actions/setup-java v1
    • softprops/action-gh-release v1
    .github/workflows/stale.yml
    • actions/stale v7
    gradle
    common.gradle
    • org.junit.jupiter:junit-jupiter-api 5.9.1
    • org.junit.jupiter:junit-jupiter-engine 5.9.1
    settings.gradle
    build.gradle
    • com.diffplug.spotless 6.11.0
    • org.ow2.asm:asm 9.4
    • org.ow2.asm:asm-tree 9.4
    • org.ow2.asm:asm-util 9.4
    benchmarks/agent-benchmark/build.gradle
    • me.champeau.jmh 0.6.8
    • org.openjdk.jmh:jmh-core 1.36
    • org.openjdk.jmh:jmh-generator-annprocess 1.36
    benchmarks/runtime-benchmarks/build.gradle
    • me.champeau.jmh 0.6.8
    • org.openjdk.jmh:jmh-core 1.36
    • org.openjdk.jmh:jmh-generator-annprocess 1.36
    btrace-agent/build.gradle
    • org.slf4j:slf4j-api 1.7.36
    btrace-client/build.gradle
    • net.nemerosa.versioning 2.15.1
    • org.slf4j:slf4j-api 1.7.36
    btrace-compiler/build.gradle
    btrace-core/build.gradle
    • net.nemerosa.versioning 2.15.1
    • org.slf4j:slf4j-api 1.7.36
    • org.slf4j:slf4j-simple 1.7.36
    • org.jctools:jctools-core 4.0.1
    btrace-dist/build.gradle
    • com.github.johnrengelman.shadow 7.1.2
    • nebula.ospackage 9.1.1
    • io.sdkman.vendors 3.0.0
    btrace-dtrace/build.gradle
    • com.github.johnrengelman.shadow 7.1.2
    btrace-instr/build.gradle
    • org.slf4j:slf4j-api 1.7.36
    • com.google.auto.service:auto-service 1.0.1
    • org.jctools:jctools-core 4.0.1
    • org.junit.jupiter:junit-jupiter-params 5.9.1
    btrace-runtime/build.gradle
    • org.slf4j:slf4j-api 1.7.36
    • org.jctools:jctools-core 4.0.1
    btrace-services/build.gradle
    btrace-services-api/build.gradle
    btrace-statsd/build.gradle
    btrace-ui/build.gradle
    • net.nemerosa.versioning 2.15.1
    integration-tests/build.gradle
    • org.junit.jupiter:junit-jupiter-params 5.9.1
    gradle-wrapper
    gradle/wrapper/gradle-wrapper.properties
    • gradle 7.6

    • [ ] Check this box to trigger a request for Renovate to run again on this repository
    opened by renovate[bot] 0
Releases(v2.2.3)
  • v2.2.3(Dec 23, 2022)

    Changelog

    v2.2.3 (2022-12-23)

    What's Changed

    • Do not synchronize on ClassCache operations by @jbachorik in https://github.com/btraceio/btrace/pull/540
    • Allow executing commands on BTrace server by @jbachorik in https://github.com/btraceio/btrace/pull/559
    • Store before-jump state for switch labels by @jbachorik in https://github.com/btraceio/btrace/pull/563
    • Use SLF4J SimpleLogger by @jbachorik in https://github.com/btraceio/btrace/pull/562
    • Make 'sun.security.action' accessible to BTraceUtils class. by @jbachorik in https://github.com/btraceio/btrace/pull/583
    • Add JDK19 to test matrix by @jbachorik in https://github.com/btraceio/btrace/pull/585
    • Bump ASM library to 9.4 by @jbachorik in https://github.com/btraceio/btrace/pull/586
    • Split functional tests into a separate integration-tests module by @jbachorik in https://github.com/btraceio/btrace/pull/587
    • Follow the class hierarchy to lookup a field by @GGGGGHT in https://github.com/btraceio/btrace/pull/584
    • Returning false if file does not end with .class by @joachimhs in https://github.com/btraceio/btrace/pull/580
    • Load only supported probe files by @jbachorik in https://github.com/btraceio/btrace/pull/588
    • Properly handle script arguments. by @jbachorik in https://github.com/btraceio/btrace/pull/593
    • Improve stack-tracking visitor robustness by @jbachorik in https://github.com/btraceio/btrace/pull/601

    New Contributors

    • @GGGGGHT made their first contribution in https://github.com/btraceio/btrace/pull/584

    Full Changelog: https://github.com/btraceio/btrace/compare/v2.2.2...v2.2.3

    Source code(tar.gz)
    Source code(zip)
    btrace-v2.2.3-bin.tar.gz(2.34 MB)
    btrace-v2.2.3-bin.zip(2.40 MB)
    btrace-v2.2.3-sdkman-bin.zip(2.40 MB)
  • v2.2.2(Mar 25, 2022)

    Changelog

    v2.2.2 (2022-03-25)

    What's Changed

    • Update dependency com.github.johnrengelman.shadow:com.github.johnrengelman.shadow.gradle.plugin to v6.1.0 by @renovate in https://github.com/btraceio/btrace/pull/436
    • Update dependency gradle to v6.8.2 by @renovate in https://github.com/btraceio/btrace/pull/439
    • Update dependency junit:junit to v4.13.2 by @renovate in https://github.com/btraceio/btrace/pull/440
    • Update dependency nebula.ospackage:nebula.ospackage.gradle.plugin to v8.5.1 by @renovate in https://github.com/btraceio/btrace/pull/442
    • Update actions/stale action to v3 by @renovate in https://github.com/btraceio/btrace/pull/447
    • Update dependency org.openjdk.jmh:jmh-core to v1.27 by @renovate in https://github.com/btraceio/btrace/pull/445
    • Update dependency org.jctools:jctools-core to v3.2.0 by @renovate in https://github.com/btraceio/btrace/pull/444
    • Update dependency com.google.auto.service:auto-service to v1.0-rc7 by @renovate in https://github.com/btraceio/btrace/pull/438
    • Update dependency me.champeau.gradle.jmh:me.champeau.gradle.jmh.gradle.plugin to v0.5.3 by @renovate in https://github.com/btraceio/btrace/pull/441
    • Update dependency com.github.sherter.google-java-format:com.github.sherter.google-java-format.gradle.plugin to v0.9 by @renovate in https://github.com/btraceio/btrace/pull/437
    • Update dependency org.openjdk.jmh:jmh-generator-annprocess to v1.27 by @renovate in https://github.com/btraceio/btrace/pull/446
    • Update dependency org.jctools:jctools-core to v3.3.0 by @renovate in https://github.com/btraceio/btrace/pull/453
    • Update dependency gradle to v6.8.3 by @renovate in https://github.com/btraceio/btrace/pull/450
    • Update dependency nebula.ospackage:nebula.ospackage.gradle.plugin to v8.5.6 by @renovate in https://github.com/btraceio/btrace/pull/454
    • Update dependency org.openjdk.jmh:jmh-generator-annprocess to v1.29 by @renovate in https://github.com/btraceio/btrace/pull/457
    • Update dependency org.openjdk.jmh:jmh-core to v1.28 by @renovate in https://github.com/btraceio/btrace/pull/452
    • Update dependency me.champeau.jmh:me.champeau.jmh.gradle.plugin to v0.6.3 by @renovate in https://github.com/btraceio/btrace/pull/459
    • Update dependency nebula.ospackage:nebula.ospackage.gradle.plugin to v8.5.6 by @renovate in https://github.com/btraceio/btrace/pull/449
    • Update dependency net.nemerosa.versioning:net.nemerosa.versioning.gradle.plugin to v2.14.0 by @renovate in https://github.com/btraceio/btrace/pull/443
    • Update dependency org.openjdk.jmh:jmh-core to v1.29 by @renovate in https://github.com/btraceio/btrace/pull/460
    • Set the actual local port number to btrace.port system property by @trustin in https://github.com/btraceio/btrace/pull/461
    • Update dependency com.google.auto.service:auto-service to v1.0 by @renovate in https://github.com/btraceio/btrace/pull/463
    • Update junit5 monorepo to v5.7.2 by @renovate in https://github.com/btraceio/btrace/pull/472
    • Update dependency gradle to v6.9 by @renovate in https://github.com/btraceio/btrace/pull/471
    • Update dependency org.openjdk.jmh:jmh-core to v1.31 by @renovate in https://github.com/btraceio/btrace/pull/469
    • Update dependency org.openjdk.jmh:jmh-generator-annprocess to v1.31 by @renovate in https://github.com/btraceio/btrace/pull/470
    • Update dependency me.champeau.jmh:me.champeau.jmh.gradle.plugin to v0.6.4 by @renovate in https://github.com/btraceio/btrace/pull/467
    • Update actions/stale action to v4 by @renovate in https://github.com/btraceio/btrace/pull/485
    • Update dependency io.sdkman.vendors:io.sdkman.vendors.gradle.plugin to v3 by @renovate in https://github.com/btraceio/btrace/pull/481
    • Update dependency org.openjdk.jmh:jmh-core to v1.32 by @renovate in https://github.com/btraceio/btrace/pull/475
    • Update dependency org.openjdk.jmh:jmh-generator-annprocess to v1.32 by @renovate in https://github.com/btraceio/btrace/pull/476
    • Update dependency me.champeau.jmh:me.champeau.jmh.gradle.plugin to v0.6.5 by @renovate in https://github.com/btraceio/btrace/pull/474
    • Upgrade Gradle to 7.2 by @jbachorik in https://github.com/btraceio/btrace/pull/503
    • Use the shared settings initialized from the command line argument. by @jbachorik in https://github.com/btraceio/btrace/pull/505
    • Update dependency org.openjdk.jmh:jmh-core to v1.33 by @renovate in https://github.com/btraceio/btrace/pull/487
    • Update plugin nebula.ospackage to v8.6.3 by @renovate in https://github.com/btraceio/btrace/pull/494
    • Update plugin net.nemerosa.versioning to v2.15.1 by @renovate in https://github.com/btraceio/btrace/pull/495
    • Update plugin com.github.johnrengelman.shadow to v7 by @renovate in https://github.com/btraceio/btrace/pull/497
    • Update plugin me.champeau.jmh to v0.6.6 by @renovate in https://github.com/btraceio/btrace/pull/500
    • Update junit5 monorepo to v5.8.2 by @renovate in https://github.com/btraceio/btrace/pull/501
    • Update plugin nebula.ospackage to v9 by @renovate in https://github.com/btraceio/btrace/pull/502
    • Update dependency com.google.auto.service:auto-service to v1.0.1 by @renovate in https://github.com/btraceio/btrace/pull/504
    • Update dependency gradle to v7.3.2 by @renovate in https://github.com/btraceio/btrace/pull/506
    • Update dependency org.openjdk.jmh:jmh-generator-annprocess to v1.33 by @renovate in https://github.com/btraceio/btrace/pull/513
    • Add JDK 17 to the test matrix by @jbachorik in https://github.com/btraceio/btrace/pull/519
    • Update dependency gradle to v7.3.3 by @renovate in https://github.com/btraceio/btrace/pull/514
    • Update dependency org.openjdk.jmh:jmh-core to v1.34 by @renovate in https://github.com/btraceio/btrace/pull/515
    • Update dependency org.openjdk.jmh:jmh-generator-annprocess to v1.34 by @renovate in https://github.com/btraceio/btrace/pull/516
    • Update plugin com.github.johnrengelman.shadow to v7.1.2 by @renovate in https://github.com/btraceio/btrace/pull/520
    • Update plugin nebula.ospackage to v9.1.0 by @renovate in https://github.com/btraceio/btrace/pull/521
    • Do not use javac internals by @thurka in https://github.com/btraceio/btrace/pull/524

    New Contributors

    • @trustin made their first contribution in https://github.com/btraceio/btrace/pull/461
    • @thurka made their first contribution in https://github.com/btraceio/btrace/pull/524

    Full Changelog: https://github.com/btraceio/btrace/compare/v2.1.0...v2.2.2

    Source code(tar.gz)
    Source code(zip)
    btrace-v2.2.2-bin.tar.gz(2.10 MB)
    btrace-v2.2.2-bin.zip(2.15 MB)
    btrace-v2.2.2-sdkman-bin.zip(2.15 MB)
  • v2.2.1(Dec 26, 2021)

    Changelog

    v2.2.0 (2021-12-26)

    Full Changelog

    Fixed issues:

    • Instance classes don't work in JDK11 #482
    • git clone not successful #478
    • Cant start btrace because of wrong windows script #491\
    • BTrace probe's output is not being redirected for the first connection #498
    • [Performance Bug Report] Specific input cause time differences in CallGraph.java #489
    • Explicit method descriptor matching does not work properly for overloaded methods #509
    • JFR event definition category is not working #510
    • Add JFR event support to JDK 8 #511\
    • Return type is ignored in the 'type' check #517
    Source code(tar.gz)
    Source code(zip)
    btrace-v2.2.1-bin.tar.gz(2.10 MB)
    btrace-v2.2.1-bin.zip(2.15 MB)
    btrace-v2.2.1-sdkman-bin.zip(2.15 MB)
  • v2.2.0(Apr 3, 2021)

  • v2.1.0(Jan 24, 2021)

  • v2.0.3(Nov 7, 2020)

  • v2.0.2(May 24, 2020)

    Changelog

    v2.0.2 (2020-05-24)

    Full Changelog

    Fixed issues:

    • @OnMethod with @Location(RETURN) and @Level causes NoSuchFieldError: $btrace$$level #419
    • Traced application can deadlock on exit #417
    • Cannot print info to console #416
    • compiled failed with "Could not target platform: 'Java SE 11' using tool chain: 'JDK 9 (1.9)'." #404
    • java.lang.VerifyError: Inconsistent stackmap frames at branch target 475 with Btrace 2.0 #401
    • Unable to open socket file: target process not responding or HotSpot VM not loaded #395

    Closed issues:

    • Btracec compiled failure with IBM-JDK #403
    • I am interested in why don't provide a method in BTraceUtils to println all fields of an object? #285
    • QUESTION: How to expose Aggregation details through MBean? #270
    • visible example #217
    • Feature Request: Add tracing of native methods #115
    • [BTRACE-78] Ability to find values of local variables when reaching specific line number using @Location #25
    • Can't track object creation #356
    • can btrace implement hot swap? #346
    • Collect stacks from AsyncGetCallTrace #310
    • Replace the legacy profiling infrastructure with HDRHistogram #297
    • No console output if not in verbose mode #254
    • [BTRACE-74] Make it easier to write a BTrace script which detects concurrent access to an object. #77
    • [BTRACE-107] Kind.CALL event missed #70
    • [BTRACE-121] Kind.CALL support for overlapping instrumentation is not optimal #69
    • [BTRACE-116] Optimize access to the current BTrace runtime in the injected handler methods #68
    • [BTRACE-54] Object count for instrumented classes #38

    * This Changelog was automatically generated by github_changelog_generator

    Source code(tar.gz)
    Source code(zip)
    btrace-2.0.2-bin.tar.gz(3.30 MB)
    btrace-2.0.2-bin.zip(3.35 MB)
    btrace-2.0.2-sdkman-bin.zip(3.35 MB)
  • v2.0.1(Apr 19, 2020)

    Changelog

    v2.0.1 (2020-04-19)

    Full Changelog

    Closed issues:

    • Compilation fail on windows 10 x64 #413
    • Wiki imports don't work with openjdk #410
    • a bug in btrace script? #408
    • ArrayIndexOutOfBoundsException in VariableMapper #377
    • Does this support OpenJdk11? #374
    • Allow attaching to a JVM by its name #402

    * This Changelog was automatically generated by github_changelog_generator

    Source code(tar.gz)
    Source code(zip)
    btrace-2.0.1-bin.tar.gz(3.26 MB)
    btrace-2.0.1-bin.zip(3.31 MB)
    btrace-2.0.1-sdkman-bin.zip(3.31 MB)
  • v2.0.0(Feb 12, 2020)

    Changelog

    2.0.0

    Full Changelog

    Implemented enhancements:

    • JPMS support (Java 9, 10 and 11) #374

    Fixed bugs:

    • Starting 2 different Btrace processes in 1 server ran into infinite loop? #396
    • ArrayIndexOutOfBoundsException in VariableMapper #377
    • sometimes ctrl-c and select exit will cause jvm throw java.lang.NoSuchMethodError and crash #344
    • Problematic remapping of variable slots originally taken by padding #341
    • tracing using compiled script may not work #381
    • btrace WARNING: java.lang.ArrayIndexOutOfBoundsException: 11818 #387

    * This Changelog was automatically generated by github_changelog_generator

    Source code(tar.gz)
    Source code(zip)
    btrace-bin.tar.gz(3.25 MB)
    btrace-bin.zip(3.30 MB)
  • v1.3.11.3(Dec 17, 2018)

  • v1.3.11.2(Dec 2, 2018)

    v1.3.11.2 (2018-12-02)

    Binaries also available from bintray.com

    Full Changelog

    Fixed bugs:

    • Caused by: java.lang.VerifyError: Bad local variable type #262
    • Relax class transformation synchronization #369
    • ArrayIndexOutOfBoundsException: 8 at InstrumentingMethodVisitor.java:1337 #367
    • java.lang.ClassCastException: java.lang.Integer cannot be cast to java.lang.String #333

    Closed issues:

    • onThrow.java sample not working #370
    • AllMethod regex not working #368
    • Stucked when executes ./gradlew build under jdk1.7.0_80 #352

    Merged pull requests:

    * This Change Log was automatically generated by github_changelog_generator

    Source code(tar.gz)
    Source code(zip)
    btrace-bin-1.3.11.2.tgz(1.46 MB)
    btrace-bin-1.3.11.2.zip(1.51 MB)
  • v1.3.11.1(Sep 1, 2018)

    v1.3.11.1 (2018-09-01)

    Full Changelog

    Fixed bugs:

    • Problematic remapping of variable slots originally taken by padding #341
    • @Location(value = Kind.ERROR) changes the execution path in case the error is catched and not thrown in code #335
    • StringIndexOutOfBoundsException on 1.3.10+ #357
    • Retransformation should ignore IllegalStateException if a webapp is stopped in a countainer #351
    • ./gradlew buildDistribution can not resolve nebula.ospackage #350
    • java.util.concurrent.ExecutionException: java.lang.IllegalArgumentException #349
    • Invalid 'libs' configuration [null] #347
    • Template extraction is broken for values ending with "$" #345
    • NoClassDefFoundError #343
    • java.lang.NoClassDefFoundError: Test$1 #332
    • regex matching not working #340
    • Agent defined named properties ignored for dynamically attached agents #336

    Closed issues:

    • Could I use btrace to track methods in sun.misc.Unsafe? #348
    • How to install btrace on visualVM #342
    • The lastest version code contrains errors when execute "./gradlew build" with jdk1.8.0_162 and gradle 4.7 #334
    • Not able to see any stack trace related to my btrace #331
    • my java script is too Bigger,can't run #325
    • Location(kind = Kind.NEWARRAY) dimension always 1 #318
    • how to run CRNK application with jersey Example #314
    • BTraceUtils.str don't invoke toString() when instance is not in a collection. #226

    * This Change Log was automatically generated by github_changelog_generator

    Source code(tar.gz)
    Source code(zip)
    btrace-bin-1.3.11.1.tgz(1.46 MB)
    btrace-bin-1.3.11.1.zip(1.51 MB)
  • v1.3.11(Apr 6, 2018)

    Change Log

    Full Changelog

    New Features and Improvements

    • Provide JVM startup agent arguments via Sys.$(arg) #295
    • Passing the class name dynamically to clazz parameter in BTrace script #298
    • Invalid 'libs' argument should be detected and logged as warning #320
    • BTraceUtils.printArray() should accept also primitive arrays #322
    • Provide support for method parameters for CATCH, THROW and ERROR #327
    • Allow specifying file extension for BTrace script packs #329

    Fixed bugs:

    • Impossible to build btrace with jdk1.7(jdk1.8 works fine) #323
    • BTraceUtils.subtsr() parameter 'length' name is confusing #279

    * This Change Log was automatically generated by github_changelog_generator

    Source code(tar.gz)
    Source code(zip)
    btrace-bin-1.3.11.tgz.tar.gz(1.45 MB)
    btrace-bin-1.3.11.zip(1.49 MB)
  • v1.3.10.2(Jan 22, 2018)

  • v1.3.10.1(Dec 15, 2017)

  • v1.3.10(Nov 21, 2017)

    Full Changelog

    Implemented enhancements:

    • Allow exact type matching in signature checks #294
    • Implement custom stackmap frame generation to avoid common supertype resoultions #293
    • Pre-process and pre-verify BTrace probes during compilation #291
    • Improve handling of the 'category' for embedded agent.properties #273

    Fixed bugs:

    • Bug: java.lang.VerifyError: Bad type on operand stack #283
    • SYNC_ENTRY/EXIT instrumentor broken after #264 #269
    • btrace doesn't execute OnExit event #266
    • synchronized on method synExit never trigger! #264

    Closed issues:

    • Update JCTools to 2.1.1 #302
    • Btrace failed in openjdk8 due to SecurityException #296
    • Running JVM with BTrace agent and scripts should default 'noServer' to true #289
    • Application running on jdk 1.7.0_79 crash when btrace attach #284
    • NoClassDefFoundError of <TraceScript> in JBoss EAP7 #282
    • Issue about buffer flushing. #281
    • cannot get instance property #280
    • traced method by annotation is not working well #278
    • Got java.lang.IllegalArgumentException after starting the btrace #277
    • java.lang.NoClassDefFoundError: sun/reflect/GeneratedMethodAccessor #275
    • Missing information about time units for the duration reported by @Duration annotated parameter #265

    Merged pull requests:

    Source code(tar.gz)
    Source code(zip)
    btrace-bin-1.3.10.tgz(1.45 MB)
    btrace-bin-1.3.10.zip(1.50 MB)
  • v1.3.9(Jan 11, 2017)

    Change Log v1.3.9 (2017-01-11)

    Full Changelog

    Implemented enhancements:

    • Add more substitutions for output file name templating #261
    • Add support for configuration in 'agent.properties' #260
    • Introduce convention for agent libs locations #259
    • Make BTrace less scary by using 'trusted' mode instead of 'unsafe' #258
    • BTrace causes JVM to crash on call tracing #240

    Fixed bugs:

    • Quantize throws java.lang.ArrayIndexOutOfBoundsException #253
    • Specifying a method by annotation will not match in @OnMethod #249
    • Problems tracing application server #231

    Closed issues:

    • Improve BTrace startup time #263
    • Invoking methods on injected services is causing verification error #256
    • How to print the local variable #255
    • Tracing all object allocations #252
    • fail to use btrace with 1.7.0_80 on mac #251
    • Get Broken Pipe SocketException after exit brace. #250

    * This Change Log was automatically generated by github_changelog_generator

    Source code(tar.gz)
    Source code(zip)
    btrace-bin-1.3.9.tgz(1.06 MB)
    btrace-bin-1.3.9.zip(1.11 MB)
  • v1.3.8.2(Sep 21, 2016)

    Change Log (v1.3.8.2)

    Full Changelog

    Fixed bugs:

    • Unnecessary processing of methods not passing through instrumentation filter #245
    • Application can hang on exit when using static BTrace agent #244
    • BTrace agent connection not properly shut down when leaving the dynamically attached session #239

    Closed issues:

    • FAILURE: Build failed with an exception #242

    Merged pull requests:

    • Several micro-optimizations on the instrumentation critical path #246 (jbachorik)

    * This Change Log was automatically generated by github_changelog_generator

    Source code(tar.gz)
    Source code(zip)
    btrace-1.3.8.2.noarch.rpm(950.55 KB)
    btrace-bin-1.3.8.2.tgz(992.78 KB)
    btrace-bin-1.3.8.2.zip(1.01 MB)
    btrace_1.3.8.2_all.deb(948.58 KB)
  • v1.3.8.1(Aug 9, 2016)

  • v1.3.8(Aug 5, 2016)

    Change Log (v1.3.8)

    Full Changelog

    Implemented enhancements:

    • Allow also augmenting the 'script' parameter from the agent.properties #235

    Closed issues:

    • NPE in logs when trying to run unsafe script without unsafe mode enabled #237
    • Verifier does not allow simple 'return' from handler methods. #236
    • java.lang.ArrayIndexOutOfBoundsException when connecting to JVM #234
    • AllCalls1Sampled.java cause the target process to throw NullPointerException #228

    Merged pull requests:

    • Print toString() of all exceptions in the chain. #233 (draghuram)

    * This Change Log was automatically generated by github_changelog_generator

    Source code(tar.gz)
    Source code(zip)
    btrace-1.3.8.noarch.rpm(949.95 KB)
    btrace-bin-1.3.8.tgz(992.50 KB)
    btrace-bin-1.3.8.zip(1.01 MB)
    btrace_1.3.8_all.deb(948.30 KB)
  • v1.3.7(May 10, 2016)

  • v1.3.6(Apr 24, 2016)

    Change Log

    v1.3.6

    Full Changelog

    Implemented enhancements:

    • Allow bundling agent default arguments in attached jar files #219
    • Allow bundling probe descriptors #216

    Fixed bugs:

    • Javac compilation error messages are lost when using 'btracec' #215
    • @TargetMethodOrField(fqn = true) not working with Kind.CALL + Where.AFTER #213

    Closed issues:

    • how can know which class load #218
    • Usage of @Self and @TargetInstance when probing static methods #212
    • Cannot build with Gradle #210

    Merged pull requests:

    * This Change Log was automatically generated by github_changelog_generator

    Source code(tar.gz)
    Source code(zip)
    btrace-1.3.6.noarch.rpm(949.53 KB)
    btrace-bin-1.3.6.tgz(989.82 KB)
    btrace-bin-1.3.6.zip(1.01 MB)
    btrace_1.3.6_all.deb(947.76 KB)
  • v1.3.5(Mar 18, 2016)

    Change Log

    v1.3.5

    Full Changelog

    Implemented enhancements:

    • Allow bundling compiled scripts in a jar #209
    • Identifying method scope with BTrace #202
    • Add a convenience method to BTraceUtils to get a field value by its name #201
    • Improve the class filtering process #200
    • Allow to skip retransforming the initially loaded classes #198
    • Needs for tracing return event for 'void' methods only #192
    • Option to send output to a file #188
    • Introduce a proper settings storage to enable running multiple scripts with different settings #187
    • Improve the handling of an array instance in Kind.ARRAY_SET and Kind.ARRAY_GET #185
    • Location Kind.INSTANCEOF and Kind.CHECKCAST should provide info about the desired type #184

    Fixed bugs:

    • java.lang.VerifyError: Bad return type (sometimes) #208
    • Enable sharing the output for multiple scripts loaded by the same agent #207
    • Shared methods don't work #189
    • BTrace class transformer might not get unregistered #186

    Closed issues:

    • Allow specifying the output dir #206
    • Do not create the output flusher thread if the interval is -1 #199
    • Every TestCase occurs this error:java.lang.IllegalArgumentException! Crazy! #194
    • Unable to create aggregations #193
    • how to install btrace as a plugin in visualvm? #191
    • AggregationFunction.QUANTIZE fails for values larger than Integer.MAX_VALUE #190

    Merged pull requests:

    • Improve the class transformation mechanism #211
    • Add access modifiers to the reported method/field fqn values #205 (jbachorik)
    • Anytype void return #204 (jbachorik)
    • Allow specifying an output file (instead of the console) when runninng btrace client #203 (jbachorik)
    • Improved shared methods #197 (jbachorik)

    * This Change Log was automatically generated by github_changelog_generator

    Source code(tar.gz)
    Source code(zip)
    btrace-1.3.5.noarch.rpm(943.97 KB)
    btrace-bin-1.3.5.tgz(983.76 KB)
    btrace-bin-1.3.5.zip(1.00 MB)
    btrace_1.3.5_all.deb(942.05 KB)
  • v1.3.4(Nov 7, 2015)

    Change Log

    1.3.4

    Full Changelog

    Implemented enhancements:

    • Allow AnyType for arguments annotated by @Return #176
    • Instrumentation levels #170 (jbachorik)

    Fixed bugs:

    • @Location(Kind.NEW) does not work with parameter annotated by @Return #183
    • MethodInvocationRecorder may provide incomplete data in highly concurrent environment #180
    • RuntimeException while trying to printfield values #179
    • Problems with @Return parameter #174
    • Location(kind = Kind.NEWARRAY) should support flexible "clazz" definition #173
    • Submitting compiled trace script via 'btrace' may not work #164
    • Inconsistent behavior when trying to probe return values from multiple methods #145

    Closed issues:

    • BTrace is crashing the applications that is attached with #177
    • SIGSEGV in the main process #172
    • how to run multiple btrace scripts for the same application. #171
    • how to trace a application which is run by using a tcserver which runs tomcat inbuilt #169
    • null pointer exception and illegalstateexception while tracing an application #168
    • connection refused or well-known file is not secure #167
    • unable to open socket file: target process not responding or hotspot vm not loaded #166
    • default trace ouput file created by btracer command is not generating when used in linux terminal #165
    • @OnExit not handled properly after #154 #161
    • Omitting the 'method' argument in @OnMethod counter-intuitively performs match against the handler method name #159
    • Tracing all methods of all available classes can make BTrace crash #154
    • @Duration annotation refused for Kind.CALL #153
    • @OnError requires full Throwable type in the handler method signature #152
    • default trace ouput file created by btracer command is not generating when used in linux terminal #151
    • tracing a *.jar files from command prompt #150
    • Unable to open socket file: target process not responding or HotSpot VM not loaded #139

    Merged pull requests:

    Source code(tar.gz)
    Source code(zip)
    btrace-1.3.4.noarch.rpm(935.42 KB)
    btrace-bin-1.3.4.tgz(1.08 MB)
    btrace-bin-1.3.4.zip(1.27 MB)
    btrace_1.3.4_all.deb(933.41 KB)
  • v1.3.3(Aug 13, 2015)

  • v1.3.2(Jul 25, 2015)

    Change Log

    v1.3.2

    Full Changelog

    Closed issues:

    • BTrace fails to forward the user defined classpath when attaching to the target application #142
    • Native method tracing breaks instrumentation for many Java core classes #140
    • BTraceUtils.Profiling.printSnapshot in @OnExit Method does not print any output #136

    Merged pull requests:

    • Run the client handling code asynchronously only when used from the GF3 Flashlight #137 (jbachorik)

    * This Change Log was automatically generated by github_changelog_generator

    Source code(tar.gz)
    Source code(zip)
    btrace-1.3.2.noarch.rpm(885.76 KB)
    btrace-bin-1.3.2.tgz(1.03 MB)
    btrace-bin-1.3.2.zip(1.21 MB)
    btrace_1.3.2_all.deb(884.26 KB)
  • v1.3.1(Jun 25, 2015)

    Change Log

    v1.3.1

    Full Changelog

    Implemented enhancements:

    • Add a rudimentary templating support for the 'scriptOutputFile' argument #132
    • Allow augmenting the return value in unsafe mode #131
    • Feature Request: Add tracing of native methods #115

    Closed issues:

    • 'java.lang.NullPointerException' when using @TLS #129
    • 'java.lang.VerifyError: Bad type on operand stack' when using OnTimer #126
    • NPE when trying to access BTraceRuntime in the trace script static initializer #125
    • [BTRACE-10] Porting BTrace to Maven #61

    Merged pull requests:

    • Fixes #131. Modifying the Preprocessor to work well with the augmente… #134 (jbachorik)
    • Fixes #132 - Add a rudimentary templating support for the scriptOutpu… #133 (jbachorik)
    • Adding the ability to trace native methods #130 (jbachorik)
    • Support JDK 1.7+ on OS X #128 (oschrenk)
    • Instrumentation regressions in 1.3.0.1 #127 (jbachorik)

    * This Change Log was automatically generated by github_changelog_generator

    Source code(tar.gz)
    Source code(zip)
    btrace-1.3.1.noarch.rpm(885.84 KB)
    btrace-bin-1.3.1.tgz(1.03 MB)
    btrace-bin-1.3.1.zip(1.21 MB)
    btrace_1.3.1_all.deb(883.91 KB)
  • v1.3.0.1(May 26, 2015)

    In BTrace 1.3 we identified two critical issues requiring an immediate fix

    • #124 Problems with class literals in unsafe mode (regression)
    • #123 Computing frames by ASM may cause LinkageError in certain situations (long standing intermittent issue currently made easily reproducible on Scala based application)

    This HotFix is addressing these two critical issues.

    Source code(tar.gz)
    Source code(zip)
    btrace-1.3.0.1.noarch.rpm(882.94 KB)
    btrace-bin-1.3.0.1.tgz(1.03 MB)
    btrace-bin-1.3.0.1.zip(1.21 MB)
    btrace_1.3.0.1_all.deb(881.06 KB)
  • v1.3(May 16, 2015)

    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 buildDistributions
    

    Performance 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.

    Source code(tar.gz)
    Source code(zip)
    btrace-1.3.noarch.rpm(834.64 KB)
    btrace-bin-1.3.tgz(1008.42 KB)
    btrace-bin-1.3.zip(1.16 MB)
    btrace_1.3_all.deb(833.23 KB)
Owner
btrace.io
btrace.io
Ray Tracing project from students of the ENSEEIHT Engineering School

Ray-Tracing-N7 This is a school project of students of the ENSEEIHT engineering school, in which we will try to recreate a basic ray tracing system, w

Tibo Mousset 3 Jun 23, 2022
Dynamic loading and compiling project based on JVM

camphor 基于jvm的弹性加载及编译中间件(Elastic loading and compiling middleware based on JVM) camphor_0.0.1 项目简介 该项目定位为弹性中间件,能够使系统在不重启的情况下完成增量代码文件的动态编译和加载 模块介绍 camp

palading 1 Jan 22, 2022
Tool for creating reports from Java Flight Recorder dumps

jfr-report-tool Tool for creating reports from Java Flight Recorder dumps. Influenced by https://github.com/chrishantha/jfr-flame-graph . Kudos to @ch

Lari Hotari 50 Oct 28, 2022
A java agent to generate method mappings to use with the linux `perf` tool

perf-map-agent A java agent to generate /tmp/perf-<pid>.map files for just-in-time(JIT)-compiled methods for use with the Linux perf tools. Build Make

null 1.5k Jan 1, 2023
Jazzer is a coverage-guided, in-process fuzzer for the JVM platform developed by Code Intelligence

Jazzer is a coverage-guided, in-process fuzzer for the JVM platform developed by Code Intelligence. It is based on libFuzzer and brings many of its instrumentation-powered mutation features to the JVM.

Code Intelligence 696 Jan 5, 2023
One file java script for visualizing JDK flight recorder execution logs as flamegraphs without any dependencies except Java and a browser.

Flamegraph from JFR logs Simple one file Java script to generate flamegraphs from Java flight recordings without installing Perl and the Brendan Gregg

Billy Sjöberg 17 Oct 2, 2022
JVM Explorer is a Java desktop application for browsing loaded class files inside locally running Java Virtual Machines.

JVM Explorer JVM Explorer is a Java desktop application for browsing loaded class files inside locally running Java Virtual Machines. Features Browse

null 109 Nov 30, 2022
A Java agent that rewrites bytecode to instrument allocation sites

The Allocation Instrumenter is a Java agent written using the java.lang.instrument API and ASM. Each allocation in your Java program is instrumented;

Google 438 Dec 19, 2022
Java memory allocation profiler

Aprof - Java Memory Allocation Profiler What is it? The Aprof project is a Java Memory Allocation Profiler with very low performance impact on profile

Devexperts 211 Dec 15, 2022
Sampling CPU and HEAP profiler for Java featuring AsyncGetCallTrace + perf_events

async-profiler This project is a low overhead sampling profiler for Java that does not suffer from Safepoint bias problem. It features HotSpot-specifi

null 5.8k Jan 3, 2023
Fork of tagtraum industries' GCViewer. Tagtraum stopped development in 2008, I aim to improve support for Sun's / Oracle's java 1.6+ garbage collector logs (including G1 collector)

GCViewer 1.36 GCViewer is a little tool that visualizes verbose GC output generated by Sun / Oracle, IBM, HP and BEA Java Virtual Machines. It is free

null 4.1k Jan 4, 2023
Java Agent for Memory Measurements

Overview Jamm provides MemoryMeter, a Java agent for all Java versions to measure actual object memory use including JVM overhead. Use To use MemoryMe

Jonathan Ellis 624 Dec 28, 2022
Get Method Sampling from Java Flight Recorder Dump and convert to FlameGraph compatible format.

Note: Travis has removed the support for Oracle JDK 8. Therefore the build status is removed temporarily. Converting JFR Method Profiling Samples to F

M. Isuru Tharanga Chrishantha Perera 248 Dec 16, 2022
Log analyser / visualiser for Java HotSpot JIT compiler. Inspect inlining decisions, hot methods, bytecode, and assembly. View results in the JavaFX user interface.

JITWatch Log analyser and visualiser for the HotSpot JIT compiler. Video introduction to JITWatch video Slides from my LJC lightning talk on JITWatch

AdoptOpenJDK 2.8k Jan 3, 2023
Java monitoring for the command-line, profiler included

jvmtop is a lightweight console application to monitor all accessible, running jvms on a machine. In a top-like manner, it displays JVM internal metri

null 1.2k Jan 6, 2023
PerfJ is a wrapper of linux perf for java programs.

PerfJ PerfJ is a wrapper of linux perf for java programs. As Brendan Gregg's words In order to profile java programs, you need a profiler that can sam

Min Zhou 353 Jan 2, 2023
OOM diagnostics for Java.

Polarbear A tool to help diagnose OutOfMemoryError conditions. Polarbear helps track down the root cause of OutOfMemoryError exceptions in Java. When

Cue 20 May 14, 2019
Inline raw ASM instructions in Java

asm-inline At first I thought: Oh, I can make an optimization transformer for Proguard And then this happened. Example: public class Test { public

null 27 Dec 8, 2022
Some utility classes around java records

record-util Some utility classes around java records On the menu MapTrait Transform any record to a java.util.Map just by implementing the interface M

Rémi Forax 32 Apr 6, 2022