11 2013 档案

利用ftrace跟踪内核static tracepoint
摘要:摘要:和很多linux内核子系统一样,static tracepoint有很多层次,其中某个层次都展示给不同层次的开发者来满足他们的不同需求。关于linux tracepoint的详细信息,我们可以在linux内核文档Documentation/trace/tracepoints.txt和samples/tracepoints这两个地方找到。大致来说,对tracepoints本身的定义是第一个层次,一般只有内核开发者才会定义这些tracepoints;trace event是第二个层次,用于debug;第三个层次就是perf这些内核测试工具,他们调用底层的trace events来监控系统内核 阅读全文

posted @ 2013-11-26 14:21 山本二十八 阅读(3414) 评论(0) 推荐(0)

Tracing on Linux
摘要:The Linux tracing APIs are a relatively new addition to the kernel and one of the most powerful new features its gained in a long time. Unfortunately the plethora of terms and names for the system can be confusing, so in this follow-up to my previous post on the proc connector and socket filter, I’l 阅读全文

posted @ 2013-11-26 13:40 山本二十八 阅读(715) 评论(0) 推荐(0)

【转】ftrace 简介
摘要:ftrace 简介ftrace 的作用是帮助开发人员了解 Linux 内核的运行时行为,以便进行故障调试或性能分析。最早 ftrace 是一个 function tracer,仅能够记录内核的函数调用流程。如今 ftrace 已经成为一个 framework,采用 plugin 的方式支持开发人员添加更多种类的 trace 功能。Ftrace 由 RedHat 的 Steve Rostedt 负责维护。到 2.6.30 为止,已经支持的 tracer 包括:Function tracer和Function graph tracer: 跟踪函数调用。Schedule switch tracer: 阅读全文

posted @ 2013-11-25 10:36 山本二十八 阅读(423) 评论(0) 推荐(0)

buffer与cache的区别
摘要:top命令中有两项与内存相关的东西:buffer和cache。这两项与页高速缓存相关。磁盘的操作有逻辑级(文件系统)和物理级(磁盘块),这两种Cache就是分别缓存逻辑和物理级数据的。在linux内核的旧版本中,主要有两种不同的磁盘高速缓存:页高速缓存(page cache)和缓冲区高速缓存(buffer cache),前者用来存放访问磁盘文件内容时生成的磁盘数据页,后者把通过VFS(管理磁盘文件系统)访问的块的内容保留在内存中。从2.4.10的稳定版本开始,缓冲区高速缓存其实就不存在了。事实上,由于效率的原因,不再单独分配块缓冲区;相反,把它们存放在叫做“buffer page”的专门页中, 阅读全文

posted @ 2013-11-20 19:59 山本二十八 阅读(387) 评论(0) 推荐(0)

fio使用
摘要:关于lat(I/O completion latency)、clat(complete latency)、slat(summit latency):lat is the total latency. slat is the time it takes to submit theIO to the kernel, clat is the time from when slat is over and until thedevice has completed it (and the application is notified). Hence lat isslat + clat.1、rw_se 阅读全文

posted @ 2013-11-11 18:14 山本二十八 阅读(1099) 评论(0) 推荐(0)

导航