未验证 提交 60d3db15 编写于 作者: H hw-wLiu 提交者: Gitee

update zh-cn/device-dev/subsystems/subsys-dfx-hitracemeter.md.

Signed-off-by: Nhw-wLiu <liuwei573@huawei.com>
上级 70780cb8
......@@ -130,10 +130,20 @@ C++接口仅系统开发者使用,JS(目前暂未开放js接口)应用开
### 开发流程
1.编译依赖添加
OpenHarmony上C++接口使用示例如下:
```
external_deps = [ "hitrace_native:hitrace_meter"]
```
2.头文件依赖添加
```
#include "hitrace_meter.h"//接口函数定义头文件
```
#include "hitrace.h" // 包含hitrace.h
3.接口调用示例
#include "hitrace_meter.h" // 包含hitrace_meter.h
using namespace std;
int main()
......@@ -167,8 +177,6 @@ OpenHarmony上C++接口使用示例如下:
return 0;
}
在gn文件中添加外部依赖
external_deps = [ "hitrace_native:hitrace_meter"]
打点编译部署完成后,运行下面命令行来抓取trace。然后在端侧shell里运行应用,可以抓取到Trace数据。
hdc_std shell hitrace -t 10 ohos > .\myapp_demo.ftrace
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册