harmony 鸿蒙ArkCompiler Subsystem Changelog
ArkCompiler Subsystem Changelog
cl.arkcompiler.1 Changed the File Format of Heap Dump Products In the Case of OOM Errors
Access Level
Other
Reason for Change
To improve the probability and efficiency of generating dump files by heap dump when an application experiences an OOM error, and help developers locate memory leakage problems, the following changes are made:
The online parsing logic of heap dump is removed, and the product format is changed from .heapsnapshot to .rawheap.
The rawheap_translator tool integrated in the SDK provides the feature of parsing .rawheap files and generating .heapsnapshot files.
Change Impact
This change is a non-compatible change.
Before change: In the case of an OOM error, the dump file generated by heap dump is in .heapsnapshot format.
After change: In the case of an OOM error, the dump file generated by heap dump is in .rawheap format. The rawheap_translator tool needs to be called to convert the .rawheap file into a .heapsnapshot file.
Start API Level
11
Change Since
OpenHarmony SDK 5.0.0.56
Key API/Component Changes
The rawheap_translator tool is added to the toolchains directory of the OpenHarmony SDK.
Adaptation Guide
Use the rawheap_translator tool to convert .rawheap files generated by heap dump during OOM into .heapsnapshot files.
How To Obtain
The rawheap_translator tool is compatible with OHOS, Windows, Linux, and macOS.
The tool compatible with OHOS is stored in /bin/rawheap_translator and can be directly called on the device.
For Windows, Linux, and macOS, the compatible tool is in /toolchains/rawheap_translator of the SDK.
Environment Variables
Set the environment variables in Windows as follows:
Right-click This PC, choose Properties > Advanced System Settings > Advanced > Environment Variables > Path, click Edit, and add the path of rawheap_translator.exe to Path. After the configuration, restart the PC.
Set the environment variables in macOS as follows:
Open the terminal tool and run the following command:
echo $SHELL
The command output may be /bin/bash or /bin/zsh. The following uses /bin/bash as an example. Run the following commands to open the .bash_profile file:
vi ~/.bash_profile
Press i to enter the editing mode and run the following command:
export PATH=$PATH:<rawheap_translator path>;
Press Esc to exit the edit mode. Then enter :wq and press Enter to save the settings.
Run the following command for the environment variable to take effect.
source ~/.bash_profile
After the configuration, restart the PC.
Usage
Command for invoking the tool:
rawheap_translator <rawheap_file>
rawheap_translator <rawheap_file> <heapsnapshot_file>
Parameter description:
|Parameter|Description|Example|
|-|-|-|
|
你可能感兴趣的鸿蒙文章
harmony 鸿蒙Ability Framework Changelog
- 所属分类: 后端技术
- 本文标签:
热门推荐
-
2、 - 优质文章
-
3、 gate.io
-
7、 golang
-
9、 openharmony
-
10、 Vue中input框自动聚焦