已合并
【PR】:修复npu_module_mem.csv未生成的问题 #2874
mei-feiyao创建于 6月16日
【PR】:修复npu_module_mem.csv未生成的问题 #2874
已合并
Pull Request已成功合入, 合并人@CANN-robot
(感谢 mei-feiyao 的贡献)6月16日 添加了label:enhancement
6月16日 创建了 pull request,commit c228e05b
6月16日 关联了issue:[Bug]: 开启profile_memory,未生成npu_module_mem.csv文件
6月16日 添加了label:cann-cla/yes
mei-feiyao
6月16日 评论:
6月16日 评论:
compile


6月16日 预合并成功(commit_id: 23bebd4c8185f4b7d9c3c24578080402217d43ac)
CANN-robot
6月16日 评论:
6月16日 评论:
Thanks for your pull-request.
The full list of commands accepted by me can be found at here。
You can get sig-info at here
PR Approval Progress
✅ Congratulations! All modules have met the lgtm and approve requirements.
Module Approval Details
| module | lgtm status | approve status |
|---|---|---|
| src/dfx | ✅ zhuliangying, chenhao_1209 (2/2) | ✅ zhuliangying (1/1) |
💡 Tip:
- Committer can comment
/approveor/lgtm- Commenting
/approveimplies both code review (lgtm) and intent to merge (approve)


CANN-robot
6月16日 评论:
6月16日 评论:
6月16日 添加了label:ci-pipeline-running
CANN-robot
6月16日 评论:
6月16日 评论:
流水线任务触发成功
任务链接 [4f291a08e5a9442abc9fe81e17d83961][流水线指导]
| 任务名称 | 状态 | 日志 | 下载链接 |
|---|---|---|---|
| Compile_Ascend_X86 | ✅ SUCCESS | >>>>> | >>>>> |
| Compile_Ascend_ARM | ✅ SUCCESS | >>>>> | >>>>> |
| pre_comment | ✅ SUCCESS | >>>>> | |
| UT_Test_acl | ✅ SUCCESS | >>>>> | |
| UT_Test_rts_v201 | ✅ SUCCESS | >>>>> | |
| UT_Test_rts_c | ✅ SUCCESS | >>>>> | |
| UT_Test_rts_david | ✅ SUCCESS | >>>>> | |
| UT_Test_rts_910b | ✅ SUCCESS | >>>>> | |
| UT_Test_rts_common | ✅ SUCCESS | >>>>> | |
| UT_Test_platform | ✅ SUCCESS | >>>>> | |
| UT_Test_qs | ✅ SUCCESS | >>>>> | |
| UT_Test_aicpusd | ✅ SUCCESS | >>>>> | |
| UT_Test_tsd | ✅ SUCCESS | >>>>> | |
| UT_Test_error_manager | ✅ SUCCESS | >>>>> | |
| UT_Test_slog | ✅ SUCCESS | >>>>> | |
| UT_Test_atrace | ✅ SUCCESS | >>>>> | |
| UT_Test_msprof | ✅ SUCCESS | >>>>> | |
| UT_Test_adump | ✅ SUCCESS | >>>>> | |
| UT_Test_mmpa | ✅ SUCCESS | >>>>> | |
| PreSmoke_A900_npupool | ✅ SUCCESS | >>>>> | |
| UT_Test_rts_report | ✅ SUCCESS | >>>>> |
[2026-06-16 19:03:53] CI执行结束


CANN-robot
6月16日 评论:
6月16日 评论:
流水线任务触发成功
任务链接 [81584f70cd9344da888584cd371bebe6][流水线指导]
| 任务名称 | 状态 | 日志 | 下载链接 |
|---|---|---|---|
| codecheck | ✅ SUCCESS | >>>>> | |
| SCA | ✅ SUCCESS | >>>>> | |
| antipoison | ✅ SUCCESS | >>>>> | |
| codecheck_Check_Pr | ✅ SUCCESS | ||
| codecheck_style | ✅ SUCCESS | >>>>> | |
| codecheck_precommit | ⚠️ WARNING | >>>>> | >>>>> |
| StaticCheck_codespell_check | ✅ SUCCESS | ||
| StaticCheck_link_validity_check | ✅ SUCCESS | ||
| StaticCheck_resource_existence_check | ✅ SUCCESS | ||
| StaticCheck_tag_closed_check | ✅ SUCCESS | ||
| StaticCheck_markdownlint | ✅ SUCCESS |
[2026-06-16 18:57:24] CI执行结束


6月16日 删除了label:ci-pipeline-running
6月16日 添加了label:ci-pipeline-passed
6月16日 添加了label:SC-SUCC
zhuliangying
6月16日 评论:
6月16日 评论:
/approve


6月16日 添加了label:approved
chenhao_1209
6月16日 评论:
6月16日 评论:
/lgtm


6月16日 添加了label:lgtm
6月16日 合入了pull request
Pull Request
描述
请清晰准确地描述本次 Pull Request 的意图和变更内容。
问题现象:本地采集profiler内存数据未生成npu_module_mem.csv;
问题原因:prof采集host侧数据时timestamp值可能采用syscnt或monotonic(取决于是否从驱动获取host freq),工具采集module_mem数据下发的采集配置同理需要配置1或0用于通知底软组件上报syscnt或monotonic,即代码里的res1字段;
修复方案:调用PlatformHostFreqIsEnable,如果为true,则配置1,通知底软上报snscnt,否则下发0,通知底软上报monotonic
变更类型
请选择本次引入的变更类型:
关联的Issue
https://gitcode.com/Ascend/msprof/issues/73
如何测试
描述测试此变更的步骤和前提条件:
1.环境安装构建run包;
2.执行msprof采集命令,开启sys-hardware-mem开关;
3.观察生成的数据文件是否有npu_module_mem.csv
核对清单
其他信息
在此添加任何其他关于本次 PR 的说明。