Re: Problem about arm64 JIT

孙科 <[email protected]>
Newsgroups gmane.comp.mozilla.devel.jseng
Message-ID <CALpAb9OMYk2-N25wBGLrZX+Q2eubjZzAAMJ-feBv8xo_1V3qrw@mail.gmail.com>
2016-05-10 15:46 GMT+08:00 孙科 <[email protected]>:

> Hi, all
>   Through our testing, js-engine has poor performance on arm64.  As far as
> we know, the arm64 ion JIT is not finished yet. And we try to enable
> baseline JIT, but got "illegal instruction" error while exectuting script.
>   When arm64 JIT can be done? The attachment is the baseline JIT GDB
> debugging information, and we can provide arm64 hardware for remote
> debugging.
> Thanks,
> sk
>

_______________________________________________
dev-tech-js-engine mailing list
[email protected]
https://lists.mozilla.org/listinfo/dev-tech-js-engine
gdb-baseline.txt (text/plain, 7.7 KB)
GNU gdb (Ubuntu 7.11-0ubuntu1) 7.11
Copyright (C) 2016 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "aarch64-linux-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
<http://www.gnu.org/software/gdb/documentation/>.
For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from build_DBG.OBJS/dist/bin/js...done.
warning: File "/home/kylin/sk/firefox-46.0+build5/js/src/build_DBG.OBJS/js/src/shell/js-gdb.py" auto-loading has been declined by your `auto-load safe-path' set to "$debugdir:$datadir/auto-load".
To enable execution of this file add
	add-auto-load-safe-path /home/kylin/sk/firefox-46.0+build5/js/src/build_DBG.OBJS/js/src/shell/js-gdb.py
line to your configuration file "/home/kylin/.gdbinit".
To completely disable this security protection add
	set auto-load safe-path /
line to your configuration file "/home/kylin/.gdbinit".
For more information about this security protection see the
"Auto-loading safe path" section in the GDB manual.  E.g., run from the shell:
	info "(gdb)Auto-loading safe path"
(gdb) r --no-ion
Starting program: /home/kylin/sk/firefox-46.0+build5/js/src/build_DBG.OBJS/dist/bin/js --no-ion
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/aarch64-linux-gnu/libthread_db.so.1".
[New Thread 0x7fb6f6d1c0 (LWP 19850)]
[New Thread 0x7fb6d6d1c0 (LWP 19851)]
[New Thread 0x7fb6b6d1c0 (LWP 19852)]
[New Thread 0x7fb696d1c0 (LWP 19853)]
[New Thread 0x7fb676d1c0 (LWP 19854)]
[New Thread 0x7fb656d1c0 (LWP 19855)]
[New Thread 0x7fb636d1c0 (LWP 19856)]
[New Thread 0x7fb616d1c0 (LWP 19857)]
[New Thread 0x7fb5f6d1c0 (LWP 19858)]
[New Thread 0x7fb5d6d1c0 (LWP 19859)]
[New Thread 0x7fb5b6d1c0 (LWP 19860)]
[New Thread 0x7fb596d1c0 (LWP 19861)]
[New Thread 0x7fb576d1c0 (LWP 19862)]
[New Thread 0x7fb556d1c0 (LWP 19863)]
[New Thread 0x7fb536d1c0 (LWP 19864)]
[New Thread 0x7fb516d1c0 (LWP 19865)]
[New Thread 0x7fb4f6d1c0 (LWP 19866)]
[New Thread 0x7fb4d6d1c0 (LWP 19867)]
[New Thread 0x7fb4b6d1c0 (LWP 19868)]
[New Thread 0x7fb496d1c0 (LWP 19869)]
js> for(var i=0; i<100; i++);

Thread 1 "js" received signal SIGILL, Illegal instruction.
0x0000007fb7fd1b80 in ?? ()

(gdb) info frame
Stack level 0, frame at 0x0:
 pc = 0x7fb7fd1b80; saved pc = 0x7fb7fd21f4
 Outermost frame: not enough registers or memory available to unwind further
 Arglist at unknown address.
 Locals at unknown address, Previous frame's sp is 0x0
 
(gdb) x/32i $pc - 8
   0x7fb7fd1b78:	sub	w16, w0, #0x18
   0x7fb7fd1b7c:	stur	w16, [x23,#-32]
=> 0x7fb7fd1b80:	lsl	x0, x0, #5
   0x7fb7fd1b84:	orr	x0, x0, #0x1
   0x7fb7fd1b88:	sub	sp, x28, #0x8
   0x7fb7fd1b8c:	str	x0, [x28,#-8]!
   0x7fb7fd1b90:	mov	sp, x28
   0x7fb7fd1b94:	b	0x7fb7fd0d10
   0x7fb7fd1b98:	brk	#0xdead
   0x7fb7fd1b9c:	brk	#0xdead
   0x7fb7fd1ba0:	ldr	x16, 0x7fb7fd1ba8
   0x7fb7fd1ba4:	br	x16
   0x7fb7fd1ba8:	brk	#0x0
   0x7fb7fd1bac:	brk	#0x0
   0x7fb7fd1bb0:	.inst	0x00000050 ; undefined
   0x7fb7fd1bb4:	.inst	0x00000088 ; undefined
   0x7fb7fd1bb8:	.inst	0x00000000 ; undefined
   0x7fb7fd1bbc:	.inst	0x00000000 ; undefined
   0x7fb7fd1bc0:	.inst	0x00000000 ; undefined
   0x7fb7fd1bc4:	.inst	0x00000000 ; undefined
   0x7fb7fd1bc8:	bfi	x0, x5, #24, #9
   0x7fb7fd1bcc:	.inst	0x0000007f ; undefined
   0x7fb7fd1bd0:	sub	sp, x28, #0x8
   0x7fb7fd1bd4:	str	x2, [x28,#-8]!
   0x7fb7fd1bd8:	sub	sp, x28, #0x8
   0x7fb7fd1bdc:	str	x9, [x28,#-8]!
   0x7fb7fd1be0:	mov	x2, x23
   0x7fb7fd1be4:	sub	x2, x2, #0x30
   0x7fb7fd1be8:	sub	sp, x28, #0x8
   0x7fb7fd1bec:	str	x2, [x28,#-8]!
   0x7fb7fd1bf0:	sub	x0, x23, x28
   0x7fb7fd1bf4:	add	w0, w0, #0x8
   
(gdb) x/32i 0x7fb7fd21f4 - 8
   0x7fb7fd21ec:	ldr	x0, [x9]
   0x7fb7fd21f0:	blr	x0
   0x7fb7fd21f4:	mov	x19, #0x64                  	// #100
   0x7fb7fd21f8:	movk	x19, #0x8000, lsl #32
   0x7fb7fd21fc:	movk	x19, #0xfff8, lsl #48
   0x7fb7fd2200:	ldr	x9, 0x7fb7fd22c4
   0x7fb7fd2204:	ldr	x9, [x9]
   0x7fb7fd2208:	ldr	x0, [x9]
   0x7fb7fd220c:	blr	x0
   0x7fb7fd2210:	tst	w2, w2
   0x7fb7fd2214:	b.ne	0x7fb7fd20ec
   0x7fb7fd2218:	mov	x2, #0xfff9000000000000    	// #-1970324836974592
   0x7fb7fd221c:	ldur	w16, [x23,#-4]
   0x7fb7fd2220:	tst	w16, #0x1
   0x7fb7fd2224:	b.eq	0x7fb7fd222c
   0x7fb7fd2228:	ldur	x2, [x23,#-40]
   0x7fb7fd222c:	b.al	0x7fb7fd2458
   0x7fb7fd2230:	sub	sp, x28, #0x8
   0x7fb7fd2234:	str	x0, [x28,#-8]!
   0x7fb7fd2238:	mov	x0, #0x71d0                	// #29136
   0x7fb7fd223c:	b	0x7fb7fd22cc
   0x7fb7fd2240:	.inst	0xffff008c ; undefined
   0x7fb7fd2244:	bfi	x0, x11, #26, #37
   0x7fb7fd2248:	.inst	0x0000007f ; undefined
   0x7fb7fd224c:	tbnz	x16, #63, 0x7fb7fcb154
   0x7fb7fd2250:	.inst	0x0000007f ; undefined
   0x7fb7fd2254:	tbnz	x16, #63, 0x7fb7fcb19c
   0x7fb7fd2258:	.inst	0x0000007f ; undefined
   0x7fb7fd225c:	bfi	x0, x16, #32, #3
   0x7fb7fd2260:	.inst	0x0000007f ; undefined
   0x7fb7fd2264:	tbnz	x0, #63, 0x7fb7fcaecc
   0x7fb7fd2268:	.inst	0x0000007f ; undefined
   
(gdb) x/128a $sp
0x7fffffe290:	0x7fffffe2a8	0x7fb79c0150
0x7fffffe2a0:	0x7fb3665070	0x0
0x7fffffe2b0:	0x0	0x38
0x7fffffe2c0:	0x7fb3665070	0x0
0x7fffffe2d0:	0x0	0x7fffffe3d0
0x7fffffe2e0:	0x7fb7fc3b0c	0x1c04
0x7fffffe2f0:	0x7fb3669162	0x0
0x7fffffe300:	0xfff9000000000000	0x7fb7fd21e0
0x7fffffe310:	0x0	0x0
0x7fffffe320:	0x0	0x0
0x7fffffe330:	0x1000	0x0
0x7fffffe340:	0x1000	0x7fffffe360
0x7fffffe350:	0xb	0x10
0x7fffffe360:	0x0	0x3000000000000230
0x7fffffe370:	0x0	0x5000000000000298
0x7fffffe380:	0x0	0x20000000000002e8
0x7fffffe390:	0x7fb79c0020	0xb00000308
0x7fffffe3a0:	0x0	0x200000170000034c
0x7fffffe3b0:	0x7fb79c0050	0x1d00000370
0x7fffffe3c0:	0x7fb79c00c0	0x2200000390
0x7fffffe3d0:	0x0	0x0
0x7fffffe3e0:	0x0	0x0
0x7fffffe3f0:	0x0	0x0
0x7fffffe400:	0x0	0x0
0x7fffffe410:	0x4e6c2c <EnterBaseline(JSContext*, js::jit::EnterJitData&)+236>	0x7fffffe6a0
0x7fffffe420:	0x169f000 <_ZTIN6icu_5619CollationRuleParser4SinkE>	0x7fffffea78
0x7fffffe430:	0x7fb791e000	0x7fb792f6a0
0x7fffffe440:	0x7fb7fc3980	0x7fffffe4d8
0x7fffffe450:	0x7fb791e000	0x169f000 <_ZTIN6icu_5619CollationRuleParser4SinkE>
0x7fffffe460:	0x0	0x7fffffe648
0x7fffffe470:	0x4e6c2c <EnterBaseline(JSContext*, js::jit::EnterJitData&)+236>	0x7ffffff430
0x7fffffe480:	0x7fb791e000	0x7fb3338028
0x7fffffe490:	0x169f000 <_ZTIN6icu_5619CollationRuleParser4SinkE>	0x7fffffe648
0x7fffffe4a0:	0x7fb79271d0	0x7fffffe6b0
0x7fffffe4b0:	0x4efb34 <js::jit::EnterBaselineAtBranch(JSContext*, js::InterpreterFrame*, unsigned char*)+532>	0x308
0x7fffffe4c0:	0x30800000012	0x7fb791e000
0x7fffffe4d0:	0x0	0x7fb791e000
0x7fffffe4e0:	0x7fb3350800	0x7fffffeab8
0x7fffffe4f0:	0x0	0x0
0x7fffffe500:	0x0	0x7fb791e070
0x7fffffe510:	0x7fffffeae8	0x839330 <js::LiveSavedFrameCache::trace(js::LiveSavedFrameCache*, JSTracer*)>
0x7fffffe520:	0x0	0x7fb791e018
0x7fffffe530:	0x7fffffe678	0x0
0x7fffffe540:	0x7fb791e038	0x7fffffe998
0x7fffffe550:	0x0	0x100000200
0x7fffffe560:	0x0	0x0
0x7fffffe570:	0x0	0x1
0x7fffffe580:	0x0	0x7fb791e000
0x7fffffe590:	0x7fffffe5a8	0x0
0x7fffffe5a0:	0x1	0x7fffffe648
0x7fffffe5b0:	0x7fb791e000	0x7fb3338028
0x7fffffe5c0:	0x0	0x0
0x7fffffe5d0:	0x0	0xb8c532e811835100
0x7fffffe5e0:	0x7fffffeab8	0x7fffffec50
0x7fffffe5f0:	0x7fb791e018	0x7fb791e038
0x7fffffe600:	0x7fffffea78	0x0
0x7fffffe610:	0x7fb33380b0	0x7fb791e000
0x7fffffe620:	0x819d90 <Interpret(JSContext*, js::RunState&)+33024>	0x7fffffe9c8
0x7fffffe630:	0x7fb791e068	0x7fffffe690
0x7fffffe640:	0xfff9000000000000	0x7fb7fd21e0
0x7fffffe650:	0x7fb3338028	0x7fb3669162
0x7fffffe660:	0x7fffffe640	0x1
0x7fffffe670:	0x0	0x7fb791e018
0x7fffffe680:	0x7fffffe980	0x7fb3665070
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.