已开启
fix(hidumper): unify ARK_STATS_DUMP PID parameter to int type #805
fix(hidumper): unify ARK_STATS_DUMP PID parameter to int type #805
已开启
LWH创建于 19 天前
LWH
LWH
19 天前

问题描述

hidumper 的 ARK_STATS_DUMP 事件中 PID 字段使用 std::to_string(pid) 传递,导致 PID 类型为 STRING。而 ark runtime 的 gc_key_stats.cpp 和 oom_stats.cpp 传递 int,PID 类型为 INT32。

HiSysEventWrite 的 InnerWrite 模板按值类型自动推导参数类型。同一事件同字段不同发送方传不同类型,导致接收端 GetIntParam 返回 0,jsheap 快照功能失效。

修复方案

将 dump_implement.cpp 中 3 处 HiSysEventWrite 的 PID 参数从 std::to_string(pid) 改为直接传 int:

  • ReportJsheap: dumpJsHeapMemPid_
  • ReportCjheap: dumpCjHeapMemPid_
  • ReportMemheap: pid

新增测试

JsHeapDumperTest009:获取 com.ohos.systemui 实际 pid,执行 --mem-jsheap,验证返回 DUMP_OK + faultlog/temp 下快照文件增加。

likedislike
合并受阻
openharmony_ciopenharmony_ci成员
19 天前 添加了label:waiting_on_author
openharmony_ci
openharmony_ci成员
19 天前 评论:

感谢提交 Pull Requests!如果您提交的PR已经开发完毕,请评论 "start build" 触发门禁,更多交互操作,请访问OpenHarmony社区支持命令清单。如果需要调整订阅PR、Issue的变更状态,请访问订阅链接


Thanks for submitting the pull request. If your Pull Request has already been developed, you can leave a "start build" comment to trigger the gated system. For more commands, please visit OpenHarmony Command List. If you need to change the subscription of a Pull Request or Issue, please visit the link.

likedislike
openharmony_ciopenharmony_ci成员
19 天前 添加了label:dco检查成功
LWHLWH
19 天前 关联了issue:[新需求]:修复pid类型
LWH
LWH
19 天前 评论:

start build

likedislike
openharmony_ci
openharmony_ci成员
19 天前 评论:

首次触发
门禁构建开始,包含静态检查、代码编译和测试【dayu200测试, dayu600_7885编译, master_inner_build编译, dayu200_tdd编译, x86_64_virt编译, dayu600_7885测试, dayu200编译, ohos-host_mini_tdd编译】,预计在60分钟内完成,门禁结果会同步发送到注册邮箱。您可以通过如下链接跟踪门禁进展:http://dcp.openharmony.cn/workbench/cicd/detail/6a97dd7764650f998be39e06/runlist

likedislike
openharmony_ciopenharmony_ci成员
19 天前 添加了label:编译成功
openharmony_ciopenharmony_ci成员
19 天前 添加了label:静态检查成功
openharmony_ciopenharmony_ci成员
19 天前 添加了label:冒烟测试失败
openharmony_ci
openharmony_ci成员
19 天前 评论:

代码门禁未通过
您可以通过如下链接查看门禁报告:http://dcp.openharmony.cn/workbench/cicd/detail/6a97dd7764650f998be39e06/runlist

静态检查:

# check type result report
1 codeCheck pass >>>

编译测试:
# Device build result test result package
1 dayu200 success success >>>
2 dayu200_tdd success NA >>>
3 master_inner_build success NA >>>
4 ohos-host_mini_tdd success NA >>>
5 dayu600_7885 success failed(ecotest timeout) >>>
6 x86_64_virt success NA >>>

likedislike
LWHLWH
19 天前 强制推送  1 个提交:ebad928b-fix(hidumper): unify ARK_STATS_DUMP PID parameter to int type
openharmony_ciopenharmony_ci成员
19 天前 删除了label:编译成功
openharmony_ciopenharmony_ci成员
19 天前 删除了label:静态检查成功
openharmony_ciopenharmony_ci成员
19 天前 删除了label:冒烟测试失败
openharmony_ci
openharmony_ci成员
19 天前 评论:

代码有更新,重置PR验证状态

likedislike
openharmony_ci
openharmony_ci成员
19 天前 评论:

感谢提交 Pull Requests!如果您提交的PR已经开发完毕,请评论 "start build" 触发门禁,更多交互操作,请访问OpenHarmony社区支持命令清单。如果需要调整订阅PR、Issue的变更状态,请访问订阅链接


Thanks for submitting the pull request. If your Pull Request has already been developed, you can leave a "start build" comment to trigger the gated system. For more commands, please visit OpenHarmony Command List. If you need to change the subscription of a Pull Request or Issue, please visit the link.

likedislike
LWH
LWH
19 天前 评论:

start build

likedislike
openharmony_ci
openharmony_ci成员
19 天前 评论:

本地或库上代码有更新,全量重新构建,重置所有关联PR的验证状态
门禁构建开始,包含静态检查、代码编译和测试【x86_64_virt编译, ohos-host_mini_tdd编译, dayu200_tdd编译, dayu200编译, master_inner_build编译, dayu600_7885编译, dayu200测试, dayu600_7885测试】,预计在60分钟内完成,门禁结果会同步发送到注册邮箱。您可以通过如下链接跟踪门禁进展:http://dcp.openharmony.cn/workbench/cicd/detail/6a98f32464650f998b367438/runlist

likedislike
openharmony_ciopenharmony_ci成员
19 天前 添加了label:编译失败
openharmony_ciopenharmony_ci成员
19 天前 添加了label:静态检查成功
openharmony_ciopenharmony_ci成员
19 天前 添加了label:冒烟测试成功
openharmony_ci
openharmony_ci成员
19 天前 评论:

代码门禁未通过
您可以通过如下链接查看门禁报告:http://dcp.openharmony.cn/workbench/cicd/detail/6a98f32464650f998b367438/runlist

静态检查:

# check type result report
1 codeCheck pass >>>

编译测试:
# Device build result test result package
1 dayu200 success success >>>
2 dayu200_tdd success NA >>>
3 master_inner_build success NA >>>
4 ohos-host_mini_tdd success NA >>>
5 dayu600_7885 success success >>>
6 x86_64_virt failed(compile failed) NA >>>

likedislike
LWH
LWH
19 天前 评论:

start build

likedislike
openharmony_ci
openharmony_ci成员
19 天前 评论:

距离上次门禁验证通过未超过12小时,且目标分支和本地源分支代码均无变化,无需进行门禁构建,默认测试通过

likedislike
openharmony_ciopenharmony_ci成员
19 天前 通过测试
LWHLWH
18 天前 测试状态已重置,测试人: openharmony_ci
LWHLWH
18 天前 强制推送  1 个提交:b6ae0923-fix(hidumper): unify ARK_STATS_DUMP PID parameter to int type
openharmony_ciopenharmony_ci成员
18 天前 删除了label:编译失败
openharmony_ciopenharmony_ci成员
18 天前 删除了label:静态检查成功
openharmony_ciopenharmony_ci成员
18 天前 删除了label:冒烟测试成功
openharmony_ci
openharmony_ci成员
18 天前 评论:

代码有更新,重置PR验证状态

likedislike
openharmony_ci
openharmony_ci成员
18 天前 评论:

感谢提交 Pull Requests!如果您提交的PR已经开发完毕,请评论 "start build" 触发门禁,更多交互操作,请访问OpenHarmony社区支持命令清单。如果需要调整订阅PR、Issue的变更状态,请访问订阅链接


Thanks for submitting the pull request. If your Pull Request has already been developed, you can leave a "start build" comment to trigger the gated system. For more commands, please visit OpenHarmony Command List. If you need to change the subscription of a Pull Request or Issue, please visit the link.

likedislike
LWH
LWH
18 天前 评论:

start build

likedislike
openharmony_ci
openharmony_ci成员
18 天前 评论:

本地或库上代码有更新,全量重新构建,重置所有关联PR的验证状态
门禁构建开始,包含静态检查、代码编译和测试【master_inner_build编译, dayu200_tdd编译, dayu200编译, dayu600_7885编译, ohos-host_mini_tdd编译, dayu200测试, dayu600_7885测试, x86_64_virt编译】,预计在60分钟内完成,门禁结果会同步发送到注册邮箱。您可以通过如下链接跟踪门禁进展:http://dcp.openharmony.cn/workbench/cicd/detail/6a993dc664650f998b532e55/runlist

likedislike
openharmony_ci
openharmony_ci成员
18 天前 评论:

代码门禁通过
您可以通过如下链接查看门禁报告:http://dcp.openharmony.cn/workbench/cicd/detail/6a993dc664650f998b532e55/runlist

静态检查:

# check type result report
1 codeCheck pass >>>

编译测试:
# Device build result test result package
1 dayu200 success success >>>
2 dayu200_tdd success NA >>>
3 master_inner_build success NA >>>
4 ohos-host_mini_tdd success NA >>>
5 dayu600_7885 success success >>>
6 x86_64_virt success(IGNORE) NA >>>

likedislike
openharmony_ci
openharmony_ci成员
18 天前 评论:

您好,Committer @mzyan @Lutao98 ,请分配检视人员检视该PR,可以通过命令"assign [@someone_id]"分配检视人员,也可以直接评论"assign"分配给自己进行检视。


Hello, Committer @mzyan @Lutao98 . Please assign someone to review the PR. You can assign a reviewer by using the command "assign [@someone_id]", or you can comment "assign" to review the PR by yourself.

likedislike
LWH
LWH
18 天前 评论:

QQ_1788435091264.png

likedislike
LWHLWH
18 天前 修改了pull request 的描述
LWH
LWH
18 天前 评论:

QQ_1788435206679.png

likedislike
LWH
LWH
18 天前 评论:

start build

likedislike
openharmony_ci
openharmony_ci成员
18 天前 评论:

not config namespace:openharmony

likedislike
LWH
LWH
18 天前 评论:

QQ_1788435513601.png

likedislike
Llu-tao成员
18 天前 通过审查