After device connection is complete, perform the following steps to carry out memory analysis:

to specify the lane to be recorded. Alternatively, click Open File in the session area to import historical data.
in the upper-left corner of the analysis task window to start memory reclamation.
Expand the Memory lane to view PSS breakdown by memory type: ArkTS Heap, Native Heap, GL, Graph, Guard, AnonPage Other, FilePage Other, Dev, Stack, ArkWeb PA, JS Heap, .hap, .so, and .ttf. By default, five sub-lanes are displayed. To display other sub-lanes, click options in the main lane and select them.

Sub-lane | Description |
|---|---|
ArkTS Heap | Memory used by the ArkTS heap. |
Native Heap | Heap memory allocated using new/malloc and used by the native layer (mainly C/C++ code of the .so libraries on which the app depends). |
GL | Memory used by the app and RS. For the app, this refers to texture memory; for RS, this includes texture and graphics rendering memory. |
Graph | DMA memory used by the process (counted per deduplication rules), including DMA buffers directly allocated through APIs and those allocated via allocator_host. |
Guard | Memory occupied by the protection section. |
AnonPage Other | Memory occupied by other anonymous pages (not starting with heap, anon:native_heap, or anon:ArkTS heap). |
FilePage Other | Memory occupied by file-mapped pages not categorized as .so, .db, or .ttf. |
Dev | Memory occupied by the files prefixed with /dev and loaded by processes. |
Stack | Stack memory. |
ArkWeb PA | Added in version 26.0.0. Memory allocated via Malloc. |
JS Heap | Added in version 26.0.0. Memory used by the JS heap of the ArkWeb Render process. |
.hap | Memory occupied by .hap files loaded by processes. |
.so | Memory occupied by .so dynamic library files loaded by processes. |
.ttf | Memory occupied by .ttf font files loaded by processes. |
in the upper-left corner and select ArkTS Allocation. Due to privacy and security policies, this lane is not available for apps that have been released on AppGallery.
Since version 26.0.0, the ArkTS Snapshot lane supports memory object parsing. For details, see Parsing Memory Objects.

Click
in the toolbar to configure recording settings, as listed in the following table.

Configuration Item | Description |
|---|---|
Statistics Mode | Whether to enable statistics mode for data collection, which is enabled by default. Once enabled, data will be aggregated from the device and returned at intervals specified in Sampling Interval. When disabled (non-statistics mode), data is returned from the device in real time after each memory allocation. |
Sampling Interval | Interval for data collection. It only needs to be configured in statistics mode, with a configurable range of 1s to 3600s and a default value of 10s. |
Collect Only Unreleased Memory Events | (Added in version 26.0.0) Whether to discard the call stack data of the released memory during recording. This function is enabled by default. When this feature is enabled, call stacks of released memory are discarded as much as possible, and only call stacks of unreleased memory are retained. This mode is suitable for locating memory leaks and reducing performance overhead on the target app. When this feature is disabled, complete call stacks for memory allocation and deallocation operations are retained to analyze the full lifecycle of memory, such as troubleshooting memory jitter. |
All Heap & Anonymous VM Filter Size | Minimum memory size to capture. The value ranges from 0 to 65535 bytes, and the default size is 1024 bytes. |
Sampling Size | (Added in DevEco Studio 6.1.1 Release) Memory data sampling size with a configurable range from 1 to 1048576 bytes and a default value of 4096 bytes. This configuration only takes effect for mmap-type data under the Native Heap and All Anonymous VM lanes. |
Backtrace Mode | Backtrace mode of the memory allocation stack. Currently, two backtrace modes are available: FP (default) and DWARF. FP backtracking links stack frames via the frame pointer (FP register) to directly traverse the call chain. DWARF backtracking performs stack backtracking based on DWARF debugging information generated by the compiler. If you select the FP backtrace mode, you can configure JS Backtrace Depth and Native Backtrace Depth. If you select the DWARF backtrace mode, you can configure Backtrace Depth. FP backtracking offers better performance but may fail in certain specific scenarios (for example, when compilation parameters of .so files are controlled). In such cases, try DWARF as an alternative. |
Record JS Stack | Whether to enable JavaScript backtracking. When this feature is enabled, the system automatically backtracks from the native layer to the JavaScript layer, completing stack stitching from native to JavaScript. This is suitable for scenarios where ArkTS/JavaScript code calls native code. In versions earlier than DevEco Studio 6.1.0 Beta2, this feature is disabled by default. In DevEco Studio 6.1.0 Beta2 and later versions, this feature is enabled by default. |
JS Backtrace Depth | JavaScript backtrace depth. The value ranges from 1 to 128 and defaults to 10. |
Native Backtrace Depth | Native backtrace depth. The value ranges from 5 to 100 and defaults to 10. |
Backtrace Depth | Backtrace depth. This parameter is available only when Backtrace Mode is set to DWARF. Its value indicates the backtrace depth of both JavaScript and native. The value ranges from 5 to 100 and defaults to 20. |
Sync Backtrace Depth | (Added in DevEco Studio 6.1.1 Beta1) Synchronous backtrace depth. This parameter is available only when Record Async Stack is enabled. Its value indicates the synchronous backtrace depth of both JavaScript and native. The value ranges from 5 to 100 and defaults to 20. |
Record Async Stack | (Added in DevEco Studio 6.1.1 Beta1) Whether to enable asynchronous stack stitching. This feature is disabled by default. This feature can be enabled only when Backtrace Mode is set to FP. For versions earlier than 26.0.0, when this feature is enabled, one additional asynchronous stack frame is unwound during asynchronous backtracing, with a maximum asynchronous backtrace depth of 16. For 26.0.0 and later versions, you can set the asynchronous stack nesting depth and backtrace depth via Async Nesting Depth and Async Backtrace Depth, respectively. |
Async Nesting Depth | (Added in version 26.0.0) Asynchronous stack nesting depth. The value range is [1, 16], and the recommended range is [3, 10]. The default value is 3. This parameter can be configured only when Record Async Stack is enabled. |
Async Backtrace Depth | (Added in version 26.0.0) Asynchronous backtrace depth, which indicates the maximum number of frames displayed in each asynchronous stack. The value range is [1, 256], and the recommended range is [16, 32]. The default value is 16. This parameter can be configured only when Record Async Stack is enabled. |
Record Data Range Options | (Added in DevEco Studio 6.1.0 Release) Sampling data range, with available options including Malloc (default), Local Handle, and Global Handle.
|


For details about the available configuration items during lane recording, see #EN-US_TOPIC_0000002731541423__li1060214731415.

in the upper-left corner and select Graphic Memory. Expanding the main lane reveals three sub-lanes: Vulkan, OpenGL ES, and OpenCL. Due to privacy and security policies, this lane is not available for apps that have been released on AppGallery.
For details about the available configuration items during lane recording, see #EN-US_TOPIC_0000002731541423__li1060214731415.

in the upper-left corner and select Native Leaks. Due to privacy and security policies, this lane is not available for apps that have been released on AppGallery.
in the toolbar to disable Statistics Mode and Local Handle. Otherwise, normal recording will be disrupted.

The Graph field represents the size of memory used by the process under the /proc/process_dmabuf_info node.

For the main lane, the total ArkTS memory used by the selected process is displayed. After you drag to select the time period, the object allocation information of all Ark instances captured in this period is displayed.
For its sub-lanes, the memory usage of the running object in the selected time period is displayed, including the level, memory size of the object, memory size associated with the object, and more.
Objects marked with
in the Details pane can be accessed through windows. The released memory in each period is marked in gray, and the unreleased memory is marked in green.
This lane will be taken offline. You are advised to use the Snapshot template to analyze ArkTS memory leaks.


For version 26.0.0 and later, regardless of whether the statistics mode is enabled, when recording the ArkTS Snapshot lane, select the All Heap & Anonymous VM, All Heap, or Native Heap sub-lane, then click any stack frame. The More pane displays the call stack with the maximum allocated memory passing through this stack frame, along with the ArkTS object list (ArkTS Object List).
Click the redirection button in ArkTS Object List to go to the target object node in the ArkTS Snapshot lane.
In version 26.0.0 or later, click
on the left of the Heaviest Stack list in the More pane to export the list data to the local side.



Currently, DevEco Profiler does not support redirection to the native code on the user side for a release app.
After device connection is complete, perform the following steps to carry out memory analysis:

to select the lane to capture.
in the upper-left corner of the analysis task window to start memory reclamation.
PSS: sum of the memory exclusively occupied by a process and the proportionally allocated memory occupied by shared libraries.
RSS: sum of the memory exclusively occupied by a process and the memory occupied by related shared libraries.
USS: memory exclusively occupied by a process.
By default, only PSS statistics are displayed. To view USS or RSS statistics, select the related data type in the upper-right corner of the Memory lane.

Expand the Memory lane. The sub-lane displays the memory information of each dimension based on the memory type. The dimensions include ArkTS Heap, Native Heap, GL, Graph, Guard, AnonPage Other, FilePage Other, Dev, Stack, .hap, .so, and .ttf. By default, five sub-lanes are displayed. To display other sub-lanes, click options in the main lane and select them.

Sub-lane | Description |
|---|---|
ArkTS Heap | Memory used by the ArkTS heap. |
Native Heap | Heap memory allocated using new/malloc and used by the native layer (mainly C/C++ code of the .so libraries on which the app depends). |
GL | Memory used by the app and RS. For the app, this refers to texture memory; for RS, this includes texture and graphics rendering memory. |
Graph | DMA memory used by the process (counted per deduplication rules), including DMA buffers directly allocated through APIs and those allocated via allocator_host. |
Guard | Memory occupied by the protection section. |
AnonPage Other | Memory occupied by other anonymous pages (not starting with heap, anon:native_heap, or anon:ArkTS heap). |
FilePage Other | Memory occupied by file-mapped pages not categorized as .so, .db, or .ttf. |
Dev | Memory occupied by the files prefixed with /dev and loaded by processes. |
Stack | Stack memory. |
.hap | Memory occupied by .hap files loaded by processes. |
.so | Memory occupied by .so dynamic library files loaded by processes. |
.ttf | Memory occupied by .ttf font files loaded by processes. |
in the upper-left corner and select ArkTS Allocation. Due to privacy and security policies, this lane is not available for apps that have been released on AppGallery. This lane will be taken offline. You are advised to use the Snapshot template to analyze ArkTS memory leaks.
Due to the potential significant performance overhead that could cause lag or freezing issues, simultaneous recording of ArkTS Allocation with Native Allocation or Graphic Memory is currently not supported.
in the toolbar to configure recording settings, as listed in the following table. Configuration Item | Description |
|---|---|
Statistics Mode | Whether to enable statistics mode for data collection, which is enabled by default. Once enabled, data will be aggregated from the device and returned at intervals specified in Sampling Interval. When disabled (non-statistics mode), data is returned from the device in real time after each memory allocation. |
Sampling Interval | Interval for data collection. It only needs to be configured in statistics mode, with a configurable range of 1s to 3600s and a default value of 10s. |
Native Allocation Filter Size | Minimum memory size to capture. The value ranges from 0 to 65535 bytes, and the default size is 1024 bytes. |
Backtrace Mode | Backtrace mode of the memory allocation stack. Currently, two backtrace modes are available: FP (default) and DWARF. FP backtracking links stack frames via the frame pointer (FP register) to directly traverse the call chain. DWARF backtracking performs stack backtracking based on DWARF debugging information generated by the compiler. FP backtracking offers better performance but may fail in certain specific scenarios (for example, when compilation parameters of .so files are controlled). In such cases, try DWARF as an alternative. |
Record JS Stack | Whether to enable JavaScript backtracking. When this feature is enabled, the system automatically backtracks from the native layer to the JavaScript layer, completing stack stitching from native to JavaScript. This is suitable for scenarios where ArkTS/JavaScript code calls native code. |
JS Backtrace Depth | JavaScript backtrace depth. The value ranges from 1 to 128 and defaults to 10. |
Native Backtrace Depth | Native backtrace depth. The value ranges from 5 to 100 and defaults to 10. |
Backtrace Stack | Backtrace depth. This parameter is available only when Backtrace Mode is set to DWARF. Its value indicates the backtrace depth of both JavaScript and native. The value ranges from 5 to 100 and defaults to 20. |

Expanding the main lane reveals three sub-lanes: Vulkan, OpenGL ES, and OpenCL. The Vulkan sub-lane displays memory allocation data of the GPU_VK type; the OpenGL ES sub-lane displays memory allocation data of the GPU_GLES type; the OpenCL sub-lane displays memory allocation data of the GPU_CL type.


The Graph field represents the memory size used by the process under the /proc/process_dmabuf_info node.

Objects marked with
in the Details pane can be accessed through windows. The released memory in each period is marked in gray, and the unreleased memory is marked in green.

You can click the redirection button on an object to go to the detailed usage/allocation information about the object. Currently, redirection is not supported in statistics mode.
Allocations List is not available in statistics mode.
You can select any object, and all libraries and callers related to the object are displayed on the right.

Currently, DevEco Profiler does not support redirection to the native code on the user side for a release app.