05 2020 档案

摘要:/******************** COPYRIGHT AND LICENCE NOTICE ******************** This source code is part of the BIGDIGITS multiple-precision arithmetic librar 阅读全文
posted @ 2020-05-22 10:22 smilingsusu 阅读(263) 评论(0) 推荐(0)
摘要:最近遇到debug需要,在proc文件系统中新增一个文件进行控制debug的开关,主要是控制trace_printk什么时候开打打印,什么时候结束打印。debug函数从入口到出口所用的时间。 /* * * * Add a directory named hello under proc, * and 阅读全文
posted @ 2020-05-21 20:39 smilingsusu 阅读(355) 评论(0) 推荐(0)
摘要:1.在Linux上当执行文件出现异常时,通常直接结束,或者生成coredump文件,debug时步骤繁琐,今天看到一种方法,在不改变原程序的情况下打印callstrace。主要做法是在程序执行时,为它注册异常信号处理函数。 2.代码 signal_lib.c #include <stdlib.h> 阅读全文
posted @ 2020-05-07 20:42 smilingsusu 阅读(329) 评论(0) 推荐(0)
摘要:一、简介 有些时候,我们特别关注程序的性能,特别是底层软件,比如驱动程序,OS等。为了更好的优化程序性能,我们必须找到性能瓶颈点,“好钢用在刀刃上”才能取 得好的效果,否则可能白做工作。为了找到关键路径,我们可以使用profilng技术,在linux平台上,我们可以使用gprof和oprofile工 阅读全文
posted @ 2020-05-06 14:04 smilingsusu 阅读(718) 评论(0) 推荐(0)