You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
if [ "$3"="async_std" ];then
uftrace record -P "_<async_std..task..builder..SupportTaskLocals<F> as core..future..future..Future>::poll::_{{closure}}" ... $1elif [ "$3"="tokio" ];then
uftrace record -P "tokio..runtime..blocking..task..BlockingTask<T> as core..future..future..Future" ... $1fi
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
-
CAT框架实现异步函数跟踪的依赖模块及协作流程
1. 插桩阶段
uftrace工具,依赖Linux的perf_event接口,支持动态插桩(运行时NOP指令替换)。task::spawn、async/await生成的Future对象)。profile.shasync_std或tokio)选择插桩模式。task::spawn)、Future的poll方法入口/出口。.dat文件。2. 数据收集阶段
profile.shuftrace dump > dumped_data.txt mv ./dumped_data.txt ./profile/.dat文件)转换为文本格式dumped_data.txt。entry/exit)、时间戳、线程ID、栈深度等原始信息。3. 数据处理阶段
entry_ts - exit_ts)。parser.pyfind_task_state)识别异步任务的创建、嵌套Future的poll调用。..为::)。--get-location参数调用objdump获取源码位置。4. 可视化阶段
Trace-viewer解析JSON格式日志,生成交互式时间线图。parser.py生成的JSON文件Trace-viewer格式的JSON文件。Task A → Future B)。5. 不足
如果用于追踪ArceOS的异步:
Beta Was this translation helpful? Give feedback.
All reactions