-
Notifications
You must be signed in to change notification settings - Fork 5.3k
feat: 增加线程启动计数与切换时间戳,调整线程列表输出调整输出格式 #10689
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
📌 Code Review Assignment🏷️ Tag: componentsReviewers: Maihuanyi Changed Files (Click to expand)
🏷️ Tag: kernelReviewers: GorrayLi ReviewSun hamburger-os lianux-mm wdfk-prog xu18838022837 Changed Files (Click to expand)
📊 Current Review Status (Last Updated: 2025-09-12 17:06 CST)
📝 Review Instructions
|
注意空格代码对齐。麻烦改一下 |
2d31456
to
3c7a768
Compare
cmd.c的289行没对齐 |
3c7a768
to
e830c51
Compare
LGTM |
这个功能有什么作用呢?感觉查看计数的方法并不是很直观 |
count计数功能,可以帮助统计 消费者线程执行次数 活跃度 实际执行频率 last time 记录上次执行的时间, 排查线程是否被阻塞 锁死时间 以及实时性判定 它是占用率表现的信息补充,更加细节的了解线程的执行情况 |
我也感觉切换次数+切换时间这两个原始指标看起来不太直观。 |
累计运行时间里面已经有了 thread->user_time |
stack size,left tick 现在是十六进制的,是否改为10进制.我认为这样更直观点 |
last time,感觉是一份参考,或者说非常弱的参考 (实时系统不那么看这份last time)。感觉这样修改意义不大呢 |
拉取/合并请求描述:(PR description)
[
为什么提交这份PR (why to submit this PR)
增加线程运行日志 线程计数与上次执行时间计数 方便跟踪运行情况
你的解决方案是什么 (what is your solution)
RT_USING_CPU_USAGE_TRACER
增加两个参数 ctx_last_time ctx_count注意
SMP 部分我未用过,不确定这样是否合适 单核心M4上已经验证
请提供验证的bsp和config (provide the config and bsp)
]
当前拉取/合并请求的状态 Intent for your PR
必须选择一项 Choose one (Mandatory):
代码质量 Code Quality:
我在这个拉取/合并请求中已经考虑了 As part of this pull request, I've considered the following:
#if 0
代码,不包含已经被注释了的代码 All redundant code is removed and cleaned up