Commit Graph

24 Commits

Author SHA1 Message Date
dingwen f7c357a8d4 SnapShot serialize and deserialize by using ObjectXray visit object
field
issue:https://gitee.com/openharmony/ark_js_runtime/issues/I4ZOXH

Signed-off-by: dingwen <dingwen6@huawei.com>
Change-Id: I6e03cfb4f7b89786b612b56adc0877f8b178058e
2022-04-10 12:32:07 +08:00
lukai 7653faf3fe merge bugfix from release into master
1. !888:fix gc bugs
2. !851:Fix ic store prototype bugs
3. !803:Fix Security Check Problems
4. other related ut bugfix.

Signed-off-by: lukai <lukai25@huawei.com>
Change-Id: I4dd30efd176fd33fefd064aee0cb30e5fd3e0477
2022-04-02 17:49:22 +08:00
wuzhefeng 034c425bea Refactor redundant codes
Remove redundant codes, like the variables that have the same
functionality. Besides, Some variables and functions' names are improper
and should be renamed in order to improve the readability.

issues: I50D00

Signed-off-by: wuzhefeng <wuzhefeng1@huawei.com>
Change-Id: Iecb75cd924167d53b4f12c572f18a8b9e3a9c0a7
2022-03-29 23:49:20 -07:00
lukai a30877ddea fix native pointer bugs
a native pointer should not be used after gc
issue: https://gitee.com/openharmony/ark_js_runtime/issues/I4ZJ92?from=project-issue

Signed-off-by: lukai <lukai25@huawei.com>
Change-Id: If103791ac792aa1e0f4c7f03a07f8fbd9a2a58c2
2022-03-25 12:50:26 +08:00
wengchangcheng 4804cd80d3 add Wextra and Werror in gn args
1. add -Wextra and -Werror to check code format error
2. modify all compiler error

issue: https://gitee.com/openharmony/ark_js_runtime/issues/I4ZDQE

Signed-off-by: wengchangcheng <wengchangcheng@huawei.com>
Change-Id: If5fdd1980494269b4c06bf1bb38a8eba7952adea
2022-03-24 21:45:19 +08:00
DaiH 3e5c4da8c3 Change file folder "platform" to "tastpool"
Signed-off-by: DaiH <daihuina1@huawei.com>

1. Change file folder "platform" to "tastpool"
2. Change class "platform" to "tastpool"

https: //gitee.com/openharmony/ark_js_runtime/issues/I4Z7EU
Change-Id: Ife3f2a9e52a02e5046e3ccd936f1993aa225e908
2022-03-23 15:43:38 +08:00
xujie 261cd01813 Fix Compile Issue
Change slowpath_lowering macro RUNTIME_CALL_ID to RTSTUB_ID and
passmanager Interface getCurrent to GetInstance, add lamda reg and
LowerHirToCall.

Issue: https://gitee.com/openharmony/ark_js_runtime/issues/I4YXJT

Signed-off-by: xujie <xujie101@huawei.com>
Change-Id: Ib58afdbdbac109c2f3c35e8a6f195aa4995464b5
2022-03-22 11:08:48 +08:00
wengchangcheng 88ee30a2eb add build flag '-Wall'
issue: https://gitee.com/openharmony/ark_js_runtime/issues/I4YVDY

Signed-off-by: wengchangcheng <wengchangcheng@huawei.com>
Change-Id: I6a4d28ad86f4c99684a6a6b55ed541861bf1a873
2022-03-21 21:18:59 +08:00
yingguofeng@huawei.com ef47d16109 Fix update weak reference in concurrent marking
When concurrent mark, the value of Slot may be modified.So It need to judge weak reference.

https://gitee.com/openharmony/ark_js_runtime/issues/I4YI3M?from=project-issue

Signed-off-by: yingguofeng@huawei.com <yingguofeng@huawei.com>
Change-Id: I43bb080ff6eded0671a3029330e84be15d0b7d2a
2022-03-18 16:33:37 +08:00
openharmony_ci 1dc10a3958 !759 Fix ts benchmark oom
Merge pull request !759 from xiongluo/ts_benchmark_oom
2022-03-15 06:43:58 +00:00
xiongluo ed850e9ddf Fix ts benchmark oom by reducing the limits.
Tsbenchmark app will crash by random clicking. The reason of crash is oom.

Use heap object size to calculate the limits instead of committed size,
and change the max size of old space.

issue:https://gitee.com/openharmony/ark_js_runtime/issues/I4XN6D

Signed-off-by: xiongluo <xiongluo@huawei.com>
2022-03-14 17:40:45 -10:00
ding e0b8620c6c modify transitions to weak reference
1.modify transitions to weak reference and delete parent field in JSHClass.
2.add targeted test case to intercept the issue.
3.fix weak ref in parallel gc
4.fix TaggedCastToWeakReferentUnChecked() in stub

Change-Id: I118d293a04390fba6c21179a0a8ac7993dae5e96
Signed-off-by: ding <dingding5@huawei.com>
2022-03-14 11:02:43 +08:00
yingguofeng@huawei.com ac6332be22 Fix VerificationTest Failure
Issue:https://gitee.com/openharmony/ark_js_runtime/issues/I4VNFE?from=project-issue

Change-Id: I3a76284a6cc75895bd50c9a77c08df96b3e60ce2
Signed-off-by: yingguofeng@huawei.com <yingguofeng@huawei.com>
2022-02-28 20:54:00 +08:00
yingguofeng@huawei.com 12e27e6863 Heap code refactoring
Delete MemManager class. The allocation function move to heap.cpp. The Space
manage Allocator.

issue: https://gitee.com/openharmony/ark_js_runtime/issues/I4UTFQ

Change-Id: I03cef52d9a1c86b07323de1e19ead53fe6daaf99
Signed-off-by: yingguofeng@huawei.com <yingguofeng@huawei.com>
2022-02-25 16:03:15 +08:00
openharmony_ci 155454a968 !612 ark_dev CI failed: fangtaobao sliding test crash bugfix
Merge pull request !612 from yingguofeng/ark_dev
2022-02-23 12:41:50 +00:00
yingguofeng@huawei.com ceeacc44ce ark_dev CI failed: fangtaobao sliding test crash bugfix
issue:https://gitee.com/openharmony/ark_js_runtime/issues/I4UYH5?from=project-issue

Signed-off-by: yingguofeng@huawei.com <yingguofeng@huawei.com>
Change-Id: Ie652d7e26398215fd92907ebdb34d4a0b4a48ba5
2022-02-23 16:29:15 +08:00
xiongluo 70147c1220 The limits of old space and global space were fixed.
According to the survival rate, adjust the initial old space limit adaptively.

 https://gitee.com/openharmony/ark_js_runtime/issues/I4UAY2

Signed-off-by: xiongluo <xiongluo@huawei.com>
2022-02-21 23:05:13 -10:00
yingguofeng@huawei.com 3ace067f87 GC performance optimization
1、Delete strategy no gc for start up
2、Adapter performance tools: runtime stat
3、Modify freeObjectKind to freeObjectSet

issue:https://gitee.com/openharmony/ark_js_runtime/issues/I4SASV?from=project-issue

Signed-off-by: yingguofeng@huawei.com <yingguofeng@huawei.com>
Change-Id: I01643755057b6146d1f6b67032256e687873cd07
2022-02-15 14:24:21 +08:00
yingguofeng@huawei.com ef9b13734d Performance optimization for gc
1、Optimize GC parallel evacate strategy: evacuate to old space with FreeListAllocator.
2、Adjust strategy that whole region evacuate: Only support new fromspace to new tospace.
3、Adjust Semi space capacity growing/shrinking strategy and Adjust Semi space initialize size.

splay-benchmark:
blue zone: ark_js(2500), v8(2000)
ark-dev:  ark(1200), v8(1500)

issue:https://gitee.com/openharmony/ark_js_runtime/issues/I4SASV?from=project-issue

Signed-off-by: yingguofeng@huawei.com <yingguofeng@huawei.com>
Change-Id: Ie9c6e94c47f531bf9c1ebf5bc7443dd1acb7d2ac
2022-02-15 14:23:43 +08:00
songzhengchao c715b45033 implement fastpath writebarrier and region class init markingbitmap on
construct function and refactor stub call runtime offset which's relative with
arch framework

current stub call runtime writebarrier, writebarrier stub is conveient
to optimized by llvm pass

region class markingbitmap should be not nullptr, it's good way to
inilized on construct class other than lazy inilized

current stub get member offset of runtime class, need to modify multiple
places which is not coveient to maintance. stub call offset by GetOldToxxxOffset and
CheckLayout which is checked by compile phase

issue: https://gitee.com/openharmony/ark_js_runtime/issues/I4SC94
Change-Id: Iec087f07ca27ef95b20ff65ea8bb9408b5887d9c
Signed-off-by: songzhengchao <songzhengchao@huawei.com>
2022-02-07 17:23:21 +08:00
xiongluo 510d33a07b Optimize GC trigger
Signed-off-by: xiongluo <xiongluo@huawei.com>
2022-01-13 22:30:21 -10:00
linxiang 3178cc419e fix hppgc bug
Signed-off-by: linxiang <linxiang8@huawei.com>
2022-01-07 11:00:49 +08:00
yingguofeng@huawei.com 1d9b2ac3dd nativePointer optimization
Change-Id: I97b58375c2ec30f33778d7f11fb40a9cf0ed346b
Signed-off-by: yingguofeng@huawei.com <yingguofeng@huawei.com>
2021-12-23 19:40:54 +08:00
zhangyukun a97747fe18 Description:sync from code from wgr_master to ohos
Signed-off-by: zhangyukun <zhangyukun8@huawei.com>
Change-Id: Ic66a9e649de8c0ce530483296fe323b8f50621fb
2021-12-21 09:36:03 +08:00