{"id":2340,"date":"2012-10-17T16:06:07","date_gmt":"2012-10-17T05:06:07","guid":{"rendered":"http:\/\/blog.mozilla.org\/nnethercote\/?p=2340"},"modified":"2012-10-17T19:52:36","modified_gmt":"2012-10-17T08:52:36","slug":"memshrink-progress-week-69-70","status":"publish","type":"post","link":"https:\/\/blog.mozilla.org\/nnethercote\/2012\/10\/17\/memshrink-progress-week-69-70\/","title":{"rendered":"MemShrink Progress, week 69&#8211;70"},"content":{"rendered":"<p>It&#8217;s been a bumper two weeks for MemShrink.<\/p>\n<h3>B2G<\/h3>\n<p>Gregor Wagner <a href=\"https:\/\/bugzilla.mozilla.org\/show_bug.cgi?id=799656\">tweaked the JS garbage collection heuristics on B2G so that collections occur more frequently<\/a>.\u00a0 This prevents too much garbage from accruing, which is important on low-memory B2G devices.<\/p>\n<p>Justin Lebar <a href=\"https:\/\/bugzilla.mozilla.org\/show_bug.cgi?id=799536\">disabled sync on B2G<\/a>, because it isn&#8217;t used.<\/p>\n<p>Justin also <a href=\"https:\/\/bugzilla.mozilla.org\/show_bug.cgi?id=800486\">implemented the ability to dump GC\/CC logs<\/a> when a particular signal is received, which is particularly useful for B2G.<\/p>\n<p>B2G&#8217;s Operation Slim Fast is in full swing.\u00a0 Please see the <a href=\"https:\/\/bugzilla.mozilla.org\/show_bug.cgi?id=797189\">tracking bug<\/a> for details about what is happening.\u00a0 While there are a number of important fixes in the pipeline, memory consumption is still a critical issue for B2G simply because the devices don&#8217;t have much memory in the first place.\u00a0 Any additional help from Mozilla developers will be greatly appreciated.\u00a0 For example, if anyone can help <a href=\"https:\/\/bugzilla.mozilla.org\/show_bug.cgi?id=798491#c29\">identify unnecessary compartments<\/a>, that would be helpful.<\/p>\n<h3>Memory Reporting<\/h3>\n<p>Boris Zbarsky <a href=\"https:\/\/bugzilla.mozilla.org\/\/show_bug.cgi?id=799796\">improved the reporting coverage of style sheets<\/a>.\u00a0 We&#8217;ve seen this improved coverage account for over 1% of explicit on desktop and over 2% of explicit on B2G.<\/p>\n<p>I <a href=\"https:\/\/bugzilla.mozilla.org\/show_bug.cgi?id=768901\">fixed some double-counting of style sheets<\/a>, and slightly improved the reporting coverage of <a href=\"https:\/\/bugzilla.mozilla.org\/show_bug.cgi?id=800187\">style sheets<\/a> and <a href=\"https:\/\/bugzilla.mozilla.org\/show_bug.cgi?id=799019\">JS compartments<\/a>.<\/p>\n<p>Nathan Froyd <a href=\"https:\/\/bugzilla.mozilla.org\/show_bug.cgi?id=746714\">added memory reporting for telemetry<\/a>.<\/p>\n<p>Justin Lebar <a href=\"https:\/\/bugzilla.mozilla.org\/show_bug.cgi?id=798510\">fixed some over-reporting of the JS stack<\/a>.\u00a0 Justin also <a href=\"https:\/\/bugzilla.mozilla.org\/show_bug.cgi?id=797890\">added to about:memory the ability to read JSON memory report data from the clipboard<\/a>.<\/p>\n<p>I <a href=\"https:\/\/bugzilla.mozilla.org\/\/show_bug.cgi?id=800703\">renamed DMD as DMDV<\/a>, in preparation for its <a href=\"https:\/\/bugzilla.mozilla.org\/show_bug.cgi?id=717853\">in-progress, non-Valgrind replacement<\/a> to take over the original name.<\/p>\n<h3>Testing With Valgrind<\/h3>\n<p>Gary Kwong has <a href=\"https:\/\/bugzilla.mozilla.org\/show_bug.cgi?id=631811\">done some heroic work recently getting Valgrind tests passing on Tinderbox<\/a>.\u00a0 (Strictly speaking, the tests run Memcheck, which is the default Valgrind tool and is synonymous with Valgrind)\u00a0 His <a href=\"https:\/\/garykwong.wordpress.com\/2012\/10\/11\/valgrind-builds-are-now-green-on-tbpl\/\">blog post about it<\/a> is well worth reading.<\/p>\n<p>This is important for MemShrink because Memcheck can detect an important class of memory leaks &#8212; ones where all references to a block of memory are lost and so the block leaks forever.\u00a0 But it&#8217;s also important for Firefox as a whole because Memcheck can detect a slew of other memory-related errors, such as writing unaddressable memory (e.g. buffer overruns) and using undefined values in dangerous ways.\u00a0 These are the kinds of defects that cause crashes, security vulnerabilities, and other major problems.<\/p>\n<p>The tests are currently hidden on TBPL because they only run on mozilla-central once a day, which is generally not enough for a test suite to be reliable enough to be worth unhiding.\u00a0 Having said that, the ability to write suppressions for errors found with Memcheck complicates considerations;\u00a0 see <a href=\"https:\/\/bugzilla.mozilla.org\/show_bug.cgi?id=800435\">bug 800435<\/a> for further discussion.<\/p>\n<h3>Add-ons<\/h3>\n<p>Gregg Lind <a href=\"https:\/\/bugzilla.mozilla.org\/show_bug.cgi?id=719455\">fixed things so that our Aurora\/Beta users are certain to get an up-to-date, non-leaky version of the Test Pilot add-on<\/a>.\u00a0 (Version 1.1.2 was the leaky version;\u00a0 version 1.2.0 or later has the fix.)\u00a0 This was a longstanding MemShrink:P1 bug.<\/p>\n<p>Erik Vold <a href=\"https:\/\/bugzilla.mozilla.org\/show_bug.cgi?id=743215\">fixed a zombie compartment in Scriptish<\/a>.\u00a0 Version 0.1.8 has the fix.<\/p>\n<p>Josep del Rio <a href=\"https:\/\/bugzilla.mozilla.org\/show_bug.cgi?id=788015\">fixed a zombie compartment in Speed Dial<\/a>.\u00a0 Version 0.9.6.10 has the fix.<\/p>\n<h3>Miscellaneous<\/h3>\n<p>Boris Zbarsky <a href=\"https:\/\/bugzilla.mozilla.org\/show_bug.cgi?id=795221\">fixed a bad zombie compartment leak relating to expandos<\/a>.\u00a0 This was a recent regression, and the fix is present on Aurora and Beta.\u00a0 The problem was <a href=\"https:\/\/blog.mozilla.org\/nnethercote\/2012\/09\/19\/memshrink-progress-week-65-66\/#comment-7640\">first reported<\/a> in the comments of my MemShrink report from four weeks ago &#8212; many thanks to Alex for reporting it and preventing it from reaching an official Firefox release!<\/p>\n<h3>Bug Counts<\/h3>\n<p>Here are the current bug counts.<\/p>\n<ul>\n<li>P1: 19 (-2\/+5)<\/li>\n<li>P2: 101 (-2\/+6)<\/li>\n<li>P3: 91 (-6\/+0)<\/li>\n<li>Unprioritized: 13 (-1\/+11)<\/li>\n<\/ul>\n<p>The unprioritized count is high because we spent the first part of today&#8217;s MemShrink meeting talking with Gavin Sharp, Jared Wein and Felipe Gomes about the upcoming <a href=\"https:\/\/blog.mozilla.org\/futurereleases\/2012\/10\/12\/firefox-beta-introduces-preliminary-support-for-a-social-api\/\">social API<\/a>, and then spent some additional time discussing B2G with David Clarke.\u00a0 As a result we didn&#8217;t have time to triage the 23 new MemShrink bugs.\u00a0 We&#8217;ve scheduled an out-of-band MemShrink meeting for next week to get on top of the bug list.<\/p>\n<h3>Visiting Mountain View<\/h3>\n<p>I&#8217;ll be in Mountain View all next week for the JS team work week.\u00a0 I&#8217;ll be happy to meet up with anyone who wants to talk about memory consumption!<\/p>\n","protected":false},"excerpt":{"rendered":"<p>It&#8217;s been a bumper two weeks for MemShrink. B2G Gregor Wagner tweaked the JS garbage collection heuristics on B2G so that collections occur more frequently.\u00a0 This prevents too much garbage from accruing, which is important on low-memory B2G devices. Justin Lebar disabled sync on B2G, because it isn&#8217;t used. Justin also implemented the ability to [&hellip;]<\/p>\n","protected":false},"author":139,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[4550,119,4261,4557,30,4544,4546],"tags":[],"_links":{"self":[{"href":"https:\/\/blog.mozilla.org\/nnethercote\/wp-json\/wp\/v2\/posts\/2340"}],"collection":[{"href":"https:\/\/blog.mozilla.org\/nnethercote\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.mozilla.org\/nnethercote\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.mozilla.org\/nnethercote\/wp-json\/wp\/v2\/users\/139"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.mozilla.org\/nnethercote\/wp-json\/wp\/v2\/comments?post=2340"}],"version-history":[{"count":0,"href":"https:\/\/blog.mozilla.org\/nnethercote\/wp-json\/wp\/v2\/posts\/2340\/revisions"}],"wp:attachment":[{"href":"https:\/\/blog.mozilla.org\/nnethercote\/wp-json\/wp\/v2\/media?parent=2340"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.mozilla.org\/nnethercote\/wp-json\/wp\/v2\/categories?post=2340"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.mozilla.org\/nnethercote\/wp-json\/wp\/v2\/tags?post=2340"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}