---
title: "systemtap探测用户态程序性能"
author: "chuqingq"
date: "2014-11-07T14:51:12Z"
tags: []
categories: ["操作系统"]
slug: "systemtap"
draft: false
lastmod: "2014-11-07T14:52:45Z"
id: 2153419
url: "https://chuqq.iteye.com/blog/2153419"
---

[http://openresty.org/download/agentzh-nginx-tutorials-zhcn.html](http://openresty.org/download/agentzh-nginx-tutorials-zhcn.html)

nginx性能跟踪中使用dtrace测试ngx\_access和ngx\_lua中的access\_xxx的性能差异。

linux下需要使用systemtap。

 

只讲了内核态（syscall），没讲用户态如何跟踪  
[http://www.ibm.com/developerworks/cn/linux/l-cn-systemtap3/index.html](http://www.ibm.com/developerworks/cn/linux/l-cn-systemtap3/index.html)  
找到了用户态的：  
[http://blog.renren.com/share/225105132/13429162618](http://blog.renren.com/share/225105132/13429162618)  
学习：echo -e "HEAD / HTTP/1.0\\r\\nHost: localhost\\r\\n\\r\\n" | nc 127.0.0.1 80  
systemtap支持哪些探测点呢？  
[http://blog.csdn.net/linyt/article/details/5305332](http://blog.csdn.net/linyt/article/details/5305332)