Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-6284056

Missed hotspot_jni probes

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P4 P4
    • 6
    • 6
    • hotspot
    • b47
    • sparc
    • solaris_10
    • Verified

      1. The following JNI probes are missed (see share/vm/prims/jni.cpp):

         a) FatalError_return

            May be it will be just better to remove this probe at all.

         b) GetCreateJavaVMs_entry
            GetCreateJavaVMs_return

            Actually hotspot_jni.d contains 4 probes declarations:
               probe GetCreatedJavaVMs_entry(void**, uintptr_t, uintptr_t*);
               probe GetCreatedJavaVMs_return(uintptr_t);
               probe GetCreateJavaVMs_entry(void*, uintptr_t, uintptr_t*);
               probe GetCreateJavaVMs_return(uint32_t);

            but at the same time there is only one JNI call:
            JNI_GetCreatedJavaVMs(JavaVM **, jsize, jsize *);

         c) GetSuperclass_entry
            GetSuperclass_return

            share/vm/prims/jni.cpp doesn't contain any calls of
            HS_DTRACE_PROBE2(hotspot_jni, GetSuperclass_entry, env, cls) and
            HS_DTRACE_PROBE1(hotspot_jni, GetSuperclass_entry, ret).

            But I see the 'HS_DTRACE_PROBE1(hotspot_jni, ToReflectedMethod_return, obj)'
            call on line share/vm/prims/jni.cpp:373

         d) ThrowNew_return
            Throw_return

         e) GetEnv_return

         Looks like the code below misses
         'HS_DTRACE_PROBE1(hotspot_jni, GetEnv_return, JNI_OK)' calls:

         if (Threads::is_supported_jni_version_including_1_1(version)) {
            *(JNIEnv**)penv = ((JavaThread*) thread)->jni_environment();
            return JNI_OK;

         } else if (version == JVMPI_VERSION_1 ||
                     version == JVMPI_VERSION_1_1 ||
                     (version == JVMPI_VERSION_1_2 && UseSuspendResumeThreadLists)) {
            if (UseUnsupportedDeprecatedJVMPI) {
              *penv = (void* )jvmpi::GetInterface_1(version); // version 1.X support
              return JNI_OK;
            }

         f) DestroyJavaVM_return

            jni.cpp:3341
            if (res != JNI_OK) return res;

         g) IsAssignableFrom_return
         
            jni.cpp:386-388
            if (java_lang_Class::is_primitive(sub_mirror) || java_lang_Class::is_primitive(super_mirror)) {
               return sub_mirror == super_mirror;
            }

      2) DTrace declaration for GetEnv_entry probe is not correct.

         os/solaris/dtrace/hotspot_jni.d:264
            probe GetEnv_entry(void*, void*, void*);

            should be:
            probe GetEnv_entry(void*, void**, uint32_t);

         share/vm/prims/jni.cpp:3320
            HS_DTRACE_PROBE_DECL3(hotspot_jni, GetEnv_entry, JavaVM*, void**, void*);
            
            should be
            HS_DTRACE_PROBE_DECL3(hotspot_jni, GetEnv_entry, JavaVM*, void**, jint);


      ###@###.### 2005-06-10 17:59:28 GMT
      ###@###.### 2005-06-13 10:38:13 GMT

            kamg Keith Mcguigan (Inactive)
            epavlova Ekaterina Pavlova
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: