有些时候,我们特别关注程序的性能,特别是底层软件,比如驱动程序,OS等。为了更好的优化程序性能,我们必须找到性能瓶颈点,“好钢用在刀刃上”才能取得好的效果,否则可能白做工作。为了找到关键路径,我们可以使用profilng技术,在linux平台上,我们可以使用gprof和oprofile工具。gprof是GNU工具之一,它在编译的时候在每个函数的出入口加入了profiling的代码,运行时统计程序在用户态的执行信息,可以得到每个函数的调用次数,执行时间,调用关系等信息,简单易懂。适合于查找用户级程序的性能瓶颈,对于很多时间都在内核态执行的程序,gprof不适合。 oprofile也是一个开源的p Read More
posted @ 2013-04-28 09:46 立春了 Views(218) Comments(0) Diggs(0) Edit
1.打开文件vi filename2.转到文件结尾G或转到第9行9G3.删除所有内容(先用G转到文件尾),使用:[c-sharp] view plaincopyprint?:1,.d:1,.d或者删除第9行到第200行的内容(先用200G转到第200行),使用:9,.d Read More
posted @ 2013-04-28 09:34 立春了 Views(564) Comments(0) Diggs(0) Edit
Error: counter 0 not available nmi_watchdog using this resource ? Try:opcontrol --deinitecho 0 > /proc/sys/kernel/nmi_watchdog【Solution】opcontrol --deinitecho 0 > /proc/sys/kernel/watchdogopcontrol --init执行完上述三条指令后就可以了。Error:counter0notavailablenmi_watchdogusingthisresource? Read More
posted @ 2013-04-28 01:53 立春了 Views(497) Comments(0) Diggs(0) Edit