{"id":3038,"date":"2020-04-03T07:37:49","date_gmt":"2020-04-03T07:37:49","guid":{"rendered":""},"modified":"2020-04-03T15:38:21","modified_gmt":"2020-04-03T07:38:21","slug":"%e5%b5%8c%e5%85%a5%e5%bc%8flinux%e5%90%af%e5%8a%a8%e6%97%b6%e9%97%b4%e4%bc%98%e5%8c%96%e7%9a%84%e7%a7%98%e5%af%86%e4%b9%8b%e4%b8%80%e5%b7%a5%e5%85%b7%e9%93%be%2f%e5%ba%94%e7%94%a8","status":"publish","type":"post","link":"http:\/\/www.szryc.com\/?p=3038","title":{"rendered":"\u5d4c\u5165\u5f0fLinux\u542f\u52a8\u65f6\u95f4\u4f18\u5316\u7684\u79d8\u5bc6\u4e4b\u4e00\u5de5\u5177\u94fe\/\u5e94\u7528"},"content":{"rendered":"
\n\t\u5d4c\u5165\u5f0fLinux<\/u>\u542f\u52a8\u65f6\u95f4\u4f18\u5316\u7684\u79d8\u5bc6<\/p>\n
\n\t\u3000\u300001<\/strong><\/p>\n \n\t\u3000\u3000\u5de5\u5177\u94fe\/\u5e94\u7528\u7a0b\u5e8f\u4f18\u5316<\/strong><\/p>\n \n\t\u3000\u3000\u5bfc\u8bfb\uff1a\u5d4c\u5165\u5f0fLinux\u5728\u5e94\u7528\u4e2d\u5f80\u5f80\u5e0c\u671b\u7cfb\u7edf\u80fd\u5728\u5c3d\u91cf\u77ed\u7684\u65f6\u95f4\u5185\u542f\u52a8\uff0c\u4ee5\u63d0\u9ad8\u7528\u6237\u4f53\u9a8c\u3002\u800c\u4e14\u5728\u6709\u7684\u5e94\u7528\u573a\u5408\uff0c\u5bf9\u542f\u52a8\u65f6\u95f4\u5177\u6709\u4e25\u683c\u7684\u65f6\u95f4\u8981\u6c42\uff0c\u5c24\u5176\u5728\u5de5\u4e1a\u6216\u8005\u533b\u7597\u5668\u68b0\u5e94\u7528\u9886\u57df\u3002\u6b64\u65f6\u5982\u4f55\u52a0\u5febLinux\u7684\u542f\u52a8\uff0c\u5c06\u6210\u4e3a\u4e00\u4e2a\u6311\u6218\uff0c\u5bf9\u4e8e\u5927\u591a\u6570\u5e94\u7528\u5f00\u53d1\u4eba\u5458\u800c\u8a00\uff0c\u7531\u4e8eLinux\u7cfb\u7edf\u7684\u590d\u6742\u6027\uff0c\u5bf9\u4e8e\u5982\u4f55\u63d0\u9ad8\u542f\u52a8\u901f\u5ea6\uff0c\u5f80\u5f80\u65e0\u4ece\u4e0b\u624b\u3002\u90a3\u4e48\u9605\u8bfb\u5b8c\u672c\u6587\uff0c\u5c06\u83b7\u5f97\u6e05\u6670\u5b8c\u6574\u7684\u89e3\u51b3\u601d\u8def\u3002<\/p>\n \n\t\u3000\u30001.\u964d\u4f4e\u542f\u52a8\u65f6\u95f4\u7684\u4e00\u822c\u601d\u8def<\/strong><\/p>\n \n\t\u3000\u3000\u5728\u51c6\u5907\u964d\u4f4e\u7cfb\u7edf\u7684\u542f\u52a8\u65f6\u95f4\u65f6\uff0c\u601d\u8def\u4e0a\u5e94\u5efa\u7acb\u4ee5\u4e0b\u7684\u5207\u5165\u70b9\uff1a<\/p>\n \n\t\u3000\u3000\u6700\u5feb\u7684\u4ee3\u7801\u662f\u672a\u6267\u884c\u7684\u4ee3\u7801\u3002<\/p>\n \n\t\u3000\u3000\u5f15\u5bfc\u64cd\u4f5c\u672c\u8d28\u4e0a\u7684\u5f88\u5927\u4e00\u90e8\u5206\u5de5\u4f5c\u5b9e\u9645\u4e0a\u662f\u5c06\u4ee3\u7801\u548c\u6570\u636e\u4ece\u5b58\u50a8<\/u>\u8bbe\u5907\u52a0\u8f7d\u5230RAM<\/u>\u3002\u5982\u6240\u9700\u52a0\u8f7d\u5185\u5bb9\u8d8a\u5c11\u5219\u610f\u5473\u7740\u52a0\u8f7d\u64cd\u4f5c\u8d8a\u5feb\u3002<\/p>\n \n\t\u3000\u3000\u5982\u679c\u6839\u6587\u4ef6\u7cfb\u7edf\u8d8a\u5927\uff0c\u5219\u5b89\u88c5\u65f6\u95f4\u53ef\u80fd\u4f1a\u8d8a\u957f\u3002<\/p>\n \n\t\u3000\u3000\u56e0\u6b64\uff0c\u5373\u4f7f\u672a\u6267\u884c\u7684\u4ee3\u7801\u4e5f\u4f1a\u5ef6\u957f\u542f\u52a8\u65f6\u95f4\u3002<\/p>\n \n\t\u3000\u3000\u53e6\u5916\u5728\u786c\u4ef6\u65b9\u6848\u8bbe\u8ba1\u65f6<\/u>\u5c3d\u91cf\u9009\u62e9\u8bfb\u5199\u901f\u5ea6\u5feb\u7684\u5b58\u50a8\u4ecb\u8d28\u3002\u4f8b\u5982\uff0c\u4eceSD\u5361\u542f\u52a8\u5b9e\u9645\u4e0a\u6bd4\u4eceNAND FLASH\u542f\u52a8\u5feb\u3002<\/p>\n \n\t\u3000\u30002.\u542f\u52a8\u65f6\u95f4\u6d4b\u91cf<\/u>\u65b9\u6cd5<\/strong><\/p>\n \n\t\u3000\u3000\u8981\u964d\u4f4e\u7cfb\u7edf\u7684\u542f\u52a8\u65f6\u95f4\uff0c\u5219\u9996\u5148\u9700\u8981\u9009\u62e9\u4e00\u4e2a\u53ef\u9760\u7684\u542f\u52a8\u65f6\u95f4\u7684\u6d4b\u91cf\u65b9\u6cd5\uff1a<\/p>\n \n\t\u3000\u3000\u5728Linux\u4ee3\u7801\u4e2d\u52a0\u5165\u5bf9\u67d0\u4e00\u4e2aGPI<\/u>O\u811a\u7684\u903b\u8f91\u7535\u5e73\u63a7\u5236\uff0c\u5229\u7528\u793a\u6ce2\u5668<\/u>\u6d4b\u91cfGPIO\u72b6\u6001\u3002\u540e\u9762\u5c06\u4ecb\u7ecd\u5982\u4f55\u5728\u4ee3\u7801\u4e2d\u52a0\u5165\u5bf9GPIO\u7684\u63a7\u5236\u3002<\/p>\n \n\t\u3000\u3000\u76d1\u63a7<\/u>\u4e32\u53e3\u63a7\u5236\u53f0\u62a5\u6587\u4ee5\u6d4b\u91cf\u65f6\u95f4\uff0c\u53ef\u4ee5\u4f7f\u7528grabserial\u3002<\/p>\n \n\t\u3000\u3000\u53c2\u89c1https:\/\/elinux.org\/Grabserial<\/p>\n \n\t\u3000\u30003. \u5de5\u5177\u94fe\u4f18\u5316<\/strong><\/p>\n \n\t\u3000\u30003.1 \u4ece\u5de5\u5177\u94fe\u5165\u624b<\/strong><\/p>\n \n\t\u3000\u3000\u9009\u62e9\u4f7f\u7528\u5408\u9002\u7684\u5de5\u5177\u94fe\uff0c\u5e94\u662f\u7b2c\u4e00\u4e2a\u5165\u624b\u70b9\uff0c\u56e0\u4e3a\u6240\u6709\u7684\u8fd0\u884c\u52a0\u8f7d\u56fa\u4ef6\u90fd\u662f\u7531\u5de5\u5177\u94fe\u7f16\u8bd1\u800c\u6210\u3002\u5982\u679c\u5c1a\u672a\u8fdb\u884c\u5176\u4ed6\u4f18\u5316\uff0c\u5219\u66f4\u6539\u5de5\u5177\u94fe\u7684\u597d\u5904\u5c06\u66f4\u52a0\u660e\u663e\uff0c\u5e76\u4e14\u66f4\u5bb9\u6613\u5ea6\u91cf\u3002<\/p>\n \n\t\u3000\u3000\u60a8\u53ef\u4ee5\u5728\u5de5\u5177\u94fe\u4e2d\u8fdb\u884c\u4ee5\u4e0b\u66f4\u6539\uff0c\u8fd9\u53ef\u80fd\u4f1a\u5f71\u54cd\u542f\u52a8\u65f6\u95f4\uff0c\u6027\u80fd\u548c\u5927\u5c0f\uff1a<\/p>\n \n\t\u3000\u3000\u7f16\u8bd1\u5668\u7248\u672c\uff1agcc\u548cbinuti<\/u>ls\u7684\u7248\u672c\uff0c\u6700\u65b0\u7248\u672c\u5f80\u5f80\u53ef\u4ee5\u5177\u6709\u66f4\u597d\u7684\u4f18\u5316\u529f\u80fd\u3002<\/p>\n \n\t\u3000\u3000C\u5e93\uff1aglibc\uff0cuClibc\uff0cmusl\u3002\u4f7f\u7528uClibc\u548cmusl\u5e93\u7f16\u8bd1\u7684\u6839\u6587\u4ef6\u7cfb\u7edf\u66f4\u5c0f<\/p>\n \n\t\u3000\u3000\u6307\u4ee4\u96c6\u53d8\u91cf\uff1aARM<\/u>\u6216Thumb2\uff0c\u662f\u5426\u652f\u6301\u786c\u6d6e\u70b9\u3002<\/p>\n \n\t\u3000\u3000\u53ef\u80fd\u4f1a\u5f71\u54cd\u4ee3\u7801\u6027\u80fd\u548c\u4ee3\u7801\u5927\u5c0f\uff08Thumb2\u7f16\u7801\u4e0eARM\u76f8\u540c\u7684\u6307\u4ee4\uff0c\u4f46\u4ee5\u66f4\u7d27\u51d1\u7684\u65b9\u5f0f\uff0c\u81f3\u5c11\u4f1a\u663e\u7740\u51cf\u5c0f\u5927\u5c0f\uff09\u3002<\/p>\n \n\t\u3000\u3000C\u5e93\u5728\u521b\u5efa\u5de5\u5177\u94fe\u65f6\u8fdb\u884c\u4e86\u786c\u7f16\u7801\uff0c\u53ef\u4f9b\u9009\u62e9\u7684C\u5e93\uff1a<\/p>\n \n\t\u3000\u3000glibc\uff1a\u6700\u6807\u51c6\u4e14\u529f\u80fd\u6700\u5168\u3002http:\/\/www.gnu.org\/software\/libc\/<\/p>\n \n\t\u3000\u3000uClibc\uff1a\u66f4\u5c0f\u4e14\u53ef\u914d\u7f6e\u3002\u5df2\u7ecf\u5b58\u5728\u7ea620\u5e74\u4e86\u3002http:\/\/uclibc-ng.org\/<\/p>\n \n\t\u3000\u3000musl\uff1auClibc\u66ff\u4ee3\u54c1\uff0c\u867d\u6bd4\u8f83\u65b0\u4f46\u5f88\u6210\u719f\u3002http:\/\/www.musl-libc.org\/<\/p>\n \n\t\u3000\u3000\u53ef\u4ee5\u5bf9glibc\/uclibc-ng \/musl\u8fdb\u884c\u5bf9\u6bd4\u6d4b\u8bd5<\/u>\uff1a<\/p>\n \n\t\u3000\u30001.\u9759\u6001\u7f16\u8bd1hello.c\u7a0b\u5e8f\u5e76\u6bd4\u8f83\u5927\u5c0f<\/p>\n \n\t\u3000\u3000\u4f7f\u7528gcc 6.3\uff0c armel\uff0c musl 1.1.16\uff1a 7300 \u5b57\u8282<\/p>\n \n\t\u3000\u3000\u4f7f\u7528gcc 6.3\uff0c armel\uff0c uclibc-ng 1.0.22 \uff1a 67204 \u5b57\u8282<\/p>\n \n\t\u3000\u3000\u4f7f\u7528gcc 6.2\uff0c armel\uff0c glibc\uff1a 492792 \u5b57\u8282<\/p>\n \n\t\u3000\u30002. \u9759\u6001\u7f16\u8bd1BusyBox 1.26.2\u5e76\u6bd4\u8f83\u5927\u5c0f<\/p>\n \n\t\u3000\u3000\u4f7f\u7528gcc 6.3\uff0c armel\uff0c musl 1.1.16\uff1a 183348 \u5b57\u8282<\/p>\n \n\t\u3000\u3000\u4f7f\u7528gcc 6.3\uff0c armel\uff0c uclibc-ng 1.0.22 \uff1a 210620 \u5b57\u8282<\/p>\n \n\t\u3000\u3000\u4f7f\u7528gcc 6.2\uff0c armel\uff0c glibc\uff1a 755088 \u5b57\u8282<\/p>\n \n\t\u3000\u30003.2 \u6307\u4ee4\u96c6\u9009\u62e9<\/strong><\/p>\n \n\t\u3000\u3000\u7f16\u8bd1rootfs\u8fdb\u884c\u6d4b\u8bd5\u5bf9\u6bd4\uff1a<\/p>\n \n\t\u3000\u3000\u7528gcc 7.4\u7f16\u8bd1\uff0c\u751f\u6210ARM\u4ee3\u7801\uff1a<\/p>\n \n\t\u3000\u3000\u6839\u6587\u4ef6\u7cfb\u7edf\u603b\u5927\u5c0f\uff1a3.79 MB<\/p>\n \n\t\u3000\u3000\u7528gcc 7.4\u7f16\u8bd1\uff0c\u751f\u6210Thumb2\u4ee3\u7801\uff1a<\/p>\n \n\t\u3000\u3000\u6839\u6587\u4ef6\u7cfb\u7edf\u603b\u5927\u5c0f\uff1a3.10 MB\uff08-18\uff05\uff09<\/p>\n \n\t\u3000\u3000\u6027\u80fd\u65b9\u9762\uff1aThumb2\u7684\u6027\u80fd\u660e\u663e\u6539\u5584\uff08\u5927\u7ea6\u5c11\u4e8e5\uff05\uff0c\u4f46\u662f\u4ece\u4e00\u6b21\u8fd0\u884c\u5230\u53e6\u4e00\u6b21\u8fd0\u884c\uff0c\u6d4b\u91cf\u7684\u6267\u884c\u65f6\u95f4\u7565\u6709\u53d8\u5316\uff09\u3002<\/p>\n \n\t\u3000\u30004. \u5e94\u7528\u8f6f\u4ef6\u4f18\u5316<\/strong><\/p>\n \n\t\u3000\u30004.1 \u6d4b\u91cfstrace<\/strong><\/p>\n \n\t\u3000\u3000strace\u5141\u8bb8\u8ddf\u8e2a\u5e94\u7528\u7a0b\u5e8f\u53ca\u5176\u5b50\u7ea7\u8fdb\u884c\u7684\u6240\u6709\u7cfb\u7edf\u8c03\u7528\u3002\u5bf9\u4e8e\u5f00\u53d1\u975e\u5e38\u6709\u7528\uff1a<\/p>\n \n\t\u3000\u3000\u4e86\u89e3\u5982\u4f55\u5728\u7528\u6237\u7a7a\u95f4\u4e0a\u82b1\u8d39\u65f6\u95f4<\/p>\n \n\t\u3000\u3000\u4f8b\u5982\uff0c\u8f7b\u677e\u67e5\u627e\u6253\u5f00\u5c1d\u8bd5\uff08open\uff08\uff09\uff09\uff0c\u6587\u4ef6\u8bbf\u95ee\uff08read\uff08\uff09 \/write<\/u>\uff08\uff09 \uff09\u548c\u5185\u5b58\u5206\u914d\uff08mmap2\uff08\uff09 \uff09\u3002\u65e0\u9700\u8bbf\u95ee\u6e90\u4ee3\u7801\u5373\u53ef\u5b8c\u6210\uff01<\/p>\n \n\t\u3000\u3000\u5bfb\u627e\u8017\u65f6\u6700\u957f\u7684\u5f00\u9500\u5e94\u7528<\/p>\n \n\t\u3000\u3000\u67e5\u627e\u5728\u5e94\u7528\u7a0b\u5e8f\u548c\u811a\u672c\u4e2d\u5b8c\u6210\u7684\u4e0d\u5fc5\u8981\u7684\u5de5\u4f5c\u3002\u4f8b\u5982\uff1a\u591a\u6b21\u6253\u5f00\u540c\u4e00\u6587\u4ef6\uff0c\u6216\u5c1d\u8bd5\u6253\u5f00\u4e0d\u5b58\u5728\u7684\u6587\u4ef6\u3002<\/p>\n \n\t\u3000\u3000\u5c40\u9650\u6027\uff1a\u60a8\u65e0\u6cd5\u8ddf\u8e2ainit\u8fdb\u7a0b\uff01<\/p>\n \n\t\u3000\u3000\u5173\u4e8estrace \u53c2\u89c1<\/p>\n \n\t\u3000\u3000http:\/\/sourceforge.net\/projects\/strace\/\uff1a<\/p>\n \n\t\u3000\u3000\u5728\u6240\u6709GNU \/ Linux\u7cfb\u7edf\u4e0a\u53ef\u7528\uff0c\u53ef\u4ee5\u7531\u60a8\u7684\u4ea4\u53c9\u7f16\u8bd1\u5de5\u5177\u94fe\u751f\u6210\u5668\u6784\u5efa\u3002<\/p>\n \n\t\u3000\u3000\u66f4\u7b80\u5355\u7684\u529e\u6cd5\uff1a\u76f4\u63a5\u62f7\u8d1d\u4e00\u4e2a\u73b0\u6210\u7684\u9759\u6001\u4e8c\u8fdb\u5236\u6587\u4ef6\u3002 \u53c2\u89c1<\/p>\n \n\t\u3000\u3000https:\/\/github.com\/bootlin\/staTIc-binaries\/tree\/master\/strace<\/p>\n \n\t\u3000\u3000\u53ef\u4ee5\u67e5\u770b\u8fdb\u7a0b\u7684\u64cd\u4f5c\u60c5\u51b5\uff1a<\/p>\n \n\t\u3000\u30001. \u8bbf\u95ee\u6587\u4ef6\uff0c\u5206\u914d\u5185\u5b58\u3002\u3002.<\/p>\n \n\t\u3000\u30002. \u901a\u5e38\u8db3\u4ee5\u53d1\u73b0\u7b80\u5355\u7684\u9519\u8bef\u3002<\/p>\n \n\t\u3000\u3000\u7528\u6cd5\uff1a<\/p>\n \n\t\u3000\u30001.strace \u300a\u547d\u4ee4\u300b\uff08\u5f00\u59cb\u4e00\u4e2a\u65b0\u8fdb\u7a0b\uff09<\/p>\n \n\t\u3000\u30002.strace -p \u300apid\u300b\uff08\u8ddf\u8e2a\u73b0\u6709\u8fdb\u7a0b\uff09strace -c \u300acommand\u300b\uff08\u7edf\u8ba1\u8fdb\u7a0b\u7684\u7cfb\u7edf\u5f00\u9500\u65f6\u95f4\uff09<\/p>\n \n\t\u3000\u3000\u5982\u67e5\u770bcat\u64cd\u4f5c\uff1a<\/p>\n \n\t\u3000 \n\t\u3000\u30004.2 Linux\u4e0a\u7684\u6027\u80fd\u76d1\u6d4b\u5de5\u5177oprofile<\/strong><\/p>\n \n\t\u3000\u3000Oprofile\u662flinux\u4e0a\u7684\u6027\u80fd\u76d1\u6d4b\u5de5\u5177\uff1a<\/p>\n \n\t\u3000\u3000\u5177\u6709\u4e24\u79cd\u5de5\u4f5c\u65b9\u5f0f\uff1alegacy\u6a21\u5f0f\u548cperf<\/u>_events\u6a21\u5f0f<\/p>\n \n\t\u3000\u3000legacy\u6a21\u5f0f\uff1a<\/strong><\/p>\n \n\t\u3000\u30001.\u7cbe\u5ea6\u4f4e\uff0c\u8bf7\u4f7f\u7528\u5185\u6838\u9a71\u52a8\u7a0b\u5e8f\u8fdb\u884c\u914d\u7f6e<\/p>\n \n\t\u3000\u30002.\u4f7f\u7528CONFIG_OPROFILE\u8fdb\u884c\u7f16\u8bd1\u914d\u7f6e<\/p>\n \n\t\u3000\u30003.\u7528\u6237\u7a7a\u95f4\u5de5\u5177\uff1aopcontrol\u548coprofiled<\/u><\/p>\n \n\t\u3000\u3000perf_events\u6a21\u5f0f\uff1a<\/strong><\/p>\n \n\t\u3000\u30001.\u4f7f\u7528\u786c\u4ef6\u6027\u80fd\u8ba1\u6570\u5668<\/p>\n \n\t\u3000\u30002.\u4f7f\u7528CONFIG_PERF_EVENTS\u548cCONFIG_HW_PERF_EVENTS\u7f16\u8bd1\u914d\u7f6e<\/p>\n \n\t\u3000\u30003.\u7528\u6237\u7a7a\u95f4\u5de5\u5177\uff1aoperf<\/p>\n \n\t\u3000\u3000\u5176\u4f7f\u7528\u65b9\u6cd5\uff1a<\/p>\n \n\t\u3000\u3000legacy \u6a21\u5f0f\uff1a<\/p>\n \n\t\u3000\u3000opcontrol --vmlinux=\/path\/to\/vmlinux # opTIonal step<\/p>\n \n\t\u3000\u3000opcontrol --start<\/p>\n \n\t\u3000\u3000\/my\/command<\/p>\n \n\t\u3000\u3000opcontrol --stop<\/p>\n \n\t\u3000\u3000perf_events \u6a21\u5f0f<\/p>\n \n\t\u3000\u3000operf --vmlinux=\/path\/to\/vmlinux \/my\/command<\/p>\n \n\t\u3000\u3000\u5229\u7528opreport\u83b7\u53d6\u7ed3\u679c<\/p>\n \n\t \n\t\u3000\u30004.3 perf\u5de5\u5177<\/p>\n \n\t\u3000\u3000Perf \u662f\u5185\u7f6e\u4e8eLinux \u5185\u6838\u6e90\u7801\u6811\u4e2d\u7684\u6027\u80fd\u5256\u6790\uff08profiling\uff09\u5de5\u5177\u3002\u5b83\u57fa\u4e8e\u4e8b\u4ef6\u91c7\u6837\u539f\u7406\uff0c\u4ee5\u6027\u80fd\u4e8b\u4ef6\u4e3a\u57fa\u7840\uff0c\u652f\u6301\u9488\u5bf9\u5904\u7406\u5668\u76f8\u5173\u6027\u80fd\u6307\u6807\u4e0e\u64cd\u4f5c\u7cfb\u7edf\u76f8\u5173\u6027\u80fd\u6307\u6807\u7684\u6027\u80fd\u5256\u6790\u3002\u53ef\u7528\u4e8e\u6027\u80fd\u74f6\u9888\u7684\u67e5\u627e\u4e0e\u70ed\u70b9\u4ee3\u7801\u7684\u5b9a\u4f4d\u3002linux2.6\u53ca\u540e\u7eed\u7248\u672c\u90fd\u81ea\u5e26\u8be5\u5de5\u5177\uff0c\u51e0\u4e4e\u80fd\u591f\u5904\u7406\u6240\u6709\u4e0e\u6027\u80fd\u76f8\u5173\u7684\u4e8b\u4ef6<\/p>\n \n\t\u3000\u3000\u4f7f\u7528\u786c\u4ef6\u6027\u80fd\u8ba1\u6570\u5668<\/p>\n \n\t\u3000\u3000\u4f7f\u7528CONFIG_PERF_EVENTS\u548cCONFIG_HW_PERF_EVENTS\u8fdb\u884c\u914d\u7f6e<\/p>\n \n\t\u3000\u3000\u7528\u6237\u7a7a\u95f4\u5de5\u5177\uff1a\u6027\u80fd\u3002\u5b83\u662f\u5185\u6838\u6e90\u4ee3\u7801\u7684\u4e00\u90e8\u5206\uff0c\u56e0\u6b64\u59cb\u7ec8\u4e0e\u60a8\u7684\u5185\u6838\u540c\u6b65\u3002<\/p>\n \n\t\u3000\u3000\u7528\u6cd5\uff1aperf record \/my\/command<\/p>\n \n\t\u3000\u3000\u901a\u8fc7\u4ee5\u4e0b\u65b9\u5f0f\u83b7\u5f97\u7ed3\u679c\uff1aperf report<\/p>\n \n\t \n\t\u3000\u30004.4 \u8fde\u63a5\u5668<\/u>\u4f18\u5316<\/strong><\/p>\n \n\t\u3000\u3000\u542f\u52a8\u65f6\u4f7f\u7528\u7684\u5e94\u7528\u7a0b\u5e8f\u7ec4\u4ee3\u7801\uff1a<\/p>\n \n\t\u3000\u3000\u67e5\u627e\u542f\u52a8\u671f\u95f4\u8c03\u7528\u7684\u529f\u80fd\uff0c\u4f8b\u5982\u4f7f\u7528<\/p>\n \n\t\u3000\u3000-finstrument-funcTIons gcc\u9009\u9879\u3002<\/p>\n \n\t\u3000\u3000\u521b\u5efa\u4e00\u4e2a\u81ea\u5b9a\u4e49\u7684\u94fe\u63a5\u63cf\u8ff0\u6587\u4ef6\uff0c\u4ee5\u6309\u8c03\u7528\u987a\u5e8f\u91cd\u65b0\u6392\u5217\u8fd9\u4e9b\u51fd\u6570\u3002\u53ef\u4ee5\u901a\u8fc7\u5c06\u6bcf\u4e2a\u51fd\u6570\u653e\u5728\u5404\u81ea\u7684\u90e8\u5206\u4e2d\u6765\u5b9e\u73b0\uff1a<\/p>\n \n\t\u3000\u3000-ffuncTIon-sections gcc\u9009\u9879\u3002<\/p>\n \n\t\u3000\u3000\u7279\u522b\u5bf9\u4e8e\u5177\u6709\u8f83\u5927MTD\u8bfb\u53d6\u5757\u7684\u95ea\u5b58\u5b58\u50a8\u7279\u522b\u6709\u7528\u3002\u56e0\u4e3a\u8bfb\u53d6\u6574\u4e2a\u8bfb\u53d6\u5757\u540e\uff0c\u6781\u6709\u53ef\u80fd\u8bfb\u53d6\u4e0d\u5fc5\u8981\u7684\u6570\u636e\u3002<\/p>\n \n\t\u3000\u3000\u8be6\u7ec6\u4fe1\u606f\uff1ahttp:\/\/blogs.linux.ie\/caolan\/2007\/04\/24\/controlling-symbol-ordering\/<\/p>\n \n\t\u3000\u3000\u901a\u8fc7\u5982\u4e0b\u65b9\u6cd5\uff0c\u53ef\u4ee5\u627e\u5230\u6709\u671b\u88ab\u4f18\u5316\u7684\u5730\u65b9\uff1a<\/p>\n \n\t\u3000\u30001.\u542f\u52a8\u4e00\u6b21\u5e94\u7528\u7a0b\u5e8f\u5e76\u6d4b\u91cf\u5176\u542f\u52a8\u65f6\u95f4\u3002<\/p>\n \n\t\u3000\u30002.\u518d\u6b21\u542f\u52a8\u5e94\u7528\u7a0b\u5e8f\u5e76\u6d4b\u91cf\u5176\u542f\u52a8\u65f6\u95f4\u3002\u7531\u4e8e\u5b83\u7684\u4ee3\u7801\u5e94\u4ecd\u5728Linux\u6587\u4ef6\u7f13\u5b58\u4e2d\uff0c\u6545\u5176\u4ee3\u7801\u52a0\u8f7d\u65f6\u95f4\u5c06\u4e3a\u96f6\u3002<\/p>\n \n\t\u3000\u3000\u4ece\u800c\u77e5\u9053\u7b2c\u4e00\u6b21\u52a0\u8f7d\u5e94\u7528\u7a0b\u5e8f\u4ee3\u7801\uff08\u53ca\u5176\u5e93\uff09\u6240\u82b1\u8d39\u7684\u65f6\u95f4\u3002\u94fe\u63a5\u5668\u4f18\u5316\u8282\u7701\u7684\u65f6\u95f4\u5e94\u5c11\u4e8e\u6b64\u4e0a\u9650\u3002<\/p>\n \n\t\u3000\u3000\u7136\u540e\u636e\u6b64\u53ef\u4ee5\u51b3\u5b9a\u662f\u5426\u6709\u5fc5\u8981\u8fd9\u6837\u5bf9\u8be5\u5e94\u7528\u8fdb\u884c\u94fe\u63a5\u4f18\u5316\u3002\u7531\u4e8e\u94fe\u63a5\u4f18\u5316\u5fc5\u987b\u4fee\u6539\u5e94\u7528\u7a0b\u5e8f\u7684\u7f16\u8bd1\u65b9\u5f0f\uff0c\u56e0\u6b64\u6b64\u7c7b\u4f18\u5316\u7684\u6210\u672c\u5f88\u9ad8\u3002<\/p>\n \n\t\u3000\u30004.4.1 Prelink \u9884\u94fe\u63a5\u5de5\u5177<\/strong><\/p>\n \n\t\u3000\u3000Prelink\u662fRed Hat \u5f00\u53d1\u8005 Jakub Jelinek \u6240\u8bbe\u8ba1\u7684\u5de5\u5177\uff0c\u6b63\u5982\u5176\u540d\u5b57\u6240\u793a\uff0cPrelink\u5229\u7528\u4e8b\u5148\u94fe\u63a5\u4ee3\u66ff\u8fd0\u884c\u65f6\u94fe\u63a5\u7684\u65b9\u6cd5\u6765\u52a0\u901f\u5171\u4eab\u5e93\u7684\u52a0\u8f7d\uff0c\u5b83\u4e0d\u4ec5\u53ef\u4ee5\u52a0\u5feb\u8d77\u52a8\u901f\u5ea6\uff0c\u8fd8\u53ef\u4ee5\u51cf\u5c11\u90e8\u5206\u5185\u5b58\u5f00\u9500\uff0c\u662f\u5404\u79cdLinux\u67b6\u6784\u4e0a\u7528\u4e8e\u51cf\u5c11\u7a0b\u5e8f\u52a0\u8f7d\u65f6\u95f4\u3001\u7f29\u77ed\u7cfb\u7edf\u542f\u52a8\u65f6\u95f4\u548c\u52a0\u5feb\u5e94\u7528\u7a0b\u5e8f\u542f\u52a8\u7684\u5f88\u53d7\u6b22\u8fce\u7684\u4e00\u4e2a\u5de5\u5177\u3002<\/p>\n \n\t\u3000\u3000\u9884\u94fe\u63a5\u51cf\u5c11\u4e86\u542f\u52a8\u53ef\u6267\u884c\u6587\u4ef6\u6240\u9700\u7684\u65f6\u95f4<\/p>\n \n\t\u3000\u3000\u5728Android<\/u>\u4e0a\u5e7f\u6cdb\u4f7f\u7528<\/p>\n \n\t\u3000\u3000\u5fc5\u987b\u914d\u7f6e\u4e3a\u77e5\u9053\u54ea\u4e9b\u5e93\u9700\u8981\u8fdb\u884c\u9884\u94fe\u63a5\uff0c\u5e76\u5c06\u4e3a\u6bcf\u4e2a\u53ef\u7528\u7b26\u53f7\u5206\u914d\u4e00\u4e2a\u56fa\u5b9a\u7684\u5730\u5740\uff0c\u4ece\u800c\u6d88\u9664\u4e86\u5728\u542f\u52a8\u53ef\u6267\u884c\u6587\u4ef6\u65f6\u91cd\u65b0\u5b9a\u4f4d\u7b26\u53f7\u7684\u9700\u8981\u3002<\/p>\n \n\t\u3000\u3000\u8bf7\u6ce8\u610f\u5b89\u5168\u6027\uff0c\u56e0\u4e3a\u53ef\u6267\u884c\u4ee3\u7801\u59cb\u7ec8\u52a0\u8f7d\u5728\u540c\u4e00\u5730\u5740\u3002<\/p>\n \n\t\u3000\u3000\u4ee3\u7801\u4ee5\u53ca\u6587\u6863\u53c2\u89c1<\/p>\n \n\t\u3000\u3000http:\/\/people.redhat.com\/jakub\/prelink\/<\/p>\n \n\t\u3000\u3000\u652f\u6301ARM\uff0c\u4f46\u81ea2013\u5e74\u4ee5\u6765\u672a\u53d1\u5e03\u3002Buildroot\u4e5f\u4e0d\u652f\u6301\u3002\u4f46\u662f\uff0cx86\u6bd4\u8f83\u5bb9\u6613\u5b9e\u73b0\u3002<\/p>\n \t\u5de5\u5177\u94fe\/\u5e94\u7528\u7a0b\u5e8f\u4f18\u5316\u7684\u90e8\u5206\u5c31\u5728\u6b64\u7ed3\u675f\u4e86\uff0c\u4e0b\u7bc7\u6211\u4eec\u5c06\u7ee7\u7eed\u8bb2\u5d4c\u5165\u5f0fLinux\u542f\u52a8\u65f6\u95f4\u4f18\u5316\u7684\u65b9\u6cd5\u4e4b\u6587\u4ef6\u7cfb\u7edf\uff0c\u8bf7\u5927\u5bb6\u7ee7\u7eed\u5173\u6ce8\u6211\u4eec\u7535\u5b50\u53d1\u70e7\u53cb\u7f51\u548c\u5d4c\u5165\u5f0f\u5ba2\u6808\u3002<\/p>\n","protected":false},"excerpt":{"rendered":" \u5d4c\u5165\u5f0f Linux \u542f\u52a8\u65f6\u95f4\u4f18\u5316\u7684\u79d8\u5bc6 01 \u5de5\u5177\u94fe\/\u5e94\u7528\u7a0b\u5e8f\u4f18\u5316 \u5bfc\u8bfb\uff1a\u5d4c\u5165\u5f0fLinux\u5728\u5e94\u7528\u4e2d\u5f80\u5f80\u5e0c\u671b\u7cfb\u7edf\u80fd\u5728\u5c3d\u91cf\u77ed\u7684\u65f6\u95f4\u5185\u542f\u52a8\uff0c\u4ee5\u63d0\u9ad8\u7528\u6237\u4f53\u9a8c\u3002\u800c\u4e14\u5728\u6709\u7684\u5e94\u7528\u573a\u5408\uff0c\u5bf9\u542f\u52a8\u65f6\u95f4\u5177\u6709\u4e25<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[10],"tags":[],"_links":{"self":[{"href":"http:\/\/www.szryc.com\/index.php?rest_route=\/wp\/v2\/posts\/3038"}],"collection":[{"href":"http:\/\/www.szryc.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/www.szryc.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/www.szryc.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/www.szryc.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=3038"}],"version-history":[{"count":0,"href":"http:\/\/www.szryc.com\/index.php?rest_route=\/wp\/v2\/posts\/3038\/revisions"}],"wp:attachment":[{"href":"http:\/\/www.szryc.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=3038"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.szryc.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=3038"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.szryc.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=3038"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}
\n\t <\/p>\n
\n\t <\/p>\n
\n\t <\/p>\n