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

Usage of Japanese fonts results in continuous memory increase

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P4 P4
    • 1.4.1
    • 1.3.1
    • client-libs
    • hopper
    • sparc
    • solaris_8

      rved: 67mb

      ************ after open and close of dialog for 3 times **********

      B3694A GlancePlus C.03.10.00 04:05:38 nucleus sun4m Current
      Avg High
      --------------------------------------------------------------------------------
      -----
      CPU Util S SU U | 38%
      15% 100%
      Disk Util | 0%
      0% 3%
      Mem Util SSU U | 35%
      35% 35%
      Swap Util U URR | 9%
      8% 9%
      --------------------------------------------------------------------------------
      -----
      Memory Regions PID: 6310, java PPID: 6264 User: root

      Type RefCnt VSS VirtAddress File Name
      --------------------------------------------------------------------------------
      TEXT /S 4 24kb 0x00010000 <reg,ufs,i...xf67c61e8>
      BSS /S 4 4kb 0x00025000 <reg,ufs,i...xf67c61e8>
      SHMEM /S 1 2.3mb 0x00026000 <shmem>
      SHMEM /S 1 2.1mb 0xe4000000 <shmem>
      SHMEM /S 1 4.9mb 0xe4220000 <shmem>
      SHMEM /S 1 1.4mb 0xe4710000 <shmem>
      SHMEM /S 1 55.6mb 0xe4870000 <shmem>
      SHMEM /S 1 2.2mb 0xe8000000 <shmem>
      SHMEM /S 1 29.7mb 0xe8240000 <shmem>
      SHMEM /S 1 516kb 0xeab40000 <shmem>
      SHMEM /S 1 516kb 0xeac00000 <shmem>

      Text VSS: 24kb Data VSS: 4kb Stack VSS: 512kb
      Shmem VSS: 143mb Other VSS: 26mb Total VSS: 36mb
       
       
       Swap Device Type Avail (mb) Used (mb)
      --------------------------------------------------------------------------------
      /dev/dsk/c0t3d0s1 device 514mb 0mb
      pseudo-swap memory 224mb 46mb


      Swap Avail: 738mb Swap Used: 46mb Resvd Util (%): 9 Swap Reserved: 67mb
       
       *********** after opening and closing the dialog for next 3 times ( total-6
      times) **********
       
       B3694A GlancePlus C.03.10.00 04:07:46 nucleus sun4m Current
      Avg High
      --------------------------------------------------------------------------------
      -----
      CPU Util SSU | 5%
      13% 100%
      Disk Util | 0%
      0% 3%
      Mem Util SSU U | 35%
      35% 35%
      Swap Util U URR | 9%
      8% 9%
      --------------------------------------------------------------------------------
      -----
      Memory Regions PID: 6310, java PPID: 6264 User: root

      Type RefCnt VSS VirtAddress File Name
      --------------------------------------------------------------------------------
      TEXT /S 4 24kb 0x00010000 <reg,ufs,i...xf67c61e8>
      BSS /S 4 4kb 0x00025000 <reg,ufs,i...xf67c61e8>
      SHMEM /S 1 2.3mb 0x00026000 <shmem>
      SHMEM /S 1 2.1mb 0xe4000000 <shmem>
      SHMEM /S 1 4.9mb 0xe4220000 <shmem>
      SHMEM /S 1 1.4mb 0xe4710000 <shmem>
      SHMEM /S 1 55.6mb 0xe4870000 <shmem>
      SHMEM /S 1 2.2mb 0xe8000000 <shmem>
      SHMEM /S 1 29.7mb 0xe8240000 <shmem>
      SHMEM /S 1 516kb 0xeab40000 <shmem>
      SHMEM /S 1 516kb 0xeac00000 <shmem>

      Text VSS: 24kb Data VSS: 4kb Stack VSS: 512kb
      Shmem VSS: 143mb Other VSS: 26mb Total VSS: 36mb
        
        
        Swap Device Type Avail (mb) Used (mb)
      --------------------------------------------------------------------------------
      /dev/dsk/c0t3d0s1 device 514mb 0mb
      pseudo-swap memory 224mb 46mb











      Swap Avail: 738mb Swap Used: 46mb Resvd Util (%): 9 Swap Reserved: 67mb

      *********** after open and close of dialog for the next 3 times ( total-9
      times ) *********
      (Review ID: 131983)
      ======================================================================


      Name: yyT116575 Date: 10/24/2001


      java version "1.3.1"
      Java(TM) 2 Runtime Environment, Standard Edition (build 1.3.1-b24)
      Java HotSpot(TM) Client VM (build 1.3.1-b24, mixed mode)


      In JAPANESE locale - Swap space/memory usage grows enormously when
      setVisible(true) method is called.

      Problem :
      ---------

      We are developing / converting a product in JAVA built with AWT components in
      JAPANESE locale. While testing our product, we observed that memory usage
      (Total VSS column in EnglishResult.txt & JapaneseResult.txt) and Swap space
      growing continuously using &#8220;GLANCE&#8221; tool, and it was found that setVisible
      (true) (For any component like Frame, Dialog etc.,) method consumes large
      amount of memory.

        To ensure this problem, the following &#8220;Operation Memory&#8221; test was carried out
      with a sample application in the below mentioned combination of configuration
      and platforms.

      Java Language : JRE 1.3.1 (Hotspot Client) , JRE 1.2.2 , JRE 1.1.8
      Locale : Japanese (ja , ja_JP.PCK , ja_JP.UTF-8 ,
      ja_JP.EUCJP , Japanese)
      OS : Solaris 8 &#8211; 256 MB RAM , Swap Space 1 GB

      Operation Memory:

      1. Execute the application
      2. Press the &#8220;Show&#8221; button
      3. After a dialog is appeared , press the &#8220;Hide&#8221; button
      4. Repeat the steps 2 & 3 for 3 times.
      5. Repeat step 4 for 3 times.


      The data is collected at the following points using GLANCE tool and the result
      is shown in EnglishResult.txt (Data of English Locale), JapaneseResult.txt
      (Data of Japanese locale).
      1. After Step 1
      2. After Step 4 ( 3 times)


      In the attached result it is found that for every 3 times of opening and
      closing the dialog , there is an increase of 1 MB of swap space & Total VSS ,
      where as in the original product that we have developed , for every opening and
      closing of dialog there is an increase of 7MB ,

      We observed the &#8220;memory growing&#8221; behavior in all JRE versions and all Japanese
      locales .How ever we attaching data collected only in JRE 1.3.1, ja_JP.EUCJP,
      Solaris 8.
      using GLANCE tool.
      1)ResultJapanese.Txt &#8211; Data collected in Japanese locale
      2)ResultEnglish.Txt - Data collected in English Locale

      This behavior is NOT observed if the locale is set to English.
      Kindly suggest us to overcome the above said problem in JAPANESE locale.

      Sample Java Code (Mem.java)
      ----------------
      import java.awt.*;
      import java.awt.event.*;
      public class mem {
        public static void main(String arg[]) {
          showframe sf = new showframe();
          sf.setSize(300,300);
          sf.show();
        }
      }
      class showframe extends Frame implements ActionListener {
        Button b1,b2;
        tpframe tpf ;
        showframe() {
          tpf = new tpframe();
          b1 = new Button("show");
          b2 = new Button("hide");
          setLayout(new FlowLayout());
          add(b1);
          add(b2);
          b1.addActionListener(this);
          b2.addActionListener(this);

        }
        public void actionPerformed(ActionEvent ae) {
          if(ae.getSource()==b1) {
            tpf = new tpframe();
            tpf.setVisible(true);
          }
          if(ae.getSource()==b2) {
            tpf.setVisible(false);
          }
        }

      }

      class tpframe extends Frame {
        TextField tx1,tx2,tx3,tx4 ;
        tpframe() {
          Panel p1 = new Panel();
          Label lb1 = new Label("first tab panel");
          tx1 = new TextField("ONEONE");
          tx2 = new TextField("ONEONE");
          tx3 = new TextField("ONEONE");
          tx4 = new TextField("ONEONE");
          p1.setLayout(new FlowLayout());
          p1.add(lb1);
          p1.add(tx1);
          p1.add(tx2);
          p1.add(tx3);
          p1.add(tx4);
          add(p1,BorderLayout.CENTER);
          setSize(300,300);
        }
      }


      JapaneseResult.txt (Data collected using GLANCE tool in Japanese locale)
      ========================================================================

      B3694A GlancePlus C.03.10.00 04:17:58 nucleus sun4m Current Avg High
      --------------------------------------------------------------------------------
      CPU Util S SUU | 16% 22% 60%
      Disk Util | 0% 1% 3%
      Mem Util SSU U | 42% 42% 42%
      Swap Util U URR | 12% 11% 12%
      --------------------------------------------------------------------------------
      Memory Regions PID: 6521, java PPID: 6485 User: root
                                    
      Type RefCnt VSS VirtAddress File Name
      --------------------------------------------------------------------------------
      TEXT /S 4 24kb 0x00010000 <reg,ufs,i...xf67c61e8>
      BSS /S 4 4kb 0x00025000 <reg,ufs,i...xf67c61e8>
      SHMEM /S 1 2.8mb 0x00026000 <shmem>
      SHMEM /S 1 2.1mb 0xe4000000 <shmem>
      SHMEM /S 1 4.9mb 0xe4220000 <shmem>
      SHMEM /S 1 1.4mb 0xe4710000 <shmem>
      SHMEM /S 1 55.6mb 0xe4870000 <shmem>
      SHMEM /S 1 2.5mb 0xe8000000 <shmem>

      Text VSS: 24kb Data VSS: 4kb Stack VSS: 512kb
      Shmem VSS: 144mb Other VSS: 27mb Total VSS: 37mb


      B3694A GlancePlus C.03.10.00 04:17:58 nucleus sun4m Current Avg High
      --------------------------------------------------------------------------------
      CPU Util S SUU | 16% 22% 60%
      Disk Util | 0% 1% 3%
      Mem Util SSU U | 42% 42% 42%
      Swap Util U URR | 12% 11% 12%
      --------------------------------------------------------------------------------
                                         SWAP SPACE Users= 6
                                    
      Swap Device Type Avail (mb) Used (mb)
      --------------------------------------------------------------------------------
      /dev/dsk/c0t3d0s1 device 514mb 0mb
      pseudo-swap memory 224mb 64mb








      Swap Avail: 738mb Swap Used: 64mb Resvd Util (%): 12 Swap Reserved: 85mb

      *********** after the dialog is shown for the first time ***********

      B3694A GlancePlus C.03.10.00 04:19:22 nucleus sun4m Current Avg High
      --------------------------------------------------------------------------------
      CPU Util SSUU | 6% 20% 85%
      Disk Util | 0% 0% 3%
      Mem Util SSU U | 43% 42% 43%
      Swap Util U URR | 12% 11% 12%
      --------------------------------------------------------------------------------
      Memory Regions PID: 6521, java PPID: 6485 User: root
                                    
      Type RefCnt VSS VirtAddress File Name
      --------------------------------------------------------------------------------
      TEXT /S 4 24kb 0x00010000 <reg,ufs,i...xf67c61e8>
      BSS /S 4 4kb 0x00025000 <reg,ufs,i...xf67c61e8>
      SHMEM /S 1 4.0mb 0x00026000 <shmem>
      SHMEM /S 1 2.1mb 0xe4000000 <shmem>
      SHMEM /S 1 4.9mb 0xe4220000 <shmem>
      SHMEM /S 1 1.4mb 0xe4710000 <shmem>
      SHMEM /S 1 55.6mb 0xe4870000 <shmem>
      SHMEM /S 1 2.5mb 0xe8000000 <shmem>

      Text VSS: 24kb Data VSS: 4kb Stack VSS: 512kb
      Shmem VSS: 145mb Other VSS: 27mb Total VSS: 38mb
        ? -
        
        Swap Device Type Avail (mb) Used (mb)
      --------------------------------------------------------------------------------
      /dev/dsk/c0t3d0s1 device 514mb 0mb
      pseudo-swap memory 224mb 66mb








      Swap Avail: 738mb Swap Used: 66mb Resvd Util (%): 12 Swap Reserved: 88mb
       
      *********** after opening and closing the dialog 3 times ********
       B3694A GlancePlus C.03.10.00 04:20:25 nucleus sun4m Current Avg
      High
      --------------------------------------------------------------------------------
      CPU Util S SU U | 18% 20% 85%
      Disk Util | 0% 0% 3%
      Mem Util SSU U | 43% 42% 43%
      Swap Util U URR | 12% 11% 12%
      --------------------------------------------------------------------------------
      Memory Regions PID: 6521, java PPID: 6485 User: root

      Type RefCnt VSS VirtAddress File Name
      --------------------------------------------------------------------------------
      TEXT /S 4 24kb 0x00010000 <reg,ufs,i...xf67c61e8>
      BSS /S 4 4kb 0x00025000 <reg,ufs,i...xf67c61e8>
      SHMEM /S 1 4.9mb 0x00026000 <shmem>
      SHMEM /S 1 2.1mb 0xe4000000 <shmem>
      SHMEM /S 1 4.9mb 0xe4220000 <shmem>
      SHMEM /S 1 1.4mb 0xe4710000 <shmem>
      SHMEM /S 1 55.6mb 0xe4870000 <shmem>
      SHMEM /S 1 2.5mb 0xe8000000 <shmem>

      Text VSS: 24kb Data VSS: 4kb Stack VSS: 512kb
      Shmem VSS: 146mb Other VSS: 27mb Total VSS: 39mb
        ? -
        
        Swap Device Type Avail (mb) Used (mb)
      --------------------------------------------------------------------------------
      /dev/dsk/c0t3d0s1 device 514mb 0mb
      pseudo-swap memory 224mb 67mb








      Swap Avail: 738mb Swap Used: 67mb Resvd Util (%): 12 Swap Reserved: 89mb


      **************** opening and closing for next 3 times ( total 6 times )
      **********
      B3694A GlancePlus C.03.10.00 04:21:26 nucleus sun4m Current Avg High
      --------------------------------------------------------------------------------
      CPU Util S SUU | 9% 20% 85%
      Disk Util | 0% 0% 3%
      Mem Util SSU U | 43% 43% 43%
      Swap Util U URR | 12% 11% 12%
      --------------------------------------------------------------------------------
      Memory Regions PID: 6521, java PPID: 6485 User: root

      Type RefCnt VSS VirtAddress File Name
      --------------------------------------------------------------------------------
      TEXT /S 4 24kb 0x00010000 <reg,ufs,i...xf67c61e8>
      BSS /S 4 4kb 0x00025000 <reg,ufs,i...xf67c61e8>
      SHMEM /S 1 5.8mb 0x00026000 <shmem>
      SHMEM /S 1 2.1mb 0xe4000000 <shmem>
      SHMEM /S 1 4.9mb 0xe4220000 <shmem>
      SHMEM /S 1 1.4mb 0xe4710000 <shmem>
      SHMEM /S 1 55.6mb 0xe4870000 <shmem>
      SHMEM /S 1 2.5mb 0xe8000000 <shmem>

      Text VSS: 24kb Data VSS: 4kb Stack VSS: 512kb
      Shmem VSS: 147mb Other VSS: 27mb Total VSS: 40mb
        ? -
        
        Swap Device Type Avail (mb) Used (mb)
      --------------------------------------------------------------------------------
      /dev/dsk/c0t3d0s1 device 514mb 0mb
      pseudo-swap memory 224mb 67mb








      Swap Avail: 738mb Swap Used: 67mb Resvd Util (%): 12 Swap Reserved: 89mb
       
       *********** after opening and closing the dialog 3 more times ( total 9
      times )********



      EnglishResult.Txt (Data collected using GLANCE Tool in English locale)
      -----------------------------------------------------------------------
      -----------------------------------------------------------------------


      B3694A GlancePlus C.03.10.00 04:01:33 nucleus sun4m Current
      Avg High
      --------------------------------------------------------------------------------
      -----
      CPU Util S SUU | 17%
      36% 100%
      Disk Util DD | 3%
      1% 3%
      Mem Util SSU U | 35%
      34% 35%
      Swap Util U URR | 9%
      8% 9%
      --------------------------------------------------------------------------------
      -----
      Memory Regions PID: 6310, java PPID: 6264 User: root
                                    
      Type RefCnt VSS VirtAddress File Name
      --------------------------------------------------------------------------------
      TEXT /S 4 24kb 0x00010000 <reg,ufs,i...xf67c61e8>
      BSS /S 4 4kb 0x00025000 <reg,ufs,i...xf67c61e8>
      SHMEM /S 1 2.3mb 0x00026000 <shmem>
      SHMEM /S 1 2.1mb 0xe4000000 <shmem>
      SHMEM /S 1 4.9mb 0xe4220000 <shmem>
      SHMEM /S 1 1.4mb 0xe4710000 <shmem>
      SHMEM /S 1 55.6mb 0xe4870000 <shmem>
      SHMEM /S 1 2.0mb 0xe8000000 <shmem>
      SHMEM /S 1 30.0mb 0xe8200000 <shmem>
      SHMEM /S 1 516kb 0xeab40000 <shmem>
      SHMEM /S 1 516kb 0xeac00000 <shmem>

      Text VSS: 24kb Data VSS: 4kb Stack VSS: 512kb
      Shmem VSS: 143mb Other VSS: 26mb Total VSS: 35mb


      Swap Device Type Avail (mb) Used (mb)
      --------------------------------------------------------------------------------
      /dev/dsk/c0t3d0s1 device 514mb 0mb
      pseudo-swap memory 224mb 46mb


      Swap Avail: 738mb Swap Used: 46mb Resvd Util (%): 9 Swap Reserved: 67mb
       
       ************* after the dialog was opened for the first time **********
       
       B3694A GlancePlus C.03.10.00 04:03:39 nucleus sun4m Current
      Avg High
      --------------------------------------------------------------------------------
      -----
      CPU Util SSUU | 7%
      19% 100%
      Disk Util | 0%
      0% 3%
      Mem Util SSU U | 35%
      35% 35%
      Swap Util U URR | 9%
      8% 9%
      --------------------------------------------------------------------------------
      -----
      Memory Regions PID: 6310, java PPID: 6264 User: root
                                    
      Type RefCnt VSS VirtAddress File Name
      --------------------------------------------------------------------------------
      TEXT /S 4 24kb 0x00010000 <reg,ufs,i...xf67c61e8>
      BSS /S 4 4kb 0x00025000 <reg,ufs,i...xf67c61e8>
      SHMEM /S 1 2.3mb 0x00026000 <shmem>
      SHMEM /S 1 2.1mb 0xe4000000 <shmem>
      SHMEM /S 1 4.9mb 0xe4220000 <shmem>
      SHMEM /S 1 1.4mb 0xe4710000 <shmem>
      SHMEM /S 1 55.6mb 0xe4870000 <shmem>
      SHMEM /S 1 2.2mb 0xe8000000 <shmem>
      SHMEM /S 1 29.7mb 0xe8240000 <shmem>
      SHMEM /S 1 516kb 0xeab40000 <shmem>
      SHMEM /S 1 516kb 0xeac00000 <shmem>

      Text VSS: 24kb Data VSS: 4kb Stack VSS: 512kb
      Shmem VSS: 143mb Other VSS: 26mb Total VSS: 36mb

      Swap Device Type Avail (mb) Used (mb)
      --------------------------------------------------------------------------------
      /dev/dsk/c0t3d0s1 device 514mb 0mb
      pseudo-swap memory 224mb 46mb


      Swap Avail: 738mb Swap Used: 46mb Resvd Util (%): 9 Swap Rese

            sherman Xueming Shen
            yyoungsunw Yung-ching Young (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: