已开启
[新需求]: hidumper -e --list 支持全量应用终止原因 #623
denganliang创建于  8 天前
denganliang
8 天前 创建

新需求提供了什么功能?

hidumper -e --list 当前依赖 hidumper 自维护的映射表 services/native/etc/event_reason_config.json,只支持 hiappevent 早期对外开放的 15 种异常退出原因,其余原因(如 aaForceStop、Uninstall、CpaKiller、HighTemperature、ResourceLeak(FDLeak) 等)会被整条过滤,开发者查不到记录。

hiappevent 与 AMS 侧已支持全量应用终止原因:AMS 上报 FRAMEWORK/PROCESS_KILL 时写入 PROCESS_KILL_ID 字段,hicollie 提供 ProcessKillReason::GetAppExitReason(killId) 统一维护 killId 到对外呈现原因的映射。

期望 hidumper 与其保持一致:

  1. -e --list 改为解析 PROCESS_KILL_ID 字段(原解析 REASON 字符串)
  2. 对外呈现改为调用 hicollie 的 GetAppExitReason 接口获取(原查本地 json 映射表)
  3. 删除 hidumper 自维护的 event_reason_config.json
  4. 查询 PROCESS_KILL 事件、格式化打印的整体结构保持不变

该需求带来的价值、应用场景?

  • 开发者使用 hidumper -e --list 可以看到全量应用终止原因,与 hiappevent getAppExitReason 的输出保持一致,不再出现"应用确实被杀但 hidumper 查不到记录"的情况
  • 映射表收敛到 hicollie 单点维护,避免 hidumper / AMS / hiappevent 各维护一份,后续新增终止原因不需要多仓同步修改
likedislike
Ddenganliang
8 天前 添加了label:enhancement
openharmony_ci
openharmony_ci成员
8 天前 评论:

感谢提交Issue!关于Issue的交互操作,请访问OpenHarmony社区支持命令清单。如果有问题,请联系 [@mzyan](https://gitcode.com/mzyan) [@Lutao98](https://gitcode.com/Lutao98) 。如果需要调整订阅PR、Issue的变更状态,请访问链接


Thanks for submitting the issue. For more commands, please visit OpenHarmony Command List. If you have any questions, please refer to committer gitcode for help. If you need to change the subscription of a Pull Request or Issue, please visit the link.

likedislike
openharmony_ciopenharmony_ci成员
8 天前 添加了label:waiting_for_assign
Ddenganliang
8 天前 关联了pull request:feat(hidumper): align -e --list exit reasons with hicollie