mirror of
https://gitee.com/openharmony/hiviewdfx_hitrace
synced 2024-11-23 07:49:43 +00:00
8fdacf25c4
Signed-off-by:Federer-JC <jincong4@huawei.com> Signed-off-by: Federer-JC <jincong4@huawei.com> |
||
---|---|---|
cmd | ||
config | ||
figures | ||
frameworks | ||
interfaces | ||
test | ||
tools/hitrace_converter | ||
utils | ||
.gitignore | ||
bundle.json | ||
Cargo.toml | ||
hitrace.gni | ||
LICENSE | ||
OAT.xml | ||
README_zh.md | ||
README.md |
HiTrace
Overview
HiTrace provides APIs to implement call chain tracing throughout a service process. With HiTrace, you can quickly obtain the run log for the call chain of a specified service process and locate faults in cross-device, cross-process, or cross-thread communications.
Architecture
Figure 1 Architecture of HiTrace
HiTrace is the lightweight implementation based on the distributed call chain of cloud computing. HiTrace implements call chain tracing as follows:
- Transfers traceid in cross-device, cross-process, and cross-thread communications.
- Stores traceid in the thread local storage
TLS
at the Native layer of the process. - Automatically adds traceid to existing events and run logs.
Directory Structure
/base/hiviewdfx/hitrace
├── frameworks # Framework code
│ └── native # HiTrace Native implementation code
├── interfaces # APIs
│ └── js # JS APIs
│ └── kits # JS inner implementation code
│ └── native # C/C++ APIs
│ └── innerkits # Header files opened to internal subsystems
└── test # Test cases
Constraints
HiTrace is already supported by the IPC and EventHandler communication mechanisms. If you are using a custom communication mechanism, adaptation is required to use HiTrace.
Usage
Available APIs
Major APIs of HiTrace