ftrace笔记
- mount -t debugfs nodev /sys/kernel/debug
- sysctl kernel.ftrace_enabled=1
- #cat availabe_tracers //查看当前支持的tracer有哪些
- blk function_graph wakeup ... nop
- #echo wakeup > current_tracer
- #echo latency-format > trace_options
- #echo 0 > tracing_max_latency
- #echo 1 > tracing_on
- #chrt -f 5 sleep 1
- #echo 0 > tracing_on
- #cat trace
- #cat buffer_size_kb
- #echo nop > current_tracer
- #echo 10000 > buffer_size_kb
- #cat buffer_size_kb
- #echo function > current_tracer
- #cat trace_pipe > /tmp/trace.out &
- #echo 1 > tracing_on
- #usleep 1
- #echo 0 > tracing_on
- #cat /tmp/trace.out

- echo nofuncgraph-cpu > trace_options
- echo nofuncgraph-duration > trace_options
- echo nofuncgraph-overhead > trace_options
- echo funcgraph-proc > trace_options
- echo funcgrpah-abstime > trace_options

- <match>*
- *<match>
- *<match>*
- #echo 'hrtimer_*' > set_ftrace_filter
- #echo > set_ftrace_filter
- syntax: <function>:<command>:<parameter>
- 1. mod, this command enables function filtering per module
- #echo 'write*:mod:ext3' > set_ftrace_filter
- #echo '!writeback*:mod:ext3' >>set_ftrace_filter
- 2. traceon/traceoff
- these commands trun tracing on and off when the specified functions are hit. The parameter determines how many times the tracing system is turned on and off. If unspecified, there is no limit.
- For example, to disable tracing when a schedule bug is hit in the first 5 times, run:
- #echo '__schedule_bug:traceoff:5' > set_ftrace_filter
- These command are cumulative whether or not they are appended to set_ftrace_filter. To remove a command, prepend it by '!' and drop the parameter:
- #echo '!__schedule_bug:traceoff'
- #echo __do_fault > set_graph_function

- #echo sched_wakeup >> set_event
- #echo '!sched_wakeup' >> set_event
- #echo > set_event
- #echo *:* > set_event
- #echo 'irq:*' > set_event
- #echo 1 > /sys/kernel/debug/tracing/events/sched/sched_wakeup/enable
- #echo 1 > /sys/kernel/debug/tracing/events/sched/enable
- #echo 1 > /sys/kernel/debug/tracing/events/enable

- field-name relation-operatior value //一个predicate
- #cd /sys/kernel/debug/tracing/events/signal/signal_generate
- #echo "((sig >= 10 && sig < 15) || sig == 17) && comm != bash" > filter
- #cd /sys/kernel/debug/tracing/events/sched
- #echo 0 > filter
- #cat sched_switch/filter
- none
- #cat sched_wakeup/filter
- #echo common_pid == 0 > filter
- #cat sched_switch/filter
- common_pid == 0
- #cat sched_wakeup/filter
- common_pid == 0
- #echo prev_pid == 0 > filter
- #cat sched_switch/filter
- prev_pid == 0
- #cat sched_wakeup/filter
- common_pid == 0
- #cd /sys/kernel/debug/tracing
- #echo nop > current_tracer
- #echo 'irq:*' > set_event
- #echo latency-format > trace_options
- #echo 0 > tracing_max_latency
- #echo 1 > tracing_on
- #sleep 1
- #echo 0 > tracing_on
- #cat trace

ftrace笔记的更多相关文章
- linux内核编程笔记【原创】
以下为本人学习笔记,如有转载请注明出处,谢谢 DEFINE_MUTEX(buzzer_mutex); mutex_lock(&buzzer_mutex); mutex_unlock(& ...
- 利用ftrace跟踪内核static tracepoint——实例writeback event
摘要:和很多linux内核子系统一样,static tracepoint有很多层次,其中某个层次都展示给不同层次的开发者来满足他们的不同需求.关于linux tracepoint的详细信息,我们可以在 ...
- 利用ftrace跟踪内核static tracepoint
摘要:和很多linux内核子系统一样,static tracepoint有很多层次,其中某个层次都展示给不同层次的开发者来满足他们的不同需求.关于linux tracepoint的详细信息,我们可以在 ...
- git-简单流程(学习笔记)
这是阅读廖雪峰的官方网站的笔记,用于自己以后回看 1.进入项目文件夹 初始化一个Git仓库,使用git init命令. 添加文件到Git仓库,分两步: 第一步,使用命令git add <file ...
- js学习笔记:webpack基础入门(一)
之前听说过webpack,今天想正式的接触一下,先跟着webpack的官方用户指南走: 在这里有: 如何安装webpack 如何使用webpack 如何使用loader 如何使用webpack的开发者 ...
- SQL Server技术内幕笔记合集
SQL Server技术内幕笔记合集 发这一篇文章主要是方便大家找到我的笔记入口,方便大家o(∩_∩)o Microsoft SQL Server 6.5 技术内幕 笔记http://www.cnbl ...
- PHP-自定义模板-学习笔记
1. 开始 这几天,看了李炎恢老师的<PHP第二季度视频>中的“章节7:创建TPL自定义模板”,做一个学习笔记,通过绘制架构图.UML类图和思维导图,来对加深理解. 2. 整体架构图 ...
- PHP-会员登录与注册例子解析-学习笔记
1.开始 最近开始学习李炎恢老师的<PHP第二季度视频>中的“章节5:使用OOP注册会员”,做一个学习笔记,通过绘制基本页面流程和UML类图,来对加深理解. 2.基本页面流程 3.通过UM ...
- NET Core-学习笔记(三)
这里将要和大家分享的是学习总结第三篇:首先感慨一下这周跟随netcore官网学习是遇到的一些问题: a.官网的英文版教程使用的部分nuget包和我当时安装的最新包版本不一致,所以没法按照教材上给出的列 ...
随机推荐
- vscode 插件整理
己亥年 庚午月 癸巳日 宜入宅 忌婚嫁 1.Chinese (Simplified) Language Pack for Visual Studio Code 此中文(简体)语言包为 VS Cod ...
- Java多线程编程核心(1)
Java多线程编程核心(1) 停止线程 本节主要讨论如何更好停止一个线程.停止线程意味着在线程处理完成任务之前放弃当前操作. 1.停不了的线程 可能大多数同学会使用interrupt()来停止线程,但 ...
- assign, retain, copy, weak, strong
一.assign, retain, copy 的区别(引用计数 RC reference count) 参考:IOS基础:retain,copy,assign及autorelease 1. 假设你用m ...
- luogu P2574 XOR的艺术 (线段树)
luogu P2574 XOR的艺术 (线段树) 算是比较简单的线段树. 当区间修改时.\(1 xor 1 = 0,0 xor 1 = 1\)所以就是区间元素个数减去以前的\(1\)的个数就是现在\( ...
- atlas 日志分析脚本
#!/usr/bin/env python # encoding: utf-8 #@author: 东哥加油! #@file: log_analyze.py #@time: 2018/8/23 17: ...
- (49)zabbix事件是什么?事件来源有哪些分类
什么是zabbix 事件 在trigger的文章内,我们已经有用到事件,这个事件要讲概念真心不知道怎么说,就拿trigger事件来说,如果trigger从当前值ok转变为problem,那么我们称之为 ...
- RN性能
https://facebook.github.io/react-native/docs/performance.html 一个使用RN而不是webView的重要原因是可实现60fps以及更类似原生a ...
- JavaScript 基础:Babel 转译 class 过程窥探
零.前言 虽然在 JavaScript 中对象无处不在,但这门语言并不使用经典的基于类的继承方式,而是依赖原型,至少在 ES6 之前是这样的.当时,假设我们要定义一个可以设置 id 与坐标的类,我们会 ...
- mysql 与QT的连接
第一步:安装 qt开发环境 bi@bi-desktop:~$sudo apt-get install qt4-dev-tools qt4-doc qt4-qtconfig qt4-demos qt4- ...
- STM32开发笔记之——CMSIS DAP
都说开发stm32都是使用kail iar+jatg/swd的方式,然而arm公司已经开发出了CMSIS DAP的开源下载工具,全称是CoreSight Debug Access Port,网络上有大 ...