Commit Graph

88 Commits

Author SHA1 Message Date
Riachel df34983177 add reportprogress
reportprogress value before StopHeapTracking or DumpHeapSnapshot
issue:https://gitee.com/openharmony/ark_js_runtime/issues/I57VAP

Signed-off-by: Riachel <caolili14@huawei.com>
2022-05-17 20:12:15 +08:00
openharmony_ci e16fc997f0 !1331 fix exception when JsDebuggerManager destroyed
Merge pull request !1331 from Gymee/bugfix
2022-05-17 08:42:23 +00:00
Gymee 3fe7a9313e fix crash when JsDebuggerManager destroyed
Signed-off-by: Gymee <yumeijie@huawei.com>
Change-Id: Ia11785865c0f68f1fe562a9cb6439026334b11ac
2022-05-16 16:18:59 +08:00
wengchangcheng 5b54d1c175 Descriptor: improve debugger performance
details: use binary search when search offset
issue: https://gitee.com/openharmony/ark_js_runtime/issues/I57GFP

Signed-off-by: wengchangcheng <wengchangcheng@huawei.com>
Change-Id: I92a3c995268a274d4751f0474225c366e8f8b999
2022-05-14 23:05:03 +08:00
Gymee 12d704cc4c tackle breakpoint with condition set empty
Signed-off-by: Gymee <yumeijie@huawei.com>
Change-Id: I54892d76bf7cfbb57cafb2d951d4c58333ce841d
2022-05-12 14:39:50 +08:00
openharmony_ci 5ff09c3c7f !1240 enhance evaluation
Merge pull request !1240 from Gymee/evaluate_enhance
2022-05-11 10:38:05 +00:00
openharmony_ci fbe1ae83d2 !1252 modify AddHeapSnapshotChunk event
Merge pull request !1252 from Riachel/master
2022-05-11 03:52:20 +00:00
Riachel a0cf57629a modify AddHeapSnapshotChunk event
issue:https://gitee.com/openharmony/ark_js_runtime/issues/I56RY2

Signed-off-by: Riachel <caolili14@huawei.com>
2022-05-10 18:22:51 +08:00
h00611971 2cb7efa304 fix exception in attach
problem: Turn the firstTime_ flag to false
issue: https://gitee.com/openharmony/ark_js_runtime/issues/I56M5M

Signed-off-by: h00611971 <huangfeijie@huawei.com>
2022-05-10 09:24:59 +08:00
Gymee 832160451d update local scope object when it changed
Signed-off-by: Gymee <yumeijie@huawei.com>
Change-Id: I3b7bfdf71aec34fb42e393148048765b4d51ef65
2022-05-09 16:24:11 +08:00
Gymee 904a4300da support evaluate on target callframe
Signed-off-by: Gymee <yumeijie@huawei.com>
Change-Id: I4e4b4b4f621706e5bb7e88e651fd9f3fb21c2b37
2022-05-09 13:56:17 +08:00
openharmony_ci 0c34e47066 !1178 Snapshot code optimization
Merge pull request !1178 from dingwen/master
2022-05-07 12:55:32 +00: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
hjzhangcm a760638caa fix codex warning
Signed-off-by: hjzhangcm <zhanghaijun20@huawei.com>
2022-05-06 17:52:55 +08:00
openharmony_ci 221548d043 !1201 add closure variables to local scope
Merge pull request !1201 from Gymee/fix_localscope
2022-05-05 15:46:54 +00:00
Gymee 96292cb45c add closure variables to local scope
Signed-off-by: Gymee <yumeijie@huawei.com>
Change-Id: I0ce49467a5cfa027b7ab2f87d9c35ca8c9cd9ba6
2022-05-05 21:24:53 +08:00
openharmony_ci de6782e141 !1187 add FileStream::Good
Merge pull request !1187 from wwx1083752/master
2022-05-05 10:44:56 +00:00
wwx1083752 cf9ab9530c support dump default heapfile
1. add FileStream::Good
2. dump default file when input file is invalid

issue:https://gitee.com/wwx1083752/ark_js_runtime/issues/I55E7O

Signed-off-by: wwx1083752 <wubinbin33@huawei.com>
2022-05-05 10:43:08 +08:00
guobingbing 129ebdbf25 refactor class FrameHandler
Signed-off-by: guobingbing <guobingbing3@huawei.com>
Change-Id: I9f3ff0c04d34a31a34f21da637689eb61d4166f1
2022-05-04 10:36:44 +08:00
openharmony_ci 9386917112 !1176 modify performance of debugger
Merge pull request !1176 from changcheng/debugger_performance
2022-04-28 23:36:07 +00:00
openharmony_ci d15ba0db5c !1168 add heapprofiler domain
Merge pull request !1168 from Riachel/master
2022-04-28 13:19:48 +00:00
wengchangcheng e8144ffd5a Descriptor: modify performance of debugger
details: skip check -1 when there's no step event
issue: https://gitee.com/openharmony/ark_js_runtime/issues/I558VZ

Signed-off-by: wengchangcheng <wengchangcheng@huawei.com>
Change-Id: Ie65d521cbc79ddd36d05c263dd5ccfd5d82e0b5c
2022-04-28 21:12:37 +08:00
openharmony_ci e5c716767e !1160 Avoid JSBackend's pause caused by HandleBreakPoint(...) function right after its pause caused by HandleStep() function in one ByteCodePcChanged(...) function
Merge pull request !1160 from Gongyuhang/master
2022-04-28 09:48:29 +00:00
Riachel 3cbf8878ac add heapprofiler domain
Signed-off-by: Riachel <caolili14@huawei.com>
2022-04-28 16:15:49 +08:00
Gongyuhang 7d3a405863 Change the type of the returned value from "void" to "bool" for
JSPtHooks::SingleStep(...) function, make it return true only when it
has actually invoked the backend_'s NotifyPaused(...) function.
And let the ByteCodePcChanged(...) function pass over the
HandleBreakPoint(...) function when the HandleStep(...) function returns
 true.

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

Changes:
    modified:   ecmascript/tooling/agent/js_backend.cpp
    modified:   ecmascript/tooling/agent/js_backend.h
    modified:   ecmascript/tooling/agent/js_pt_hooks.cpp
    modified:   ecmascript/tooling/agent/js_pt_hooks.h
    modified:   ecmascript/tooling/interface/js_debug_interface.h
    modified:   ecmascript/tooling/interface/js_debugger.cpp
    modified:   ecmascript/tooling/test/utils/testcases/js_single_step_test.h
    modified:   ecmascript/tooling/test/utils/test_hooks.h

Signed-off-by: Gongyuhang <gongyuhang5@huawei.com>
2022-04-28 15:20:07 +08:00
zhuguanghui123 495985a93b Funtions MatchWithOffset and callbackFunc split to two functions.Search separately by row and column.
variable extracted: methodId,offset

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

Signed-off-by: zhuguanghui123 <zhuguanghui9@huawei.com>
Change-Id: I4951f10f17fe2af756b336e56e61033ea7fab689
2022-04-28 13:30:51 +08:00
buzhuyu 2912e2cfde change profiler types
issue:https://gitee.com/openharmony/ark_js_runtime/issues/I54J5Q

Signed-off-by: buzhuyu <buzhuyu@huawei.com>
2022-04-26 12:09:16 +08:00
openharmony_ci de8dd32c29 !1093 Delete useless code dependencies.
Merge pull request !1093 from yingguofeng/mmap
2022-04-24 16:26:56 +00:00
openharmony_ci 1e7209b55a !1098 debugger refactor
Merge pull request !1098 from Gymee/perf_tune
2022-04-24 11:02:16 +00:00
yingguofeng@huawei.com 6c5808fc28 Delete useless code dependencies
To reduce 'libark_ jsruntime.so' ROM size, delete useless code dependencies.

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

Profit: libark_jsruntime.so size reduce from 3455(kb) to 2001(kb)

Change-Id: Ie7430fca6f539c9baff1f4aae7942da6fc9ef135
Signed-off-by: yingguofeng@huawei.com <yingguofeng@huawei.com>
2022-04-24 18:02:32 +08:00
Gymee 909b9081a9 debugger refactor
Change-Id: Idff2f871926a3893b5bd962f13b4a10c39f9f6d9
Signed-off-by: Gymee <yumeijie@huawei.com>
2022-04-24 11:35:13 +08:00
wubinbin 2146484c8c add profiler
issue:https://gitee.com/openharmony/ark_js_runtime/issues/I53W91

Signed-off-by: wubinbin <wubinbin33@huawei.com>
2022-04-24 10:10:47 +08:00
openharmony_ci 24fb3dc4f6 !1095 Display the data of ArrayBuffer
Merge pull request !1095 from Gongyuhang/master
2022-04-22 14:06:30 +00:00
openharmony_ci 9228e821e7 !1100 add host debugger module test
Merge pull request !1100 from changcheng/debugger_host_testcase
2022-04-22 13:57:18 +00:00
openharmony_ci 7350a5fc32 !1056 add Runtime.getHeapUsage
Merge pull request !1056 from wwx1083752/master
2022-04-22 13:41:45 +00:00
Gongyuhang e89c2e4abb delete the empty line.
Issue:https://gitee.com/maimaity/ark_js_runtime/issues/I53VO3

Change:
    modified:    ecmascript/tooling/agent/js_backend.cpp

Signed-off-by: Gongyuhang <gongyuhang5@huawei.com>
2022-04-22 21:26:49 +08:00
Gongyuhang ef4ecf8e53 delete "return" for the void-function.
Issue:https://gitee.com/maimaity/ark_js_runtime/issues/I53VO3

Change:
    modified:    ecmascript/tooling/agent/js_backend.cpp

Signed-off-by: Gongyuhang <gongyuhang5@huawei.com>
2022-04-22 20:42:39 +08:00
wengchangcheng 3ae043afa5 Descriptor: enable testcase with ecmavm instead of runtime
details:
1. add debugger module testcase in host
2. fix debugger crash when throw exception in interpreter
issue: https://gitee.com/openharmony/ark_js_runtime/issues/I53WBO

Change-Id: Ia7d878b0b81c011d940a9187d39c854f6a592e6d
Signed-off-by: wengchangcheng <wengchangcheng@huawei.com>
2022-04-22 20:42:16 +08:00
wwx1083752 521c800b32 add getHeapUsage
issue:https://gitee.com/wwx1083752/ark_js_runtime/issues/I53ZUK

Signed-off-by: wwx1083752 <wubinbin33@huawei.com>
2022-04-22 17:49:52 +08:00
Riachel 341bf16549 add heapprofiler interface
Signed-off-by: wwx1083752 <wubinbin33@huawei.com>
2022-04-22 17:14:12 +08:00
Gongyuhang a4b630fb34 Add TypedArrayRefs for ArrayBufferRef, and add references to the
elements of the TypedArrayRef at JSBackend for the TypedArrayRef.

Issue:https://gitee.com/maimaity/ark_js_runtime/issues/I53VO3

Changes:
    modified:   ecmascript/tooling/agent/js_backend.cpp
    modified:   ecmascript/tooling/agent/js_backend.h

Signed-off-by: Gongyuhang <gongyuhang5@huawei.com>
2022-04-22 13:48:09 +08:00
Riachel 6991e9269f add heapprofiler interface
Signed-off-by: wwx1083752 <wubinbin33@huawei.com>
2022-04-22 12:09:04 +08:00
Riachel fe1a836f43 add heapprofiler interface
Signed-off-by: wwx1083752 <wubinbin33@huawei.com>
2022-04-22 11:05:59 +08:00
Riachel e45be79574 add heapprofiler interface
Signed-off-by: wwx1083752 <wubinbin33@huawei.com>
2022-04-22 10:57:29 +08:00
Riachel 03262e3bda add heapprofiler interface
Signed-off-by: wwx1083752 <wubinbin33@huawei.com>
2022-04-22 10:42:00 +08:00
wwx1083752 365bbd2797 add getHeapusage
Signed-off-by: wwx1083752 <wubinbin33@huawei.com>
2022-04-21 20:17:38 +08:00
xiongluo 771d51b546 refactor jsMethod
1. Move necessary fileds in jsMethod
2. Make jsMethod inherit aligned struct
3. Change some function names for easy reading

Signed-off-by: xiongluo <xiongluo@huawei.com>
2022-04-20 23:17:00 -10:00
openharmony_ci 6f05fa8e8d !1010 CDP协议heapprofiler接口实现
Merge pull request !1010 from wwx1083752/master
2022-04-20 09:58:47 +00:00
wwx1083752 99f8a0f659 Merge branch 'master' of gitee.com:openharmony/ark_js_runtime into master 2022-04-19 02:59:17 +00:00
wwx1083752 b3d6f2e001 modify comment
Signed-off-by: wwx1083752 <wubinbin33@huawei.com>
2022-04-19 10:41:38 +08:00