23 Commits

Author SHA1 Message Date
lukai 2a7a4390ee add read-only space
realize read-only space to manage read-only object
issue: https://gitee.com/openharmony/ark_js_runtime/issues/I5DHA7?from=project-issue

Signed-off-by: lukai <lukai25@huawei.com>
Change-Id: I94007e4a2ad990ca21a182afa182713cae390a76
2022-06-28 09:15:29 +08:00
lukai 7b695c2ae5 adjust pool size and related vm-memory according to physical memory
issue: https://gitee.com/openharmony/ark_js_runtime/issues/I5CCG0?from=project-issue

Signed-off-by: lukai <lukai25@huawei.com>
Change-Id: I46bf3a11ef509ece55b45edc92bb7cb68c100dfa
2022-06-18 14:38:43 +08:00
Yuqiang Xian ec35dbada7 Merge remote-tracking branch 'oh/master' 2022-06-13 11:49:01 +08:00
getingke 62d97885f8 fixed for aot call asm interpreter
Change-Id: I052dfa2e8849b5a9645bac4389099266efd5047e
Signed-off-by: getingke <getingke@huawei.com>
2022-06-09 11:28:11 +08:00
Yuqiang Xian 9398651bdf Split region flag type declaration into separated Space type and GC flags.
Issue: https://gitee.com/openharmony/ark_js_runtime/issues/I590Z8

Signed-off-by: Yuqiang Xian <xianyuqiang@huawei.com>
2022-06-07 17:10:37 +08:00
Yuqiang Xian 34c428f16a Re-organize the region flags.
1) Separate the space type flags from the GC related flags;
2) the space type flags should be exclusive with each other, hence we shouldn't make them denoted
   by specific dedicated bits respectively, because in that way we can't avoid multiple bits being set,
   which is not what we expect.
3) the GC related flags are kept using dedicated flag bit for now. Going forward we should continuouslly
   improve this, e.g., to check if some of these flags are also exclusive with each other, and to better
   separate them from the space type flags with separately declared types, etc.
4) The judgement of whether an object is containted in the heap is _somehow_ improved, but as mentioned
   in the code comments, it's still not safe and accurate enough, be careful when using it.

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

Signed-off-by: Yuqiang Xian <xianyuqiang@huawei.com>
2022-06-06 17:23:27 +08:00
Yuqiang Xian c492d6a7bc Merge remote-tracking branch 'oh/master' 2022-06-02 00:31:44 +08:00
lukai 1a5e085031 support memory parameters configuration
1. heap configuration including heapSize and space capaticity
2. other parameters such as gcThreadNum, longPauseTime.
issue:https://gitee.com/openharmony/ark_js_runtime/issues/I59HYO?from=project-issue

Signed-off-by: lukai <lukai25@huawei.com>
Change-Id: If3bfe7338ae0712809d9750fef3bbbb14017223f
2022-05-30 17:22:08 +08:00
Yuqiang Xian daf51dae0f Refactor Heap Region class.
1) Get rid of the dependency on "Space";
2) Fix a bug in RegionFlags definition, and tidy it up.
3) Fix the flag check logic to make it support multi-bit test;
4) Clean-up some logic to determine if a region or an object is valid / alive;

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

Signed-off-by: Yuqiang Xian <xianyuqiang@huawei.com>
2022-05-24 16:28:00 +08:00
Yuqiang Xian d9d281af16 Merge remote-tracking branch 'oh/master' 2022-05-10 19:04:40 +08:00
openharmony_ci 94bf56d64b !1230 fix part of the use case problem
Merge pull request !1230 from wanyanglan/master
2022-05-09 04:09:17 +00:00
wanyanglan 404fc3fb09 fix part of the use case problem
1. AssemblerStubTest adapts to the latest llvm library
2. Fix aottest failure in heapverify open state
3. Shield createemptyarray, definefunc use cases.

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

Signed-off-by: wanyanglan <wanyanglan1@huawei.com>
Change-Id: Id8836d378832a68a3a17105809f2f4710918fc3a
2022-05-08 22:50:59 +08:00
dingwen 61b6782b65 Snapshot code optimization
Description:Snapshot code optimization include modify class name SnapShotSerialize to SnapShotHandler, delete some magic number, add interface to acquire global env and global const object index.
Issue:https://gitee.com/openharmony/ark_js_runtime/issues/I55CQ3

Signed-off-by: dingwen <dingwen6@huawei.com>
Change-Id: I338028c5cfd4f992095f2bded2956e33f275bb1b
2022-05-07 09:23:06 +08:00
Yuqiang Xian 42bbb16a55 Get rid of "Heap" class / instance dependency from "Space" base class.
Issue: https://gitee.com/openharmony/ark_js_runtime/issues/I55HWI

Signed-off-by: Yuqiang Xian <xianyuqiang@huawei.com>
2022-05-05 20:14:16 +08:00
Yuqiang Xian 5dffd792d6 Merge remote-tracking branch 'oh/master' 2022-04-28 11:24:41 +08:00
openharmony_ci 22c945e88f !1113 refactor the uint fileds in jsmethod
Merge pull request !1113 from xiongluo/refactor_jsmethod2
2022-04-28 02:24:32 +00:00
dingwen 6636896a3e Support constpool serialize, global const and global env object reuse, string deduplication
Description:1.Support constpool serialize 2.Global const and global env
object reuse 3.String deduplication
Issue:https://gitee.com/openharmony/ark_js_runtime/issues/I54NF5

Signed-off-by: dingwen <dingwen6@huawei.com>
Change-Id: Ia05fb055b8e846a5437ff49d97e0141f72ee112e
2022-04-27 21:16:00 +08:00
xiongluo d8b0be85b3 refactor the uint fileds in jsmethod
1. make bytecodeArraySize, hotnessCounter, methodId, slotSize into one field methodField.
2. change the interpreter_stub to fit the hotness counter in jsmethod.
3. fix the fail problem of mem controller test.
4. Adjust the timeout value of uinittest

Signed-off-by: xiongluo <xiongluo@huawei.com>
2022-04-27 02:43:40 -10:00
Yuqiang Xian 91c54d3b74 Fix several typos in the code.
Issue: https://gitee.com/openharmony/ark_js_runtime/issues/I54NZF

Signed-off-by: Yuqiang Xian <xianyuqiang@huawei.com>
Change-Id: I51002ec27cbbb46263a104e6e19c5e354dcbc189
2022-04-27 18:28:18 +08:00
yingguofeng@huawei.com aeb8531377 Bitmap Refactor
Refactor the markbitmap used to mark objects and the rememberset used to record cross generational references

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

Change-Id: Icc4ac21219b5b7514b77291e436f79cf286515b2
Signed-off-by: yingguofeng@huawei.com <yingguofeng@huawei.com>
2022-04-22 10:28:36 +08:00
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
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