6 Replies Latest reply on Aug 18, 2006 5:08 AM by rufik

    Problem starting profiler

    rufik

      Hi,
      I have a problem starting JBoss with profiler:
      Linux 2.6.14
      JBoss: 4.0.2
      JVM: 1.5.0_07
      JBoss Profiler RC4

      What I did:
      1. compiled libjbossInspector.so and libjbossAgent.so from
      /jvmpi-src/linux/compile.sh
      and
      /jvmti-src/linux/compile.sh
      2. copy this .so to folder /profiler
      3. export LD_LIBRARY_PATH=/profiler
      4. add -Xrun:jbossInspector to run.sh (command line)

      And what?
      Error occurred during initialization of VM
      Could not find agent library on the library path or in the local directory: jbossInspector

      So, LD_LIBRARY_PATH is correct, I can see it. I tried `ldd /profiler/libjbossInspector.so` and result:
      not a dynamic executable

      I don't know - are this .so incorrect or something?

        • 1. Re: Problem starting profiler
          clebert.suconic

          Something must happened during compilation.

          • 2. Re: Problem starting profiler
            clebert.suconic

            I mean... post the output for your ./compile.sh command. I will know what's happening after seeing that output.

            • 3. Re: Problem starting profiler
              rufik

              OK, I'll post on wednesday. I'll try compile with zlib from my distro (PLD Linux)...will see :)

              • 4. Re: Problem starting profiler
                rufik

                compiling jvmti:

                ./compile.sh
                ../native-src/jbossAgentJNI.cpp: In function `void
                 Java_org_jboss_profiler_jvmti_JVMTIInterface_notifyInventory(JNIEnv*,
                 _jobject*, unsigned char, _jstring*, _jstring*, _jobject*)':
                ../native-src/jbossAgentJNI.cpp:814: warning: cast from pointer to integer of
                 different size
                ../native-src/jbossAgentJNI.cpp: In function `_jstring*
                 Java_org_jboss_profiler_jvmti_JVMTIInterface_getMethodName(JNIEnv*,
                 _jobject*, long long int)':
                ../native-src/jbossAgentJNI.cpp:920: warning: cast to pointer from integer of
                 different size
                ../native-src/jbossAgentJNI.cpp: In function `_jstring*
                 Java_org_jboss_profiler_jvmti_JVMTIInterface_getMethodSignature(JNIEnv*,
                 _jobject*, long long int)':
                ../native-src/jbossAgentJNI.cpp:941: warning: cast to pointer from integer of
                 different size
                ../native-src/jbossAgentJNI.cpp: In function `_jclass*
                 Java_org_jboss_profiler_jvmti_JVMTIInterface_getMethodClass(JNIEnv*,
                 _jobject*, long long int)':
                ../native-src/jbossAgentJNI.cpp:961: warning: cast to pointer from integer of
                 different size
                


                compiling jvmpi with -Wall:
                ../src/jbossInspector.cc: In function `void writeHeader(signed char, jlong*,
                 jlong*, void*)':
                ../src/jbossInspector.cc:622: warning: unused variable `jlong lastClock'
                ../src/jbossInspector.cc: In function `void writeHeaderPadrao(signed char,
                 const jlong*, const jlong*, FILE*)':
                ../src/jbossInspector.cc:643: warning: unused variable `jlong lastClock'
                ../src/jbossInspector.cc: In function `void objectAlloc(JNIEnv*, _jobjectID*,
                 _jobjectID*, int)':
                ../src/jbossInspector.cc:797: warning: unused variable `jint ret'
                ../src/jbossInspector.cc:802: warning: unused variable `jint ret'
                ../src/jbossInspector.cc: In function `void objectFree(JNIEnv*, _jobjectID*)':
                ../src/jbossInspector.cc:837: warning: unused variable `
                 ThreadHandler*threadHandler'
                ../src/jbossInspector.cc: In function `void gcstart(JNIEnv*)':
                ../src/jbossInspector.cc:853: warning: unused variable `
                 ThreadHandler*threadHandler'
                ../src/jbossInspector.cc: In function `void gcfinish(JNIEnv*)':
                ../src/jbossInspector.cc:867: warning: unused variable `
                 ThreadHandler*threadHandler'
                ../src/jbossInspector.cc: In function `void enterMethod(JNIEnv*, _jmethodID*&,
                 _jobjectID*&)':
                ../src/jbossInspector.cc:1231: warning: unused variable `jint ret'
                ../src/jbossInspector.cc:1283: warning: unused variable `jint ret'
                ../src/jbossInspector.cc:1236: warning: statement with no effect
                ../src/jbossInspector.cc: In function `void exitMethod(JNIEnv*, _jmethodID*&)':
                ../src/jbossInspector.cc:1327: warning: unused variable `jint ret'
                ../src/jbossInspector.cc:1332: warning: statement with no effect
                ../src/jbossInspector.cc: In function `jint JVM_OnLoad(JavaVM*, char*, void*)':
                ../src/jbossInspector.cc:1791: warning: unused variable `int uniqueNames'
                ../src/jbossInspector.cc: At top level:
                ../src/jbossInspector.cc:442: warning: `long int maxSize' defined but not used
                


                .so libraries are built.
                ldd libjbossInspector.so
                 linux-gate.so.1 => (0xffffe000)
                 libstdc++.so.5 => /usr/lib/libstdc++.so.5 (0xb7efb000)
                 libm.so.6 => /lib/tls/libm.so.6 (0xb7ed8000)
                 libgcc_s.so.1 => /lib/libgcc_s.so.1 (0xb7ecf000)
                 libc.so.6 => /lib/tls/libc.so.6 (0xb7db5000)
                 /lib/ld-linux.so.2 (0x80000000)
                


                but when .so moved to different directory, ldd shows "not a dynamic executable".

                • 5. Re: Problem starting profiler
                  rufik

                  Should I use this boundled zlib or from my linux distro?

                  • 6. Re: Problem starting profiler
                    rufik

                    Any idea? Any suggestions?