博客园  :: 首页  :: 新随笔  :: 联系 :: 订阅 订阅  :: 管理

文章分类 -  linux程序分析

摘要:http://linuxtools-rst.readthedocs.org/zh_CN/latest/advance/03_optimization.html gprof使用步骤 用gcc、g++、xlC编译程序时,使用-pg参数,如:g++ -pg -o test.exe test.cpp编译器会 阅读全文

posted @ 2016-01-05 10:39 bw_0927 阅读(218) 评论(0) 推荐(0)

摘要:http://blog.jqian.net/post/linux-perf.htmlBrendan D. Gregg 维护了一份Linux性能调优工具的蓝图Linux Performance Tools,针对Linux系统的各个组件都有相应的分析工具,一目了然。 阅读全文

posted @ 2015-10-11 15:09 bw_0927 阅读(160) 评论(0) 推荐(0)

摘要:CPU, top 按线程显示,按CPU TIME排序 https://www.panzhongxian.cn/cn/2020/09/cpu-strike-to-100-analysis/ https://www.panzhongxian.cn/cn/2020/11/how-to-profile-cp 阅读全文

posted @ 2015-08-11 17:43 bw_0927 阅读(1698) 评论(0) 推荐(0)

摘要:http://www.cnblogs.com/persistentsnail/p/3294843.html https://blog.csdn.net/littlefang/article/details/6052058 Linux中malloc的早期版本是由Doug Lea实现的,它有一个重要问题 阅读全文

posted @ 2015-07-28 16:31 bw_0927 阅读(3964) 评论(0) 推荐(0)

摘要:http://idning.github.io/gcc_gdb_gprof_gcov_valgrind.htmlgcov 函数执行频率gcov is a test coverage program how often each line of code executes what lines of ... 阅读全文

posted @ 2015-07-21 13:48 bw_0927 阅读(249) 评论(0) 推荐(0)

摘要:http://www.pubyun.com/blog/deveops/%E7%BD%91%E7%BB%9C%E8%B4%A8%E9%87%8F%E6%8C%87%E6%A0%87%E5%8F%8A%E6%B5%8B%E8%AF%95%E5%B7%A5%E5%85%B7iperf/服务器上架以,首要的... 阅读全文

posted @ 2015-07-03 15:24 bw_0927 阅读(11196) 评论(0) 推荐(0)

摘要:sysstat 工具简介 sysstat 是 Linux 系统中的常用工具包。它的主要用途是观察服务负载,比如CPU和内存的占用率、网络的使用率以及磁盘写入和读取速度等。 sysstat 工具包中包含两类工具: 即时查看工具:iostat、mpstat、sar 累计统计工具:sar http://l 阅读全文

posted @ 2015-07-03 13:57 bw_0927 阅读(165) 评论(0) 推荐(0)

摘要:http://blog.csdn.net/luansxx/article/details/7702030TOP显示的占用内存是进程的虚拟内存,我们需要了解的是程序实际占用内存的量,也就是物理内存占用。虚拟内存的地址和实际物理内存的地址之间有对应关系,这个关系是操作系统维护的,CPU负责根据这个对应关... 阅读全文

posted @ 2015-05-29 13:51 bw_0927 阅读(263) 评论(0) 推荐(0)

摘要:http://www.bubuko.com/infodetail-260176.html为什么要有KeepAlive?在谈KeepAlive之前,我们先来了解下简单TCP知识(知识很简单,高手直接忽略)。首先要明确的是在TCP层是没有“请求”一说的,经常听到在TCP层发送一个请求,这种说法是错误的。... 阅读全文

posted @ 2015-05-22 14:48 bw_0927 阅读(1209) 评论(0) 推荐(0)

摘要:http://coolshell.cn/articles/7490.html 总体来说,系统性能就是两个事: Throughput ,吞吐量。也就是每秒钟可以处理的请求数,任务数。 Latency, 系统延迟。也就是系统在处理一个请求或一个任务时的延迟。 有经验的朋友一定知道,这两个东西的一些关系: 阅读全文

posted @ 2015-05-08 14:56 bw_0927 阅读(160) 评论(0) 推荐(0)

摘要:http://www.cnblogs.com/zhiranok/archive/2012/12/22/cpp_memleak.html 安全编程-c++野指针和内存泄漏 摘要: 尽管C++ 野指针和内存泄漏一直被诟病,但是在实时性很强的应用场合,c++ 仍然是不二之选。游戏服务器开发仍然使用c++ 阅读全文

posted @ 2015-02-11 09:35 bw_0927 阅读(505) 评论(0) 推荐(0)

摘要:http://ifeve.com/unixlinux-c-7/http://www.freebsd.org/doc/zh_CN/books/handbook/dtrace.html七)DTrace/SystemTapDTrace是由Sun的几位才华横溢的工程师开发的,最开始只支持Solaris操作系... 阅读全文

posted @ 2015-02-07 10:25 bw_0927 阅读(202) 评论(0) 推荐(0)

摘要:gcore 动态产生core文件 1、uptime uptime命令用于查看服务器运行了多长时间以及有多少个用户登录,快速获知服务器的负荷情况。 uptime的输出包含一项内容是load average,显示了最近1-,5-,15分钟的负荷情况。它的值代表等待CPU处理的进程数,如果CPU没有时间处 阅读全文

posted @ 2015-01-13 10:03 bw_0927 阅读(381) 评论(0) 推荐(0)

摘要:http://zjr86999.blog.163.com/blog/static/260880200912584128886/ gcore pid //This command (from gdb) dumps memory reliably: ps -mp 13575 -o THREAD,tid, 阅读全文

posted @ 2014-11-24 15:14 bw_0927 阅读(2777) 评论(0) 推荐(0)

摘要:像使用C/C++内存管理器不会帮我们自动回收不再使用的内存,如果忘记释放不再使用的内存而不能再被重用,就造成了所谓的内存泄露。 在Linux中,用户进程在/proc/{pid}/status文件中记录了该进程的内存使用实时情况。 * VmSize: 虚拟内存大小。 整个进程使用虚拟内存大小,是VmL... 阅读全文

posted @ 2014-11-24 14:19 bw_0927 阅读(216) 评论(0) 推荐(0)

摘要:http://blog.chinaunix.net/uid-29242873-id-4065255.htmlhttp://www.ibm.com/developerworks/cn/linux/l-cn-valgrind/valgrind在C语言编程中,对程序的性能调试,判断一个程序的代码质量是否高... 阅读全文

posted @ 2014-11-19 22:23 bw_0927 阅读(499) 评论(0) 推荐(0)

摘要:http://blog.chinaunix.net/uid-29242873-id-3942763.htmlhttp://hongjiang.info/tag/oom-killer/#dmesg -r print the raw message buffer, i.e., don’t strip t... 阅读全文

posted @ 2014-11-19 22:16 bw_0927 阅读(2391) 评论(0) 推荐(0)