{"id":199808,"date":"2020-09-03T09:00:49","date_gmt":"2020-09-03T01:00:49","guid":{"rendered":"https:\/\/gulass.cn\/?p=199808"},"modified":"2020-08-28T23:15:55","modified_gmt":"2020-08-28T15:15:55","slug":"ltopgo-linux-guided","status":"publish","type":"post","link":"https:\/\/gulass.cn\/ltopgo-linux-guided.html","title":{"rendered":"\u5fae\u8f6f\u63a2\u7d22 LTO+PGO \u4ee5\u5b9e\u73b0\u66f4\u597d\u7684 Linux \u6027\u80fd"},"content":{"rendered":"
\u5bfc\u8bfb<\/td>\n | \u5f53\u8d8a\u6765\u8d8a\u591a\u7684\u8f6f\u4ef6\u5382\u5546\u91c7\u7528\u94fe\u63a5\u65f6\u4f18\u5316(LTO, link-time optimizations)\u548c\u914d\u7f6e\u6587\u4ef6\u5f15\u5bfc\u4f18\u5316(PGO, profile-guided optimizations)\u6765\u5229\u7528\u7f16\u8bd1\u5668\u69a8\u53d6\u6027\u80fd\u7684\u65f6\u5019\uff0c\u5fae\u8f6f\u5de5\u7a0b\u5e08\u6b63\u5728\u4e3a\u81ea\u7528\u7684 Linux \u5185\u6838\u63a2\u7d22 LTO+PGO\uff0c\u4ee5\u5b9e\u73b0\u66f4\u597d\u7684 Linux \u6027\u80fd\u3002<\/strong><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n \u5728 Linux \u5185\u6838\u4e0a\u4f7f\u7528\u94fe\u63a5\u65f6\u4f18\u5316\u5e76\u4e0d\u662f\u65b0\u6982\u5ff5\uff0c\u8fc7\u53bb\u5df2\u6709\u591a\u5bb6\u5382\u5546\u53d1\u5e03\u4e86\u9488\u5bf9 Linux \u5185\u6838\u7684 LTO \u8865\u4e01\uff0c\u4f46\u901a\u5e38\u4e0d\u4f1a\u5e26\u6765\u5f88\u5927\u7684\u53d8\u5316\u3002\u6b64\u524d Linus Torvalds \u548c\u5176\u4ed6\u4eba\u4e00\u76f4\u5bf9\u652f\u6301 LTO \u7684 Linux \u5185\u6838\u4e0d\u770b\u597d\uff0c\u90e8\u5206\u539f\u56e0\u662f\u8fc7\u53bb GCC \u7684 LTO \u72b6\u51b5\u4e0d\u4f73\u3002\u4f46\u5982\u4eca\u968f\u7740\u73b0\u4ee3 GCC \u7f16\u8bd1\u5668\uff08\u548c Clang\uff09\u7684\u53d1\u5c55\uff0cLTO \u4e5f\u9010\u6e10\u53d8\u5f97\u66f4\u597d\uff0c\u50cf Fedora \u5728\u6253\u5305\u4ed6\u4eec\u7684\u53d1\u884c\u7248\u5b89\u88c5\u5305\u65f6\u90fd\u4f1a\u9ed8\u8ba4\u4f7f\u7528 LTO\uff0c\u4e5f\u6709\u50cf Clear Linux \u8fd9\u6837\u7684\u516c\u53f8\u901a\u8fc7\u4f7f\u7528 AutoFDO\uff08\u57fa\u4e8e\u7a0b\u5e8f\u6027\u80fd\u5206\u6790\u5de5\u5177\u7684\u53cd\u9988\u5f0f\u7f16\u8bd1\u4f18\u5316\uff09\u6765\u8fdb\u4e00\u6b65\u63d0\u5347\u5176\u53d1\u884c\u7248\u7684\u6027\u80fd\u3002<\/p>\n \u76f8\u5bf9\u800c\u8a00\uff0c\u5728 Linux \u5185\u6838\u4e0a\u4f7f\u7528\u914d\u7f6e\u6587\u4ef6\u5f15\u5bfc\u4f18\u5316\u7684\u6848\u4f8b\u5219\u6bd4\u8f83\u9c9c\u89c1\u3002\u7531\u4e8e\u914d\u7f6e\u6587\u4ef6\u5f15\u5bfc\u4f18\u5316\u5b8c\u5168\u4f9d\u8d56\u4e8e\u914d\u7f6e\u6587\u4ef6\uff0c\u53cd\u9988\u7ed9\u7f16\u8bd1\u5668\u4ee5\u5e2e\u52a9\u5176\u8fdb\u884c\u4f18\u5316\u542f\u53d1\u5f0f\u5904\u7406\u3002\u56e0\u6b64\uff0c\u5bf9\u4e8e\u5b9e\u9645\u4f7f\u7528\u60c5\u51b5\u800c\u8a00\uff0c\u914d\u7f6e\u6587\u4ef6\u7684\u51c6\u786e\u6027\u81f3\u5173\u91cd\u8981\u3002\u8003\u8651\u5230\u5728 Linux \u4e0a\u770b\u5230\u7684\u5de5\u4f5c\u8d1f\u8f7d\u975e\u5e38\u591a\u6837\u5316\uff0c\u4ee5\u53ca\u5404\u79cd\u4e0d\u540c\u7684\u786c\u4ef6\u548c\u9a71\u52a8\u7a0b\u5e8f\uff0c\u8981\u751f\u6210\u5bf9 PGO \u6709\u7528\u7684\u3001\u80fd\u88ab\u5e7f\u6cdb\u4f7f\u7528\u7684\u3001\u80fd\u5e2e\u52a9\u7edd\u5927\u591a\u6570\u7528\u6237\u7684\u914d\u7f6e\u6587\u4ef6\u662f\u4e00\u9879\u8270\u5de8\u7684\u4efb\u52a1\u3002\u56e0\u6b64\uff0c\u5bf9\u4e8e Linux \u5185\u6838\u4e2d\u7684 PGO\uff0c\u66f4\u591a\u7684\u662f\u9488\u5bf9\u4e2a\u4eba\u7528\u6237\/\u7ec4\u7ec7\uff0c\u4ed6\u4eec\u53ef\u4ee5\u91c7\u7528 PGO\uff0c\u5e76\u6839\u636e\u81ea\u8eab\u7684\u5b9e\u9645\u60c5\u51b5\u8fdb\u884c\u8c03\u6574\u3002<\/p>\n \u5fae\u8f6f\u8f6f\u4ef6\u5de5\u7a0b\u7ecf\u7406 Ian Bearman \u5728\u672c\u5468\u4e3e\u529e\u7684 Linux Plumbers \u5927\u4f1a\u4e0a\u4ecb\u7ecd\u4e86\u4ed6\u4eec\u5bf9 Linux \u5185\u6838\u7684\u914d\u7f6e\u6587\u4ef6\u5f15\u5bfc\u4f18\u5316\u7684\u63a2\u7d22\u3002<\/p>\n <\/p>\n \u4ed6\u4eec\u5bf9 PGO \u7684\u5174\u8da3\u6e90\u4e8e\u5bf9 Linux \u6027\u80fd\u7684\u201c\u5185\u90e8\u5ba2\u6237\u8981\u6c42\u201d\u3002\u4e0d\u8fc7\u8bdd\u53c8\u8bf4\u56de\u6765\uff0c\u5fae\u8f6f\u81f4\u529b\u4e8e\u4f18\u5316 Linux \u6027\u80fd\u73b0\u5728\u770b\u6765\u5e76\u4e0d\u662f\u4ec0\u4e48\u5947\u602a\u7684\u4e8b\u60c5\uff0c\u53e6\u4e00\u4f4d\u5fae\u8f6f\u5de5\u7a0b\u5e08\u66fe\u662f\u63a8\u52a8 FSGSBASE \u8865\u4e01\u5f00\u53d1\u7684\u8d21\u732e\u8005\uff0c\u6700\u540e\u8fd8\u88ab\u5408\u5e76\u8fdb Linux Kernel 5.9\u3002\u5185\u5bb9<\/a><\/p>\n Redis \u662f\u4ed6\u4eec\u4e00\u76f4\u5c55\u793a\u7684\u5728\u5185\u6838\u63a2\u7d22\u4f7f\u7528 PGO \u5e76\u83b7\u76ca\u7684\u516c\u5f00\u6848\u4f8b\u4e4b\u4e00\u3002<\/p>\n <\/p>\n \u5fae\u8f6f\u4f1a\u7ee7\u7eed\u63a2\u7d22\u7528\u4e8e Linux \u5185\u6838\u7684 PGO\uff0c\u6709\u8da3\u7684\u662f\uff0c\u4eba\u4eec\u53d1\u73b0 Windows \u786e\u5b9e\u5e7f\u6cdb\u4f7f\u7528\u4e86 LTO + PGO\u3002\u636e\u8bf4\u5728 Windows \u5b9e\u4f8b\u4e2d\uff0c\u4ed6\u4eec\u770b\u5230\u8fd9\u4e9b\u7f16\u8bd1\u5668\u4f18\u5316\u7684\u6027\u80fd\u63d0\u5347\u4e86 5~20%\uff0c\u60f3\u5fc5\u662f\u4f7f\u7528\u4e86\u4ed6\u4eec\u81ea\u5df1\u7684 MSVC \u7f16\u8bd1\u5668\u3002<\/p>\n","protected":false},"excerpt":{"rendered":" \u5728 Linux \u5185\u6838\u4e0a\u4f7f\u7528\u94fe\u63a5\u65f6\u4f18\u5316\u5e76\u4e0d\u662f\u65b0\u6982\u5ff5\uff0c\u8fc7\u53bb\u5df2\u6709\u591a\u5bb6\u5382\u5546\u53d1\u5e03\u4e86\u9488\u5bf9 Linux \u5185\u6838\u7684 LTO \u8865\u4e01 […]<\/p>\n","protected":false},"author":1482,"featured_media":191718,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[21],"tags":[],"class_list":["post-199808","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-news"],"acf":[],"_links":{"self":[{"href":"https:\/\/gulass.cn\/wp-json\/wp\/v2\/posts\/199808","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/gulass.cn\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/gulass.cn\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/gulass.cn\/wp-json\/wp\/v2\/users\/1482"}],"replies":[{"embeddable":true,"href":"https:\/\/gulass.cn\/wp-json\/wp\/v2\/comments?post=199808"}],"version-history":[{"count":5,"href":"https:\/\/gulass.cn\/wp-json\/wp\/v2\/posts\/199808\/revisions"}],"predecessor-version":[{"id":199839,"href":"https:\/\/gulass.cn\/wp-json\/wp\/v2\/posts\/199808\/revisions\/199839"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/gulass.cn\/wp-json\/wp\/v2\/media\/191718"}],"wp:attachment":[{"href":"https:\/\/gulass.cn\/wp-json\/wp\/v2\/media?parent=199808"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/gulass.cn\/wp-json\/wp\/v2\/categories?post=199808"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/gulass.cn\/wp-json\/wp\/v2\/tags?post=199808"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}} |