Can't profile JMRI

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Can't profile JMRI

geowar1
I'm working on the open-source project JMRI (at
<https://github.com/JMRI/JMRI>) and I'm trying to set it up to profile
one of the targets (PanelPro) using NetBeans 8.2. I've followed the
instructions here:
<https://blogs.oracle.com/nbprofiler/getting-started-with-netbeans-prof
iler-81> but keep getting a message "Error: Could not find or load main
class ${profiler.info.jvmargs.agent}". This is the Build.xml target:

    <target name="profile-nb" depends="runtime-library-selection"
description="build and run app with NetBeans profiling">
        <fail unless="netbeans.home">This target can only run inside
the NetBeans IDE.</fail>
        <startprofiler/>
        <nbprofiledirect>
            <classpath>
                <pathelement location="${jartarget}/app.jar"/>
                <pathelement path="${java.class.path}"/>
            </classpath>
        </nbprofiledirect>
        <!-- commenting out this next line prevents the "Must set
profiler agent JVM arguments..." message -->
        <!-- <fail unless="profiler.info.jvmargs.agent">Must set
profiler agent JVM arguments in profiler.info.jvmargs.agent</fail> -->
        <java classname="${application.classname}" dir="${basedir}"
fork="yes" resultproperty="application.returncode">
            <classpath refid="project.class.path"/>
            <sysproperty key="java.security.policy"
value="${libdir}/security.policy"/>
            <sysproperty key="java.library.path"
path=".:${arch.lib.path}:${libdir}"/>
            <sysproperty key="file.encoding" value="UTF-8"/>
            <!-- commenting out this next line prevents the "can't find
main class..." message -->
            <!-- <jvmarg value="${profiler.info.jvmargs.agent}"/> -->
            <jvmarg line="${profiler.info.jvmargs}"/>
            <jvmarg value="-Xms256m"/>
            <jvmarg value="-Xmx640m"/>
            <jvmarg line="${jvm.args}"/>
            <arg value="${antargline}"/>
        </java>
    </target>

Little help? What am I missing?
Reply | Threaded
Open this post in threaded view
|

Re: Can't profile JMRI

Tomas Hurka-2
Hi George Warner,

On 1 Oct 2017, at 20:39, [hidden email] wrote:

I'm working on the open-source project JMRI (at
<https://github.com/JMRI/JMRI>) and I'm trying to set it up to profile
one of the targets (PanelPro) using NetBeans 8.2. I've followed the
instructions here:
<https://blogs.oracle.com/nbprofiler/getting-started-with-netbeans-prof
iler-81> but keep getting a message "Error: Could not find or load main
class ${profiler.info.jvmargs.agent}". This is the Build.xml target:

   <target name="profile-nb" depends="runtime-library-selection"
description="build and run app with NetBeans profiling">
<fail unless="netbeans.home">This target can only run inside
the NetBeans IDE.</fail>
<startprofiler/>
<nbprofiledirect>
   <classpath>
<pathelement location="${jartarget}/app.jar"/>
<pathelement path="${java.class.path}"/>
   </classpath>
</nbprofiledirect>
<!-- commenting out this next line prevents the "Must set
profiler agent JVM arguments..." message -->
<!-- <fail unless="profiler.info.jvmargs.agent">Must set
profiler agent JVM arguments in profiler.info.jvmargs.agent</fail> -->
<java classname="${application.classname}" dir="${basedir}"
fork="yes" resultproperty="application.returncode">
   <classpath refid="project.class.path"/>
   <sysproperty key="java.security.policy"
value="${libdir}/security.policy"/>
   <sysproperty key="java.library.path"
path=".:${arch.lib.path}:${libdir}"/>
   <sysproperty key="file.encoding" value="UTF-8"/>
   <!-- commenting out this next line prevents the "can't find
main class..." message -->
   <!-- <jvmarg value="${profiler.info.jvmargs.agent}"/> -->
   <jvmarg line="${profiler.info.jvmargs}"/>
   <jvmarg value="-Xms256m"/>
   <jvmarg value="-Xmx640m"/>
   <jvmarg line="${jvm.args}"/>
   <arg value="${antargline}"/>
</java>
   </target>

Little help? What am I missing?

To profile JMRI project you should do the following:
1) run your project (PanelPro)
2) use ‘Profile’ -> ‘Attach to Project (JMRI)’
3) select profiling mode from ‘Configure Session’ 
4) click ‘Attach’
5) select your running application

Bye,
--
Tomas Hurka   <[hidden email]>
NetBeans Profiler http://profiler.netbeans.org
VisualVM http://visualvm.github.io
Software Developer
Oracle, Praha Czech Republic