changelog
- Mon, 27 Jun 2016 16:08:34 +0800
- by aoqi<aoqi@loongson.cn> [Mon, 27 Jun 2016 16:08:34 +0800] rev 26
- [Code Reorganization] Removed compilation policy related modifications made by Loongson.
- Fri, 24 Jun 2016 17:12:13 +0800
- by aoqi<aoqi@loongson.cn> [Fri, 24 Jun 2016 17:12:13 +0800] rev 25
- [Code Reorganization] Removed GC related modifications made by Loongson, for example, UseOldNUMA.
- Wed, 22 Jun 2016 14:26:49 +0800
- by Ao Qi<aoqi1986@gmail.com> [Wed, 22 Jun 2016 14:26:49 +0800] rev 24
- Added tag mips64-jdk8u25-b17-rc2 for changeset afa196fe1bf6
- Wed, 22 Jun 2016 14:26:01 +0800
- by Ao Qi<aoqi1986@gmail.com> [Wed, 22 Jun 2016 14:26:01 +0800] rev 23
- Added tag mips64-jdk8u25-b17-rc1 for changeset 2d8a650513c2
- Wed, 22 Jun 2016 14:25:28 +0800
- by Ao Qi<aoqi1986@gmail.com> [Wed, 22 Jun 2016 14:25:28 +0800] rev 22
- Added tag jdk8u25-b17 for changeset f90c822e73f8
- Tue, 14 Jun 2016 20:05:43 +0800
- by aoqi [Tue, 14 Jun 2016 20:05:43 +0800] rev 21
- Fixed an n64 ABI incompatibility in generate_native_wrapper.
Before this fix, when calling
JavaThread::check_special_condition_for_native_trans, it could be possible
that SP is 64-bit aligned but not 128-bit aligned in the C function.
- Tue, 14 Jun 2016 20:04:50 +0800
- by aoqi [Tue, 14 Jun 2016 20:04:50 +0800] rev 20
- [C2] Fixed Fast_Unlock.
Running "java -jar SPECjvm2008.jar -bt 4 derby" on 3A2000 may cause jvm crash.
The
crash infomation is:
#
# A fatal error has been detected by the Java Runtime Environment:
#
# SIGSEGV (0xb) at pc=0x000000ffeb17dca8, pid=9369, tid=1098526224880
#
# JRE version: OpenJDK Runtime Environment (8.0) (build
# 1.8.0_internal-loongson_2016_06_02_17_06-b00)
# Java VM: OpenJDK 64-Bit Server VM (25.25-b02 mixed mode linux- compressed
# oops)
# Problematic frame:
# V [libjvm.so+0x8f9ca8] ObjectSynchronizer::slow_exit(oopDesc*, BasicLock*,
# Thread*)+0x10
#
# Failed to write core dump. Core dumps have been disabled. To enable core
# dumping, try "ulimit -c unlimited" before starting Java again
#
# An error report file with more information is saved as:
# /home/loongson/aoqi/jdk-test/SPECjvm2008/hs_err_pid9369.log
#
# If you would like to submit a bug report, please visit:
# http://bugreport.sun.com/bugreport/crash.jsp
#
- Sun, 12 Jun 2016 09:32:41 +0800
- by aoqi [Sun, 12 Jun 2016 09:32:41 +0800] rev 19
- Fixed a potential bug related to MIPS RIXI.
The Loongson new kernel supported MIPS RIXI. The code before this fix may
cause fault in the new kernel.
- Sun, 12 Jun 2016 09:26:58 +0800
- by aoqi [Sun, 12 Jun 2016 09:26:58 +0800] rev 18
- [Interpreter] Fixed unaligned load in MacroAssembler::biased_locking_enter.
If tmp_reg = lock_reg, ld_ptr(swap_reg, saved_mark_addr) in line 844 may cause unaligned
load and cause slow case of monitorenter. This is because both saved_mark_addr
and tmp_reg use the same register lock_reg.
- Thu, 02 Jun 2016 17:52:46 +0800
- by aoqi [Thu, 02 Jun 2016 17:52:46 +0800] rev 17
- adjust-mflags.sh failed build with GNU Make 4.0 with -I<path contains j>
see: http://hg.openjdk.java.net/jdk8u/jdk8u/hotspot/rev/fb6a855141cb
- Tue, 31 May 2016 00:22:06 -0400
- by aoqi [Tue, 31 May 2016 00:22:06 -0400] rev 16
- [Code Reorganization] load_two_bytes_from_at_bcp -> get_2_byte_integer_at_bcp
remove useless MacroAssembler::store_two_byts_to_at_bcp
change MacroAssembler::load_two_bytes_from_at_bcp to InterpreterMacroAssembler::get_2_byte_integer_at_bcp
change MacroAssembler::get_4_byte_integer_at_bcp to InterpreterMacroAssembler::get_4_byte_integer_at_bcp
- Mon, 30 May 2016 03:07:54 -0400
- by aoqi [Mon, 30 May 2016 03:07:54 -0400] rev 15
- [Interpreter] Fixed unaligned load in TemplateTable::branch.
Effect:
java -jar SPECjvm2008.jar -ikv -ict -bt 1 xml.transform
unaligned access: 428303 -> 873
- Mon, 30 May 2016 02:35:49 -0400
- by aoqi [Mon, 30 May 2016 02:35:49 -0400] rev 14
- [Interpreter] Fixed unaligned load in InterpreterMacroAssembler::get_cache_index_at_bcp
java -jar SPECjvm2008.jar -ikv -ict -bt 1 startup.helloworld
Effect:
elimated 24 unaligned load in startup.helloworld and many other benchmarks.
- Mon, 30 May 2016 02:01:38 -0400
- by aoqi [Mon, 30 May 2016 02:01:38 -0400] rev 13
- [C2] Rewrite generate_disjoint_short_copy.
Eliminated unaligned access and Optimized copy algorithm.
xml.transform improved by 50%, total GEO improved by 13%.
Copy Algorithm:
Generate stub for disjoint short copy. If "aligned" is true, the
"from" and "to" addresses are assumed to be heapword aligned.
Arguments for generated stub:
from: A0
to: A1
elm.count: A2 treated as signed
one element: 2 bytes
Strategy for aligned==true:
If length <= 9:
1. copy 1 elements at a time (l_5)
If length > 9:
1. copy 4 elements at a time until less than 4 elements are left (l_7)
2. copy 2 elements at a time until less than 2 elements are left (l_6)
3. copy last element if one was left in step 2. (l_1)
Strategy for aligned==false:
If length <= 9: same as aligned==true case
If length > 9:
1. continue with step 7. if the alignment of from and to mod 4
is different.
2. align from and to to 4 bytes by copying 1 element if necessary
3. at l_2 from and to are 4 byte aligned; continue with
6. if they cannot be aligned to 8 bytes because they have
got different alignment mod 8.
4. at this point we know that both, from and to, have the same
alignment mod 8, now copy one element if necessary to get
8 byte alignment of from and to.
5. copy 4 elements at a time until less than 4 elements are
left; depending on step 3. all load/stores are aligned.
6. copy 2 elements at a time until less than 2 elements are
left. (l_6)
7. copy 1 element at a time. (l_5)
8. copy last element if one was left in step 6. (l_1)
TODO:
1. use loongson 128-bit load/store
2. use loop unrolling optimization when len is big enough, for example if
len > 0x2000:
__ bind(l_x);
__ ld(AT, tmp1, 0);
__ ld(tmp, tmp1, 8);
__ sd(AT, tmp2, 0);
__ sd(tmp, tmp2, 8);
__ ld(AT, tmp1, 16);
__ ld(tmp, tmp1, 24);
__ sd(AT, tmp2, 16);
__ sd(tmp, tmp2, 24);
__ daddi(tmp1, tmp1, 32);
__ daddi(tmp2, tmp2, 32);
__ daddi(tmp3, tmp3, -16);
__ daddi(AT, tmp3, -16);
__ bgez(AT, l_x);
__ delayed()->nop();
- Mon, 30 May 2016 01:30:23 -0400
- by aoqi [Mon, 30 May 2016 01:30:23 -0400] rev 12
- Fix Bytes::swap_u2, Bytes::swap_u4 and Bytes::swap_u8.
use library function. same as ppc.
- Wed, 18 May 2016 16:40:00 -0400
- by aoqi [Wed, 18 May 2016 16:40:00 -0400] rev 11
- Fixed a unaligned load.
- Wed, 11 May 2016 09:32:14 -0400
- by Jin [Wed, 11 May 2016 09:32:14 -0400] rev 10
- [C2] InlineSmallCode=4000: xml.validation 14.57% up
3A2000, -bt 4:
* compiler.compiler: 56.55 -> 56.98, 0.76% up
* compress: 28.69 -> 33.26, 15.93% up
* xml.transform: 18.73 -> 20.76, 10.84% up
* xml.validation: 40.71 -> 46.64, 14.57% up
- Tue, 10 May 2016 15:22:05 -0400
- by aoqi [Tue, 10 May 2016 15:22:05 -0400] rev 9
- Fixed print_reg.
print_reg(A0) outputs wrong result.
- Tue, 10 May 2016 15:08:51 -0400
- by aoqi [Tue, 10 May 2016 15:08:51 -0400] rev 8
- Fixed changset 108.
- Sun, 08 May 2016 22:17:54 -0400
- by Jin [Sun, 08 May 2016 22:17:54 -0400] rev 7
- [C2] disjoint_byte_copy: fix unaligned LW/SW
/mnt/j2sdk-image/bin/java \
-XX:+PrintCompilation \
-XX:CompileCommand="compileonly,java/util/jar/Manifest\$FastInputStream.*" \
-jar SPECjvm2008.jar -ikv -coe -ict -bt 1 \
compress
It triggers 35000 unaligned instructions.
280 CALL_LEAF_NOFP,runtime jbyte_arraycopy
a0: (-122610748, .) fc127a6b pc: ffe9809004 <-- src是个奇地址
a1: (-122610748, .) fc128100 pc: ffe980910c <-- dest是个偶地址
a2: (-122610748, .) 2b pc: ffe9809210
t3: (-122610748, .) fc127a6c pc: ffe98093a4 <-- 试图把src对齐4字节,
t0: (-122610748, .) fc128101 pc: ffe98094a8 <-- 则dest就不对齐了,使用sw就出了unalign
t3: (-122610747, *) fc127a70 pc: ffe98093a4
t0: (-122610747, .) fc128105 pc: ffe98094a8 <-- 后面所有对dest的访问都会unalign
t3: (-122610746, *) fc127a74 pc: ffe98093a4
t0: (-122610746, .) fc128109 pc: ffe98094a8
Effect:
* 0 unaligned instructions.
- Sun, 08 May 2016 17:53:51 -0400
- by Jin [Sun, 08 May 2016 17:53:51 -0400] rev 6
- Bytes::put_native_u4: fix unaligned
$ java -Xint -version
It triggers 28 unaligned instructions.
Bytes::put_native_u4() requires unaligned writes.
Effect:
* -Xint -version: 0 unaligned instructions.
- Sun, 08 May 2016 12:25:24 -0400
- by Jin [Sun, 08 May 2016 12:25:24 -0400] rev 5
- [NativeWrapper] stack_guard_state_offset: fix unaligned lwu
When running d.java from http://10.2.5.28/dev/wiki/JDK-test-programs,
the unaligned counter growes at 1656301 /s
An enum type should be read with LW, not LD.
Effect:
* d.java: 0 unaligned access
- Sat, 07 May 2016 07:38:03 -0400
- by Jin [Sat, 07 May 2016 07:38:03 -0400] rev 4
- [Interpreter] ProfileInterpreter: fix unaligned lwu
When running compress in debug mode,
/mnt/j2sdk-image/bin/java \
-Xmx68M -Xms68M \
-XX:CompileCommand="compileonly,spec/benchmarks/compress/Decompressor\$SuffixTable.of1" \
-XX:+PrintCompilation \
-XX:-CICompileNatives \
-XX:+ProfileInterpreter \
-XX:-UseTLAB \
-XX:+UseLoopCounter \
-XX:+UseOnStackReplacement \
-XX:+UseSerialGC \
-jar SPECjvm2008.jar -ikv -coe -ict -bt 1 \
compress
Though no method is compiled, the unaligned counter reaches 779990 /s.
This error doesn't exist in product version.
Effect:
- compress + debug + +ProfileInterpreter: 0 unaligned access
- Thu, 05 May 2016 17:04:35 -0400
- by Jin [Thu, 05 May 2016 17:04:35 -0400] rev 3
- TemplateTable::fast_xaccess(): fix unaligned lhu
BCP and offset may both be unaligned.
Two LBU are required.
public class List {
public List next;
public void insert() {
List p = new List();
p.next = this.next;
}
public static void main(String[] args) throws Exception {
List th = new List();
while(true)
th.insert();
}
}
Effect:
- -Xint: 0 unaligned access
- Thu, 05 May 2016 14:53:07 -0400
- by Jin [Thu, 05 May 2016 14:53:07 -0400] rev 2
- TemplateTable::_new(): fix unaligned lw
InstanceKlass::init_state is defiend as "u2" and is assigned to 2-byte
boundary. Its offset is 0x16a.
Such field should be accessed with LHU.
public class List {
public static void main(String[] args) {
List th;
while(true)
th = new List();
}
}
Effect:
* -Xmixed / -Xint: no unaligned instructions
- Fri, 29 Apr 2016 00:06:10 +0800
- by aoqi [Fri, 29 Apr 2016 00:06:10 +0800] rev 1
- Added MIPS 64-bit port.
- Wed, 27 Apr 2016 01:25:04 +0800
- by aoqi [Wed, 27 Apr 2016 01:25:04 +0800] rev 0
- Initial load
http://hg.openjdk.java.net/jdk8u/jdk8u/hotspot/
changeset: 6782:28b50d07f6f8
tag: jdk8u25-b17