Based on kernel version 3.9. Page generated on 2013-05-02 23:17 EST.
1 Chinese translated version of Documentation/basic_profiling 2 3 If you have any comment or update to the content, please post to LKML directly. 4 However, if you have problem communicating in English you can also ask the 5 Chinese maintainer for help. Contact the Chinese maintainer, if this 6 translation is outdated or there is problem with translation. 7 8 Chinese maintainer: Liang Xie <xieliang@xiaomi.com> 9 --------------------------------------------------------------------- 10 Documentation/basic_profilingçä¸æç¿»è¯ 11 12 妿æ³è¯è®ºææ´æ°æ¬æçå 容ï¼è¯·ç´æ¥åä¿¡å°LKMLãå¦æä½ ä½¿ç¨è±æäº¤æµæå°é¾çè¯ï¼ä¹å¯ 13 以å䏿çç»´æ¤è æ±å©ã妿æ¬ç¿»è¯æ´æ°ä¸åæ¶æè ç¿»è¯åå¨é®é¢ï¼è¯·èç³»ä¸æçç»´æ¤è ã 14 15 䏿çç»´æ¤è ï¼ è°¢è¯ Liang Xie <xieliang007@gmail.com> 16 䏿çç¿»è¯è ï¼ è°¢è¯ Liang Xie <xieliang007@gmail.com> 17 ä¸æçæ ¡è¯è ï¼ 18 以ä¸ä¸ºæ£æ 19 --------------------------------------------------------------------- 20 21 ä¸é¢è¿äºè¯´ææä»¤é½æ¯é常åºç¡çï¼å¦æä½ æ³è¿ä¸æ¥äºè§£è¯·é 读ç¸å ³ä¸ä¸ææ¡£ï¼ï¼ 22 请ä¸è¦å卿¬ææ¡£å¢å æ°çå 容ï¼ä½å¯ä»¥ä¿®å¤ææ¡£ä¸çé误ï¼ï¼(mbligh@aracnet.com) 23 æè°¢John Levonï¼Dave Hansenç卿°åæ¶çå¸®å© 24 25 <test> ç¨äºè¡¨ç¤ºè¦æµéçç®æ 26 请å ç¡®ä¿æ¨å·²ç»ææ£ç¡®çSystem.map / vmlinuxé ç½®ï¼ 27 28 对äºlinuxç³»ç»æ¥è¯´ï¼é ç½®vmlinuzæå®¹æçæ¹æ³å¯è½å°±æ¯ä½¿ç¨âmake installâï¼ç¶åä¿®æ¹ 29 /sbin/installkernelå°vmlinuxæ·è´å°/bootç®å½ï¼èSystem.mapé常æ¯é»è®¤å®è£ 好ç 30 31 Readprofile 32 ----------- 33 2.6ç³»åå æ ¸éè¦çæ¬ç¸å¯¹è¾æ°çreadprofileï¼æ¯å¦util-linux 2.12aä¸å å«çï¼å¯ä»¥ä»: 34 35 http://www.kernel.org/pub/linux/utils/util-linux/ ä¸è½½ 36 37 大é¨ålinuxåè¡çå·²ç»å å«äº. 38 39 å¯ç¨readprofileéè¦å¨kernelå¯å¨å½ä»¤è¡å¢å âprofile=2â 40 41 clear readprofile -r 42 <test> 43 dump output readprofile -m /boot/System.map > captured_profile 44 45 Oprofile 46 -------- 47 48 ä»http://oprofile.sourceforge.net/è·åæºä»£ç ï¼è¯·åèChanges以è·åå¹é ççæ¬ï¼ 49 å¨kernelå¯å¨å½ä»¤è¡å¢å âidle=pollâ 50 51 é ç½®CONFIG_PROFILING=yåCONFIG_OPROFILE=yç¶åéå¯è¿å ¥æ°kernel 52 53 ./configure --with-kernel-support 54 make install 55 56 æ³å¾å°å¥½çæµéç»æï¼è¯·ç¡®ä¿å¯ç¨äºæ¬å°APICç¹æ§ã妿opreportæ¾ç¤ºæ0Hz CPUï¼ 57 说æAPICç¹æ§æ²¡æå¼å¯ãå¦å¤æ³¨æidle=pollé项å¯è½æææ§è½ã 58 59 One time setup: 60 opcontrol --setup --vmlinux=/boot/vmlinux 61 62 clear opcontrol --reset 63 start opcontrol --start 64 <test> 65 stop opcontrol --stop 66 dump output opreport > output_file 67 68 妿åªçkernelç¸å ³çæ¥åç»æï¼è¯·è¿è¡å½ä»¤ opreport -l /boot/vmlinux > output_file 69 70 éè¿reseté项å¯ä»¥æ¸ çè¿æç»è®¡æ°æ®ï¼ç¸å½äºéå¯çææã