Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Activity
    Vladimir Dvorak
    @skybber
    There shouldn't be so significant slowdown if you use HA. I've observed some performance problems on Wildfly it there are many ClassLoaders used but not on Tomcat.
    Saqib Ahmed
    @saqib-ahmed
    Hi, I'm using DCEVM to instrument some of my classes at runtime. I'm doing dynamic bytecode instrumentation using a JVMTI agent. I have to instrument those methods which are "hot", that is, the methods which invoke JIT compiler. To do so I listen to a CompiledLoadEvent and inside its call back function, call RetransformClasses. This in turn invokes ClassFileLoadHook on the class containing "hot" function and actual instrumentation begins. Currently I'm instrumenting my class to spawn some threads. I also listen to thread starts and print them within my agent.
    Saqib Ahmed
    @saqib-ahmed

    The problem is, when I instrument my hot methods, my code gets instrumented perfectly but takes a lot of time (I guess the C1 compiler bails out and interpreter starts again).
    Is there any way of restricting the JVM to use the compiler even after the instrumentation (If that is causing the actual overhead)?
    Can I use any other strategy to get the profiler's feedback to instrument hot methods so that I don't get any overhead after instrumentation?

    I have checked my agent with ClassFileLoadHook event at class load time and it works perfectly without any overhead.

    Saqib Ahmed
    @saqib-ahmed
    @skybber
    Vladimir Dvorak
    @skybber
    I dont know...
    Ole Hejlskov
    @ohej
    Hello! Question about hotswap-agent.properties
    Are we in a “there can only be one” situation? I have a multi-module maven project and it would be a bit easier for each module to define their own hotswap-agent.properties (it’s all brought together and runs with the tomcat7-maven-plugin), but it seems that only the first one is registered
    I put it in src/main/resources in all of the sub-modules, but only the first one seems to be picked up
    I know the workaround is to provide one “master” but essentially that results in a looooong “extraClasspath=“. Any guidance?
    Gonzalo Tirapegui
    @GonzaloTirapegu_twitter
    which DCEVM do i have to use with Java 8u77 build 3?
    Vladimir Dvorak
    @skybber
    what app server are you running?
    ahh , I seee, tomcat
    hotswap-agent.properties are get using WebAppClassLoader. Each application in Tomcat can have own hotswap-agent.properties. May be your modules shares single WebAppClassLoader , if so, the can be only 1. you can check classloader of you module by this.getClass().getClassLoader() method - called from object from your app
    Ole Hejlskov
    @ohej
    Ahh okay, that makes sense, thanks for the input
    Gonzalo Tirapegui
    @GonzaloTirapegu_twitter
    sshot.png
    Hi! i've recently configured HotSwap on Netbeans 8.1 with Glassfish 4.1.1 over Java 1.8.0_77 with a Maven Web Project , i run the project on Debug Mode and every time i save and/or "Apply code changes" this popup appears
    does anyone know anything about this error?
    Vladimir Dvorak
    @skybber
    Looks that you don't running dcevm
    Gonzalo Tirapegui
    @GonzaloTirapegu_twitter

    I don't think so , the server starts with this log :
    HOTSWAP AGENT: 10:20:03.288 INFO (org.hotswap.agent.HotswapAgent) - Loading Hotswap agent {1.1.0-SNAPSHOT} - unlimited runtime class redefinition.
    HOTSWAP AGENT: 10:20:04.101 INFO (org.hotswap.agent.config.PluginRegistry) - Discovered plugins: [Hotswapper, WatchResources, AnonymousClassPatch, ClassInitPlugin, Hibernate, Hibernate3JPA, Hibernate3, Spring, Jersey1, Jersey2, Jetty, Tomcat, ZK, Logback, Log4j2, MyFaces, Mojarra, Seam, ELResolver, WildFlyELResolver, OsgiEquinox, Owb, Proxy, WebObjects, Weld, JBossModules, ResteasyRegistry, Deltaspike, JavaBeans, GlassFish]
    Launching GlassFish on Felix platform ...

    and i've added this options to the domain.xml file :

    <jvm-options>-XXaltjvm=dcevm</jvm-options>

    <jvm-options>-javaagent:C:/temp/hotswap-agent-1.1.0-SNAPSHOT.jar</jvm-options>

    Vladimir Dvorak
    @skybber
    Make sure if the jvm-option is passed to JVM (using ps command), since it should work. Another issue is your hosting JVM, I would recommend you to upgrade to 8u112 at least since we have fixed some major issues in dcevm in 8u112 and later.
    Gonzalo Tirapegui
    @GonzaloTirapegu_twitter
    When i try to install that version on JDK/JRE 1.8.0_77 it shows a message that says "Could not get dceversion of C:\Program Files\Java\jdk1.8.0_77)
    Vladimir Dvorak
    @skybber
    Ahh, I mean use openjdk 8u112 (or 8u121) as hosting JVM and on the top install dcevm8u112. dcevm8u112 is probably not compatible with erlier openjdk versions
    aslum
    @aslum
    hi, Do Eclipse -> Build Automatically be enabled for hotswap?
    aslum
    @aslum
    my build is based on maven, when Build automatically is disabled
    hotswap doesn't seem to work
    prasadbolla
    @prasadbolla
    Hi , can somebody help me with setting up Hotswap with Eclipse and Weblogic
    any documentation ?
    Vladimir Dvorak
    @skybber
    Hi, weblogic is unfortunately not supported
    prasadbolla
    @prasadbolla
    thanks for your response.
    prasadbolla
    @prasadbolla
    would you mind giving me more information on why weblogic is not supported.. Reason for asking this question.. during my setup I have not providing any parameters which is specific to my server(in my case weblogic)... All what I have done is.
    Step 1: Download DCEVM and installed(I feel this is kind of patch to java).
    Step 2: Download agent jar and pass it as java parameter.
    Vladimir Dvorak
    @skybber
    Weblogic is not opensource, therefore it is hard to make module for it. Anyway you can use DCEVM alone + some core HA modules.
    bhuvangu
    @bhuvangu
    " Note that there must be a plugin that will provide actual replacement such as JettyPlugin for Jetty servlet container."<<<
    what does it mean .. this text is present in http://hotswapagent.org/mydoc_plugin_jetty.html
    bhuvangu
    @bhuvangu
    hotswap is not working with embedded jetty
    Vladimir Dvorak
    @skybber
    what does it mean not working?
    could you supply your jvm arguments ?
    bhuvangu
    @bhuvangu
    yes.. i am trying one more thing.. will update the full case in sometime.. thanks for offering a helping hand :+1:
    bhuvangu
    @bhuvangu
    Hi.. is it correct that hotswap cant change method body for current running method
    public static void main(String[] args) throws Exception {
      Main main = new Main();
      main.methodWhereExcutionIsHaltNClassIsUpdated();
     }
     private void methodWhereExcutionIsHaltNClassIsUpdated() throws Exception {
      Scanner scan = new Scanner(System.in);
    
      System.out.print("Enter a: ");
      // before running the next line we update the class file to print "a:" to "AMODIFED"
      // but still it prints the "a:"
      Integer a = Integer.parseInt(scan.next());
    
      System.out.print("a: "+ a);
     }
    }
    Vladimir Dvorak
    @skybber
    bhuvangu
    @bhuvangu
    @skybber didnt get your comment ..
    bhuvangu
    @bhuvangu
    While running the hotswap i am getting this exception .. request for help
    HOTSWAP AGENT: 21:57:45.161 INFO (org.hotswap.agent.HotswapAgent) - Loading Hotswap agent {1.1.0-SNAPSHOT} - unlimited runtime class redefinition.
    HOTSWAP AGENT: 21:57:45.725 ERROR (org.hotswap.agent.config.PluginRegistry) - Error in plugin initial processing for plugin package 'org.hotswap.agent.plugin'
    java.lang.ClassNotFoundException: org/hotswap/agent/plugin/hotswapper/HotswapperPlugin
            at java.lang.Class.forName0(Native Method)
            at java.lang.Class.forName(Class.java:278)
            at org.hotswap.agent.config.PluginRegistry.scanPlugins(PluginRegistry.java:89)
            at org.hotswap.agent.config.PluginManager.init(PluginManager.java:125)
            at org.hotswap.agent.HotswapAgent.premain(HotswapAgent.java:52)
            at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
            at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
            at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
            at java.lang.reflect.Method.invoke(Method.java:606)
            at sun.instrument.InstrumentationImpl.loadClassAndStartAgent(InstrumentationImpl.java:382)
            at sun.instrument.InstrumentationImpl.loadClassAndCallPremain(InstrumentationImpl.java:397)
    Andrew Tran
    @xXAndrew28Xx
    About to use it for the first time, hopefully this stops me from having to wait 3 minutes everything I change some code
    oh no stacktrace
    Anyone have any idea why it happens?
    it isn't present without hotswapagent