{"id":1513,"date":"2011-12-07T14:50:05","date_gmt":"2011-12-07T03:50:05","guid":{"rendered":"http:\/\/blog.mozilla.org\/nnethercote\/?p=1513"},"modified":"2011-12-07T14:50:05","modified_gmt":"2011-12-07T03:50:05","slug":"memshrink-progress-week-25","status":"publish","type":"post","link":"https:\/\/blog.mozilla.org\/nnethercote\/2011\/12\/07\/memshrink-progress-week-25\/","title":{"rendered":"MemShrink progress, week 25"},"content":{"rendered":"<p>It was a good week for MemShrink.<\/p>\n<h3>ObjShrink<\/h3>\n<p>The biggest news this week is that Brian Hackett landed his <a href=\"https:\/\/bugzilla.mozilla.org\/show_bug.cgi?id=637931\">objshrink<\/a> work.\u00a0 This has roughly halved the size of Firefox&#8217;s representation of JavaScript objects.\u00a0 It&#8217;s also reduced the amount of memory Firefox uses for shapes, a related data structure.\u00a0 If\u00a0 you look at about:memory you can see that &#8220;gc-heap\/objects&#8221; and &#8220;gc-heap\/shapes&#8221; entries account for many MBs of memory, so this is a big win.\u00a0 Read <a href=\"http:\/\/blog.mozilla.org\/nnethercote\/2011\/11\/01\/spidermonkey-is-on-a-diet\/\">here<\/a> (under the &#8220;Objects&#8221; and &#8220;Shape&#8221; headings) if you want more details.<\/p>\n<h3>Memory Reporting<\/h3>\n<p>I <a href=\"https:\/\/bugzilla.mozilla.org\/show_bug.cgi?id=704391\">added some more JavaScript memory reporters and fixed some problems with the existing ones<\/a>.\u00a0 Specifically&#8230;<\/p>\n<ul>\n<li>New: &#8220;runtime\/threads\/temporary&#8221; counts various pieces of short-lived data, mostly parse nodes.\u00a0 It sometimes spikes up to multiple MBs.<\/li>\n<li>New: &#8220;runtime\/threads\/normal&#8221; measures thread data on the heap that isn&#8217;t covered by &#8220;runtime\/threads\/temporary&#8221;.\u00a0 It&#8217;s normally a few 100s of KBs.<\/li>\n<li>New: &#8220;runtime\/contexts&#8221; measures JSContexts and various related structures, which usually account for a few 10s or 100s of KB.<\/li>\n<li>New\/fixed: &#8220;runtime\/threads\/regexp-code&#8221; measures code generated by the regexp compiler.\u00a0 This was previously measured under &#8220;mjit-code\/regexp&#8221; but that reporter was broken recently when the location of this generated code was moved, so I fixed it.<\/li>\n<li>Fixed: &#8220;runtime\/atoms-table&#8221; and &#8220;runtime\/runtime-object&#8221; are existing reporters that together often account for up to 4.5MB.\u00a0 They were incorrectly marked as measuring non-heap memory instead of heap memory, meaning that the &#8220;explicit&#8221; and &#8220;heap-unclassified&#8221; totals were both incorrectly inflated by that amount.\u00a0 While fixing this, I also confirmed that we weren&#8217;t making the same mistake with any of our other memory reporters.<\/li>\n<li>Renamed: &#8220;runtime\/threads\/stack-committed&#8221; was previously called &#8220;stack-size&#8221;.\u00a0 I renamed it to go with the other &#8220;runtime\/threads&#8221; reports because that&#8217;s where it conceptually belongs.<\/li>\n<\/ul>\n<p>I also <a href=\"https:\/\/bugzilla.mozilla.org\/show_bug.cgi?id=704723\">added a memory reporter for XPConnect<\/a>.\u00a0 It typically accounts for 1MB or more.<\/p>\n<p>I have a lot more work in the pipeline to improve the coverage and correctness of memory reporters.\u00a0 More about this in the coming weeks as I land the relevant patches!<\/p>\n<h3>Other<\/h3>\n<p>Joel Maher <a href=\"https:\/\/bugzilla.mozilla.org\/show_bug.cgi?id=685632\">got RSS memory measurements working for Android on Talos<\/a>, Mozilla&#8217;s performance regression testing suite.\u00a0 This was a MemShrink:P1 bug.\u00a0 Graphs of the live data can be seen <a href=\"http:\/\/graphs-new.mozilla.org\/graph.html#tests=[[135,63,20],[134,63,20],[136,63,20]]&amp;sel=none&amp;displayrange=7&amp;datatype=running\">here<\/a>.<\/p>\n<p>Benoit Jacob <a href=\"https:\/\/bugzilla.mozilla.org\/show_bug.cgi?id=705904\">made some improvements how Firefox manages and reports memory used by WebGL<\/a>.<\/p>\n<h3>Bug Counts<\/h3>\n<p>Here\u2019s the current bug count.<\/p>\n<ul>\n<li>P1: 27 (-1\/+1)<\/li>\n<li>P2: 141 (-3\/+5)<\/li>\n<li>P3: 62 (-1\/+2)<\/li>\n<li>Unprioritized: 0 (-0\/+0)<\/li>\n<\/ul>\n<p>Only three more MemShrink bugs than this time last week!\u00a0 Pretty good.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>It was a good week for MemShrink. ObjShrink The biggest news this week is that Brian Hackett landed his objshrink work.\u00a0 This has roughly halved the size of Firefox&#8217;s representation of JavaScript objects.\u00a0 It&#8217;s also reduced the amount of memory Firefox uses for shapes, a related data structure.\u00a0 If\u00a0 you look at about:memory you can [&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,30,4544,4546],"tags":[],"_links":{"self":[{"href":"https:\/\/blog.mozilla.org\/nnethercote\/wp-json\/wp\/v2\/posts\/1513"}],"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=1513"}],"version-history":[{"count":0,"href":"https:\/\/blog.mozilla.org\/nnethercote\/wp-json\/wp\/v2\/posts\/1513\/revisions"}],"wp:attachment":[{"href":"https:\/\/blog.mozilla.org\/nnethercote\/wp-json\/wp\/v2\/media?parent=1513"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.mozilla.org\/nnethercote\/wp-json\/wp\/v2\/categories?post=1513"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.mozilla.org\/nnethercote\/wp-json\/wp\/v2\/tags?post=1513"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}