linux – lttng中的时间戳错误

linux – lttng中的时间戳错误,第1张

概述我正在尝试使用lttng来分析远程系统上的调度. 但是,使用babeltrace将跟踪显示为文本格式表示所有记录的事件都具有相同的时间戳.因此,TraceCompass中的可视化失败. thomas@horrorshow: babeltrace ~/temp/lttng/my-trace/MySystem/my-session-20170608-133943/ | head[13:41:59.4 我正在尝试使用lttng来分析远程系统上的调度.
但是,使用babeltrace将跟踪显示为文本格式表示所有记录的事件都具有相同的时间戳.因此,TraceCompass中的可视化失败.

thomas@horrorshow: babeltrace ~/temp/lttng/my-trace/MySystem/my-session-20170608-133943/ | head[13:41:59.444999936] (+?.?????????) MySystem sched_stat_runtime: { cpu_ID = 0 },{ comm = "lttng-sessiond",tID = 1533,runtime = 5016120,vruntime = 451268995605 }[13:41:59.444999936] (+0.000000000) MySystem sched_waking: { cpu_ID = 0 },{ comm = "lttng-consumerd",tID = 1547,prio = 20,target_cpu = 0 }[13:41:59.444999936] (+0.000000000) MySystem sched_stat_runtime: { cpu_ID = 0 },runtime = 276632,vruntime = 451269272237 }[13:41:59.444999936] (+0.000000000) MySystem sched_wakeup: { cpu_ID = 0 },target_cpu = 0 }[13:41:59.444999936] (+0.000000000) MySystem sched_switch: { cpu_ID = 0 },{ prev_comm = "lttng-sessiond",prev_tID = 1533,prev_prio = 20,prev_state = 4096,next_comm = "lttng-consumerd",next_tID = 1547,next_prio = 20 }[13:41:59.444999936] (+0.000000000) MySystem syscall_exit_epoll_wait: { cpu_ID = 0 },{ ret = 1,fds_length = 1,overflow = 0,fds = [ [0] = { data_union = { u64 = 0x1C,fd = 28 },raw_events = 0x1,events = { EPolliN = 1,EPolLPRI = 0,EPolLOUT = 0,EPolLERR = 0,padding = 0 } } ] }[13:41:59.444999936] (+0.000000000) MySystem syscall_entry_ioctl: { cpu_ID = 0 },{ fd = 28,cmd = 62981,arg = 1547 }[13:41:59.444999936] (+0.000000000) MySystem syscall_exit_ioctl: { cpu_ID = 0 },{ ret = 0,arg = 1547 }[13:41:59.444999936] (+0.000000000) MySystem syscall_entry_ioctl: { cpu_ID = 0 },cmd = 2147808776,arg = 3047156396 }[13:41:59.444999936] (+0.000000000) MySystem syscall_exit_ioctl: { cpu_ID = 0 },arg = 3047156396 }thomas@horrorshow: babeltrace ~/temp/lttng/my-trace/MySystem/my-session-20170608-133943/ | tail[13:41:59.444999936] (+0.000000000) MySystem sched_wakeup: { cpu_ID = 0 },{ comm = "rcu_preempt",tID = 7,{ prev_comm = "lttng",prev_tID = 1698,next_comm = "rcu_preempt",next_tID = 7,next_prio = 20 }[13:41:59.444999936] (+0.000000000) MySystem sched_stat_runtime: { cpu_ID = 0 },runtime = 128301,vruntime = 456917982563 }[13:41:59.444999936] (+0.000000000) MySystem sched_switch: { cpu_ID = 0 },{ prev_comm = "rcu_preempt",prev_tID = 7,prev_state = 1,next_comm = "lttng",next_tID = 1698,next_prio = 20 }[13:41:59.444999936] (+0.000000000) MySystem sched_waking: { cpu_ID = 0 },{ comm = "lttng",tID = 1698,runtime = 209068,vruntime = 456921063330 }[13:41:59.444999936] (+0.000000000) MySystem sched_wakeup: { cpu_ID = 0 },next_comm = "lttng-sessiond",next_tID = 1533,next_prio = 20 }[13:41:59.444999936] (+0.000000000) MySystem syscall_exit_recvmsg: { cpu_ID = 0 },{ ret = 13156,msg = 3046107868 }[13:41:59.444999936] (+0.000000000) MySystem syscall_entry_ioctl: { cpu_ID = 0 },{ fd = 31,cmd = 63063,arg = 17 }

跟踪运行几秒钟,大小为912K.
我使用以下命令在嵌入式linux设备上启动跟踪,使用lttng-relayd将数据传输到我的主机系统进行分析:

lttng create my-session --set-url=net://10.0.28.1lttng enable-channel --kernel --subbuf-size=2621440 channel0lttng enable-event --kernel --syscall --all --channel channel0lttng enable-event --kernel --channel channel0 sched* lttng start# Wait a bitlttng stop

我该如何修复时间戳?

解决方法 The folks at the lttng-dev mailing list solved the problem for me:我意外地将内核模块加载到假的测试时钟,而不是真正的时钟的内核模块.

我的错误是我在lttng手动提供的所有.ko文件上运行了insmod.但是,正确的方法是让lttng-sessiond自动加载模块,这将忽略假的测试时钟模块.自动模块加载失败对我来说因为我在安装内核模块后没有运行depmod -a.

在depmod -a之后,一切正常,时间戳是正确的.

总结

以上是内存溢出为你收集整理的linux – lttng中的时间戳错误全部内容,希望文章能够帮你解决linux – lttng中的时间戳错误所遇到的程序开发问题。

如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。

欢迎分享,转载请注明来源:内存溢出

原文地址: http://outofmemory.cn/yw/1019463.html

(0)
打赏 微信扫一扫 微信扫一扫 支付宝扫一扫 支付宝扫一扫
上一篇 2022-05-23
下一篇 2022-05-23

发表评论

登录后才能评论

评论列表(0条)

保存