Linux: ftrace: echo function_graph > current_tracer
在做这个函数调用图的时候,会发现这个函数调用非常的大,有些是irq的处理函数,也放在其中,前后有标记:
Line 18702: 1) <========== |
Line 22335: 1) ==========> |
commit f8b755ac8e0cc3f330269e4c4504514f987167a2
Author: Frederic Weisbecker fweisbec@gmail.com
Date: Tue Dec 9 23:55:25 2008 +0100
tracing/function–graph–tracer: Output arrows signal on hardirq call/return
Impact: make more obvious the hardirq calls in the output
When a hardirq is triggered inside the codeflow on output, we have now two arrows that indicate the entry and return of the hardirq.
怎么去掉这些不关心的irq的函数调用呢?只能说自己写一个脚本将其删除。
python:
f_trace = open('trace.out', 'r')
f_message = open('trace.out.out', 'w')
flag1 = 0
for line in f_trace:
if len(line)!=1: ###if the line is empty
if line.find("==========>")>-1:
flag1=1
if line.find("<==========")>-1:
flag1=0
if flag1==0 and not line.find("<==========")>-1:
f_message.write(line)
原文地址:https://blog.csdn.net/qq_36428903/article/details/134697563
本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。
如若转载,请注明出处:http://www.7code.cn/show_30576.html
如若内容造成侵权/违法违规/事实不符,请联系代码007邮箱:suwngjj01@126.com进行投诉反馈,一经查实,立即删除!