"); //-->
# BPU trace
data_sources: {
config {
name: "linux.sys_stats"
sys_stats_config {
bputrace_period_ms: 500
# bpuinfo_period_ms: 500
}
}
}root@hobot:/map/xxx/inner# echo 1 > /sys/devices/system/bpu/bpu0/trace -bash: echo: write error: Invalid argument root@hobot:/map/xxx/inner# cat /sys/devices/system/bpu/bpu0/power_enable 1 root@hobot:/map/xxx/inner# echo 0 > /sys/devices/system/bpu/bpu0/power_enable root@hobot:/map/xxx/inner# cat /sys/devices/system/bpu/bpu0/power_enable 0 root@hobot:/map/xxx/inner# echo 1 > /sys/devices/system/bpu/bpu0/trace root@hobot:/map/xxx/inner#
终端 A
# 启动 trace 服务。 # 只需要启动一次,如果已经启动,则不需要再次启动。 tracebox traced --background # 运行数据捕获服务。 # 只需要启动一次,如果已经启动,则不需要再次启动。 tracebox traced_probes --background --reset-ftrace # -c:指定perfetto 配置文件。 # -o:指定输出trace数据文件路径。 tracebox perfetto --txt -c ucp_bpu_trace.cfg -o ucp.pftrace
终端 B
export HB_UCP_PERFETTO_CONFIG_PATH=ucp_system.json export HB_UCP_ENABLE_PERFETTO=true
hrt_model_exec perf --model_file xxx.hbm --frame_count 50 --thread_num 1 & hrt_model_exec perf --model_file ***.hbm --frame_count 10 --thread_num 1
# Sampling duration: 单位是ms,0表示持续抓取
duration_ms: 0
write_into_file: true # 按照设定的周期,将buffer写入到文件
# Writes the userspace buffer into the file every 2.5 seconds.
file_write_period_ms: 2500 # 控制buffer写文件,不是覆盖,相当于控制落盘,这个参数一般不需要特别指定
# buffer 0
buffers {
size_kb: 65536 # 如果出现数据丢失,则设置更大一些
fill_policy: RING_BUFFER
}
# buffer 1
buffers {
size_kb: 131072 # 如果出现数据丢失,则设置更大一些
fill_policy: RING_BUFFER
}
# UCP data source
data_sources: {
config {
name: "track_event"
target_buffer: 0
track_event_config {
enabled_categories: "dnn"
}
}
}*博客内容为网友个人发布,仅代表博主个人观点,如有侵权请联系工作人员删除。