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

(1.1) 'java -prof' output is incomplete (Win32 only)

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Won't Fix
    • Icon: P4 P4
    • None
    • 1.1.2, 1.1.3, 1.1.4
    • hotspot
    • x86
    • windows_95, windows_nt



      Name: rs12567 Date: 08/05/97


      Refer to bug no. 4037712, 4064248
      Profile information collected via -prof option is incomplete for
      non-debug build on Win32 version of JDK.

      This defect raised on behalf of San Francisco project.

          <Note by tgrieve (Tom Grieve), 97/07/24 09:11:35, action: accept>
      The main java interpreter loop is in 2 versions from 1.1
      onwards; executeJava.c is built as part of the debug build. For
      the non-debug build, this is replaced by executeJava_p5.asm, but
      the assembler code does not contain a call to java_mon() to
      collect profiling information when the -prof option is on.
      This fix adds the necessary calls.
      Parts affected are:
      executeJava_p5.m4
      executeJava_p5.inc
      runtimeHelper.c
      Files changed:
      DELTA: src/share/java/runtime/executeJava_p5.inc (s113 1.2)
      *** 1.1 Mon Aug 4 15:28:36 1997
      --- 1.2 Mon Aug 4 15:28:37 1997
      ***************
      *** 26,31 ****
      --- 26,39 ----
                jnz Lb($1_monitor) ;There is a monitor ON
        
        Lb($1_back_from_monitor):
      + ; JavaSoft BugIds 4037712/4064248, IBM defect 2482 /*ibm*/
      + cmp CName(java_monitor), 0 ; if (java_monitor) /*ibm*/
      + je Lb($1_nojavamon) ; { /*ibm*/
      + pushad ; save regs /*ibm*/
      + call CName(Helper_Call_java_mon) ; java_mon(...) /*ibm*/
      + popad ; restore regs /*ibm*/
      + Lb($1_nojavamon): ; } /*ibm*/
      +
                mov DWORD PTR [ecx + ee_current_frame], ebx ;current_frame=frame->prev
                mov esi, DWORD PTR [ebx + javaframe_returnpc] ;pc = javaframe->returnpc
                cmp esi,0
      ***************
      *** 165,170 ****
      --- 173,188 ----
                mov ebx, DWORD PTR _ee$[esp] ;ecx = ee
                lea edi, [edx + javaframe_ostack] ;begining of the stack
                mov DWORD PTR [edx + javaframe_optop],edi ;optop=javaframe->ostack
      +
      + ; JavaSoft BugIds 4037712/4064248, IBM defect 2482 /*ibm*/
      + cmp CName(java_monitor), 0 ; if (java_monitor) /*ibm*/
      + je Lb(ijm_nomonitor_$1) ; { /*ibm*/
      + push edx ; /*ibm*/
      + call CName(now) ; /*ibm*/
      + pop edx ; /*ibm*/
      + mov DWORD PTR [edx + javaframe_mon_starttime],eax ; mon_starttime /*ibm*/
      + Lb(ijm_nomonitor_$1): ; } /*ibm*/
      +
                xor eax,eax
                mov DWORD PTR [ebx + ee_current_frame],edx ;set ee->current_frame
                MOV(eax, al, BYTE PTR [esi])
      DELTA: src/share/java/runtime/executeJava_p5.m4 (s113 1.2)
      *** 1.1 Mon Aug 4 15:28:39 1997
      --- 1.2 Mon Aug 4 15:28:40 1997
      ***************
      *** 182,187 ****
      --- 182,190 ----
        PUBLIC CName(ExecuteJava)
        EXTERN CName(classJavaLangObject):DWORD
        EXTERN CName(java_monitor):DWORD
      + ; JavaSoft BugIds 4037712/4064248, IBM defect 2482 /*ibm*/
      + EXTERN CName(Helper_Call_java_mon):NEAR ; /*ibm*/
      + EXTERN CName(now):NEAR ; /*ibm*/
        EXTERN CName(is_instance_of):NEAR
        EXTERN CName(ObjAlloc):NEAR
        EXTERN CName(ArrayAlloc):NEAR
      DELTA: src/share/java/runtime/runtimeHelper_p5.c (s113 1.2)
      *** 1.1 Mon Aug 4 15:28:41 1997
      --- 1.2 Mon Aug 4 15:28:42 1997
      ***************
      *** 101,106 ****
      --- 101,123 ----
            SIGNAL_ERROR (ee, pc, "IncompatibleClassChangeError", buf);
        }
        
      + /* JavaSoft BugIds 4037712/4064248, IBM defect 2482 ibm*/
      + void /*ibm*/
      + Helper_Call_java_mon (void) /*ibm*/
      + { /*ibm*/
      + ExecEnv *ee = EE(); /*ibm*/
      + JavaFrame *frame = ee->current_frame; /*ibm*/
      + struct methodblock *mb = frame->current_method; /*ibm*/
      + if (mb != 0) { /*ibm*/
      + /* This code was copied from executeJava.c; note ibm*/
      + /* that there are potential problems with the time ibm*/
      + /* due to not allowing for the value to wrap. Also, ibm*/
      + /* on Win32 the value returned is unsigned. ibm*/
      + int time = now() - frame->mon_starttime; /*ibm*/
      + java_mon(frame->prev->current_method, mb, time); /*ibm*/
      + } /*ibm*/
      + } /*ibm*/
      +
        int64_t
        x86_new (ExecEnv *ee, unsigned char* pc)
        {

      ======================================================================

            sliangsunw Sheng Liang (Inactive)
            rschiavisunw Richard Schiavi (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: