您好,欢迎光临本网站![请登录][注册会员]  
文件名称: Solaris 动态跟踪指南
  所属分类: Solaris
  开发工具:
  文件大小: 2mb
  下载次数: 0
  上传时间: 2013-04-02
  提 供 者: zzh921******
 详细说明: DTrace是一个用于SolarisTM操作系统的全面的动态跟踪框架。DTrace提供一个强大的基础结构,使管理员、开发者和服务人员能简明地回答有关操作系统和用户程序行为的任意问题。《Solaris动态跟踪指南》介绍如何使用DTrace观察、调试和调优系统行为。本书还包含一套完整的关于捆绑的DTrace观察工具和D编程语言的参考资料。 目录 前言........................................................................................................................................................21 1 简介........................................................................................................................................................25 入门 ....................................... ................................................................................................................ 25 提供器和探测器 ................................................................................................................................. 27 编译和检测过程 ................................................................................................................................. 29 变量和算术表达式 ............................................................................................................................ 30 谓词 ....................................................................................................................................................... 33 输出格式化.......................................................................................................................................... 36 数组 ....................................................................................................................................................... 39 外部符号和类型 ................................................................................................................................. 41 2 类型、运算符和表达式.....................................................................................................................43 标识符名称和关键字 ........................................................................................................................ 43 数据类型和大小 ................................................................................................................................. 44 常量 ....................................................................................................................................................... 46 算术运算符.......................................................................................................................................... 47 关系运算符.......................................................................................................................................... 48 逻辑运算符.......................................................................................................................................... 48 按位运算符.......................................................................................................................................... 49 赋值运算符.......................................................................................................................................... 50 递增和递减运算符 ............................................................................................................................ 51 条件表达式.......................................................................................................................................... 51 类型转换 .............................................................................................................................................. 52 优先级 .................................................................................................................................................. 53 3 3 变量........................................................................................................................................................55 标量变量 .............................................................................................................................................. 55 关联数组 .............................................................................................................................................. 56 线程局部变量 ..................................................................................................................................... 57 子句局部变量 ..................................................................................................................................... 60 内置变量 .............................................................................................................................................. 62 外部变量 .............................................................................................................................................. 64 4 D程序结构 ...........................................................................................................................................67 探测器子句和声明 ............................................................................................................................ 67 探测器说明.......................................................................................................................................... 68 谓词 ....................................................................................................................................................... 69 操作 ....................................................................................................................................................... 69 C预处理程序的用法 ......................................................................................................................... 69 5 指针和数组...........................................................................................................................................71 指针和地址.......................................................................................................................................... 71 指针安全 .............................................................................................................................................. 72 数组声明和存储 ................................................................................................................................. 73 指针和数组关系 ................................................................................................................................. 74 指针运算 .............................................................................................................................................. 75 通用指针 .............................................................................................................................................. 76 多维数组 .............................................................................................................................................. 76 指向DTrace对象的指针 .................................................................................................................. 77 指针和地址空间 ................................................................................................................................. 77 6 字符串 ...................................................................................................................................................79 字符串表示.......................................................................................................................................... 79 字符串常量.......................................................................................................................................... 80 字符串赋值.......................................................................................................................................... 80 字符串转换.......................................................................................................................................... 80 字符串比较.......................................................................................................................................... 81 目录 Solaris动态跟踪指南 • 2008年10月 4 7 结构和联合...........................................................................................................................................83 结构 ....................................................................................................................................................... 83 结构指针 .............................................................................................................................................. 85 联合 ....................................................................................................................................................... 89 成员大小和偏移 ................................................................................................................................. 92 位字段 .................................................................................................................................................. 92 8 类型和常量定义 ..................................................................................................................................95 Typedef ................................................................................................................................................. 95 枚举 ....................................................................................................................................................... 96 内置 ....................................................................................................................................................... 97 类型名称空间 ..................................................................................................................................... 98 9 聚合..................................................................................................................................................... 101 聚合函数 ............................................................................................................................................101 聚合 .....................................................................................................................................................102 列显聚合 ............................................................................................................................................109 数据标准化........................................................................................................................................109 清除聚合 ............................................................................................................................................113 截断聚合 ............................................................................................................................................114 最小化删除........................................................................................................................................115 10 操作和子例程 ................................................................................................................................... 117 操作 .....................................................................................................................................................117 缺省操作 ............................................................................................................................................117 数据记录操作 ...................................................................................................................................118 trace() .......................................................................................................................................118 tracemem() .................................................................................................................................119 printf() .....................................................................................................................................119 printa() .....................................................................................................................................119 stack() .......................................................................................................................................119 ustack() .....................................................................................................................................121 jstack() .....................................................................................................................................125 破坏性操作........................................................................................................................................125 目录 5 处理破坏性操作 .......................................................................................................................125 内核破坏性操作 .......................................................................................................................128 特殊操作 ............................................................................................................................................131 推理操作 ....................................................................................................................................131 exit() .........................................................................................................................................131 子例程 ................................................................................................................................................131 alloca() .....................................................................................................................................131 basename() .................................................................................................................................131 bcopy() .......................................................................................................................................132 cleanpath() ...............................................................................................................................132 copyin() .....................................................................................................................................132 copyinstr() ...............................................................................................................................132 copyinto() .................................................................................................................................133 dirname() ...................................................................................................................................133 msgdsize() .................................................................................................................................133 msgsize() ...................................................................................................................................133 mutex_owned() ...........................................................................................................................133 mutex_owner() ...........................................................................................................................134 mutex_type_adaptive() ..........................................................................................................134 progenyof() ...............................................................................................................................134 rand() .........................................................................................................................................134 rw_iswriter() ...........................................................................................................................135 rw_write_held() ......................................................................................................................135 speculation() ...........................................................................................................................135 strjoin() ...................................................................................................................................135 strlen() .....................................................................................................................................135 11 缓冲区和缓冲 ................................................................................................................................... 137 主体缓冲区........................................................................................................................................137 主体缓冲区策略 ...............................................................................................................................137 switch策略 ................................................................................................................................138 fill策略 ....................................................................................................................................138 ring策略 ....................................................................................................................................139 其他缓冲区........................................................................................................................................140 缓冲区大小........................................................................................................................................140 目录 Solaris动态跟踪指南 • 2008年10月 6 缓冲区调整大小策略 ......................................................................................................................140 12 输出格式化........................................................................................................................................ 143 printf() .............................................................................................................................................143 转换规范 ....................................................................................................................................144 标志说明符 ................................................................................................................................144 宽度和精度说明符 ...................................................................................................................145 大小前缀 ....................................................................................................................................145 转换格式 ....................................................................................................................................146 printa() .............................................................................................................................................147 trace()缺省格式 ............................................................................................................................149 13 推理跟踪 ............................................................................................................................................ 151 推理接口 ............................................................................................................................................151 创建推理 ............................................................................................................................................152 使用推理 ............................................................................................................................................152 提交推理 ............................................................................................................................................153 放弃推理 ............................................................................................................................................153 推理示例 ............................................................................................................................................154 推理选项和调整 ...............................................................................................................................158 14 dtrace(1M)实用程序 .......................................................................................................................161 说明 .....................................................................................................................................................161 选项 .....................................................................................................................................................161 操作数 ................................................................................................................................................166 退出状态 ............................................................................................................................................166 15 脚本..................................................................................................................................................... 167 解释程序文件 ...................................................................................................................................167 宏变量 ................................................................................................................................................168 宏参数 ................................................................................................................................................170 目标进程ID ......................................................................................................................................171 目录 7 16 选项和可调参数 ............................................................................................................................... 173 使用者选项........................................................................................................................................173 修改选项 ............................................................................................................................................175 17 dtrace提供器 ....................................................................................................................................177 BEGIN探测器 .....................................................................................................................................177 END探测器 .........................................................................................................................................178 ERROR探测器 .....................................................................................................................................178 稳定性 ................................................................................................................................................180 18 lockstat提供器................................................................................................................................181 概述 .....................................................................................................................................................181 自适应锁定探测器 ..........................................................................................................................181 旋转锁定探测器 ...............................................................................................................................182 线程锁定 ............................................................................................................................................183 读取器/写入器锁定探测器 ............................................................................................................183 稳定性 ................................................................................................................................................184 19 profile提供器 ..................................................................................................................................185 profile-n探测器 ............................................................................................................................185 tick-n探测器 ...................................................................................................................................188 参数 .....................................................................................................................................................188 计时器分辨率 ...................................................................................................................................188 探测器创建........................................................................................................................................190 稳定性 ................................................................................................................................................190 20 fbt提供器 ..........................................................................................................................................191 探测器 ................................................................................................................................................191 探测器参数........................................................................................................................................192 entry探测器 .............................................................................................................................192 return探测器 ...........................................................................................................................192 示例 .....................................................................................................................................................192 尾部调用优化 ...................................................................................................................................198 汇编函数 ............................................................................................................................................200 目录 Solaris动态跟踪指南 • 2008年10月 8 指令集限制........................................................................................................................................200 x86限制 ......................................................................................................................................200 SPARC限制................................................................................................................................200 断点交互 ............................................................................................................................................200 模块装入 ............................................................................................................................................201 稳定性 ................................................................................................................................................201 21 syscall提供器 ..................................................................................................................................203 探测器 ................................................................................................................................................203 系统调用记时错误 ...................................................................................................................203 子编码的系统调用 ...................................................................................................................203 大文件系统调用 .......................................................................................................................204 专用系统调用 ............................................................................................................................204 参数 .....................................................................................................................................................205 稳定性 ................................................................................................................................................205 22 sdt提供器 ..........................................................................................................................................207 探测器 ................................................................................................................................................207 示例 .....................................................................................................................................................208 创建SDT探测器 ..............................................................................................................................212 声明探测器 ................................................................................................................................212 探测器参数 ................................................................................................................................212 稳定性 ................................................................................................................................................212 23 sysinfo提供器 ..................................................................................................................................215 探测器 ................................................................................................................................................215 参数 .....................................................................................................................................................217 示例 .....................................................................................................................................................219 稳定性 ................................................................................................................................................221 24 vminfo提供器 ....................................................................................................................................223 探测器 ................................................................................................................................................223 参数 .....................................................................................................................................................225 示例 .....................................................................................................................................................225 目录 9 稳定性 ................................................................................................................................................229 25 proc提供器 ........................................................................................................................................231 探测器 ................................................................................................................................................231 参数 .....................................................................................................................................................233 lwpsinfo_t .................................................................................................................................233 psinfo_t .....................................................................................................................................236 示例 .....................................................................................................................................................237 exec..............................................................................................................................................237 start和exit .............................................................................................................................238 lwp-start和lwp-exit ............................................................................................................240 signal-send ...............................................................................................................................242 稳定性 ................................................................................................................................................243 26 sched提供器 ......................................................................................................................................245 探测器 ................................................................................................................................................245 参数 .....................................................................................................................................................247 cpuinfo_t ...................................................................................................................................248 示例 .....................................................................................................................................................248 on-cpu和off-cpu .....................................................................................................................248 enqueue和dequeue ..................................................................................................................256 sleep和wakeup .........................................................................................................................262 preempt、remain-cpu ..............................................................................................................270 change-pri .................................................................................................................................272 tick..............................................................................................................................................274 稳定性 ................................................................................................................................................276 27 io提供器 ............................................................................................................................................277 探测器 ................................................................................................................................................277 参数 .....................................................................................................................................................278 bufinfo_t结构 .........................................................................................................................278 devinfo_t ...................................................................................................................................280 fileinfo_t .................................................................................................................................280 示例 .....................................................................................................................................................281 目录 Solaris动态跟踪指南 • 2008年10月 10 稳定性 ................................................................................................................................................293 28 mib提供器 ..........................................................................................................................................295 探测器 ................................................................................................................................................295 参数 .....................................................................................................................................................307 稳定性 ................................................................................................................................................307 29 fpuinfo提供器 ..................................................................................................................................309 探测器 ................................................................................................................................................309 参数 .....................................................................................................................................................311 稳定性 ................................................................................................................................................311 30 pid提供器 ..........................................................................................................................................313 命名pid探测器 ................................................................................................................................313 函数边界探测器 ...............................................................................................................................314 entry探测器 .............................................................................................................................314 return探测器 ...........................................................................................................................315 函数偏移探测器 ...............................................................................................................................315 稳定性 ................................................................................................................................................315 31 plockstat提供器..............................................................................................................................317 概述 .....................................................................................................................................................317 互斥探测器........................................................................................................................................318 读取器/写入器锁定探测器 ............................................................................................................318 稳定性 ................................................................................................................................................319 32 fasttrap提供器................................................................................................................................321 探测器 ................................................................................................................................................321 稳定性 ................................................................................................................................................321 33 用户进程跟踪 ................................................................................................................................... 323 copyin()和copyinstr()子例程 .................................................................................................323 避免错误 ....................................................................................................................................324 目录 11 消除dtrace(1M)干扰 .....................................................................................................................325 syscall提供器 .................................................................................................................................325 ustack()操作 ...................................................................................................................................326 uregs[]数组 .....................................................................................................................................328 pid提供器 .........................................................................................................................................330 用户函数边界跟踪 ...................................................................................................................330 跟踪任意指令 ............................................................................................................................332 34 为用户应用程序静态定义跟踪 .................................................................................................... 335 选择探测器位置 ...............................................................................................................................335 向应用程序中添加探测器 .............................................................................................................336 定义提供器和探测器...............................................................................................................336 向应用程序代码中添加探测器 .............................................................................................337 生成包含探测器的应用程序 .................................................................................................337 35 安全性 ................................................................................................................................................ 339 权限 .....................................................................................................................................................339 使用DTrace的权限 .........................................................................................................................340 dtrace_proc权限 .............................................................................................................................340 dtrace_user权限 .............................................................................................................................341 dtrace_kernel权限 ........................................................................................................................342 超级用户权限 ...................................................................................................................................342 36 匿名跟踪 ............................................................................................................................................ 343 匿名启用 ............................................................................................................................................343 声明匿名状态 ...................................................................................................................................344 匿名跟踪示例 ...................................................................................................................................344 37 事后跟踪 ............................................................................................................................................ 349 显示DTrace使用者 .........................................................................................................................349 显示跟踪数据 ...................................................................................................................................350 38 性能注意事项 ................................................................................................................................... 353 限制已启用的探测器 ......................................................................................................................353 目录 Solaris动态跟踪指南 • 2008年10月 12 使用聚合 ............................................................................................................................................353 使用可高速缓存的谓词..................................................................................................................354 39 稳定性 ................................................................................................................................................ 357 稳定性级别........................................................................................................................................357 相关性类 ............................................................................................................................................359 接口属性 ............................................................................................................................................360 稳定性计算和报告 ..........................................................................................................................360 稳定性执行........................................................................................................................................362 40 转换器 ................................................................................................................................................ 365 转换器声明........................................................................................................................................365 转换运算符........................................................................................................................................367 进程模型转换器 ...............................................................................................................................368 稳定转换 ............................................................................................................................................368 41 版本控制 ............................................................................................................................................ 369 版本和发行版 ...................................................................................................................................369 版本控制选项 ...................................................................................................................................370 提供器版本控制 ...............................................................................................................................371 ...展开收缩
(系统自动生成,下载前可以参看下载内容)

下载文件列表

相关说明

  • 本站资源为会员上传分享交流与学习,如有侵犯您的权益,请联系我们删除.
  • 本站是交换下载平台,提供交流渠道,下载内容来自于网络,除下载问题外,其它问题请自行百度
  • 本站已设置防盗链,请勿用迅雷、QQ旋风等多线程下载软件下载资源,下载后用WinRAR最新版进行解压.
  • 如果您发现内容无法下载,请稍后再次尝试;或者到消费记录里找到下载记录反馈给我们.
  • 下载后发现下载的内容跟说明不相乎,请到消费记录里找到下载记录反馈给我们,经确认后退回积分.
  • 如下载前有疑问,可以通过点击"提供者"的名字,查看对方的联系方式,联系对方咨询.
 相关搜索: Solaris 动态跟踪指南
 输入关键字,在本站1000多万海量源码库中尽情搜索: