{"id":237,"date":"2013-08-13T10:12:59","date_gmt":"2013-08-13T09:12:59","guid":{"rendered":"http:\/\/blog.mozilla.org\/jseward\/?p=237"},"modified":"2013-08-13T10:12:59","modified_gmt":"2013-08-13T09:12:59","slug":"sps-profiler-backend-news-12-august-2013","status":"publish","type":"post","link":"https:\/\/blog.mozilla.org\/jseward\/2013\/08\/13\/sps-profiler-backend-news-12-august-2013\/","title":{"rendered":"SPS profiler backend news, 12 August 2013"},"content":{"rendered":"<p>In short: more adaptation to real-use cases, and more unwind speedups.<\/p>\n<ul>\n<li>Benoit redid time-unit measurements so as to support profiling with sampling intervals of less than one millisecond.\u00a0 This will help profiling graphics and animation code (<a href=\"https:\/\/bugzilla.mozilla.org\/show_bug.cgi?id=820048\">820048<\/a>).<\/li>\n<\/ul>\n<ul>\n<li>Gijs Kruitbosch made it possible to control the size of the profiler&#8217;s circular buffer using the MOZ_PROFILER_ENTRIES environment variable (<a href=\"https:\/\/bugzilla.mozilla.org\/show_bug.cgi?id=901481\">901481<\/a>).<\/li>\n<\/ul>\n<ul>\n<li>:roc and :avih taught the compositor to notify the profiler of missed (graphics) frames, so as to help monitor and debug smoothness issues (<a href=\"https:\/\/bugzilla.mozilla.org\/show_bug.cgi?id=900785\">900785<\/a>).<\/li>\n<\/ul>\n<ul>\n<li>glibc backtrace() unwinding on Linux was removed, as it risked deadlock, and the breakpad unwinder made it redundant (<a href=\"https:\/\/bugzilla.mozilla.org\/show_bug.cgi?id=880158\">880158<\/a>).<\/li>\n<\/ul>\n<p>There was work to improve the performance of CFI and EXIDX native unwinding, by improving performance of the data structures accessed by the CFI\/EXIDX unwind algorithm:<\/p>\n<ul>\n<li>speedups for GetModuleForAddress &#8212; replaced a linear search with a binary search (<a href=\"https:\/\/bugzilla.mozilla.org\/show_bug.cgi?id=892774\">892774<\/a>).<\/li>\n<\/ul>\n<ul>\n<li>don&#8217;t generate useless frames via stack scanning, which turned out to be happening even though we thought stack scanning was disabled (<a href=\"https:\/\/bugzilla.mozilla.org\/show_bug.cgi?id=894264\">894264<\/a>).<\/li>\n<\/ul>\n<ul>\n<li>the unwinder spends considerable effort repeatedly re-generating unwind rules for the same relatively small set of code addresses.\u00a0 Caching them makes a big difference (<a href=\"https:\/\/bugzilla.mozilla.org\/show_bug.cgi?id=893542\">893542<\/a>).<\/li>\n<\/ul>\n<p>With the above fixes in place, native unwinding performance for x86_64-linux costs about 8100 instructions per frame, or around 145k instructions\/unwind for an average 18-frame unwind.<\/p>\n<p>There are still opportunities to remove inefficiency, but they are becoming scarcer.\u00a0 It might be possible to get to about 5000 insns\/frame without too much extra effort, but below that\u00a0 could be difficult.<\/p>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>In short: more adaptation to real-use cases, and more unwind speedups. Benoit redid time-unit measurements so as to support profiling with sampling intervals of less than one millisecond.\u00a0 This will help profiling graphics and animation code (820048). Gijs Kruitbosch made &hellip; <a class=\"go\" href=\"https:\/\/blog.mozilla.org\/jseward\/2013\/08\/13\/sps-profiler-backend-news-12-august-2013\/\">Continue reading<\/a><\/p>\n","protected":false},"author":240,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"_links":{"self":[{"href":"https:\/\/blog.mozilla.org\/jseward\/wp-json\/wp\/v2\/posts\/237"}],"collection":[{"href":"https:\/\/blog.mozilla.org\/jseward\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.mozilla.org\/jseward\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.mozilla.org\/jseward\/wp-json\/wp\/v2\/users\/240"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.mozilla.org\/jseward\/wp-json\/wp\/v2\/comments?post=237"}],"version-history":[{"count":0,"href":"https:\/\/blog.mozilla.org\/jseward\/wp-json\/wp\/v2\/posts\/237\/revisions"}],"wp:attachment":[{"href":"https:\/\/blog.mozilla.org\/jseward\/wp-json\/wp\/v2\/media?parent=237"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.mozilla.org\/jseward\/wp-json\/wp\/v2\/categories?post=237"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.mozilla.org\/jseward\/wp-json\/wp\/v2\/tags?post=237"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}