<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugs.webkit.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4.1"
          urlbase="https://bugs.webkit.org/"
          
          maintainer="admin@webkit.org"
>

    <bug>
          <bug_id>67899</bug_id>
          
          <creation_ts>2011-09-10 18:01:38 -0700</creation_ts>
          <short_desc>Make sure to GC decoded images that are only used with WebGL</short_desc>
          <delta_ts>2011-09-14 19:11:46 -0700</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebKit</product>
          <component>WebGL</component>
          <version>528+ (Nightly build)</version>
          <rep_platform>Unspecified</rep_platform>
          <op_sys>Unspecified</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="John Bauman">jbauman</reporter>
          <assigned_to name="John Bauman">jbauman</assigned_to>
          <cc>jamesr</cc>
    
    <cc>kbr</cc>
    
    <cc>webkit.review.bot</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>465361</commentid>
    <comment_count>0</comment_count>
    <who name="John Bauman">jbauman</who>
    <bug_when>2011-09-10 18:01:38 -0700</bug_when>
    <thetext>Make sure to GC decoded images that are only used with WebGL</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>465363</commentid>
    <comment_count>1</comment_count>
      <attachid>106994</attachid>
    <who name="John Bauman">jbauman</who>
    <bug_when>2011-09-10 18:03:54 -0700</bug_when>
    <thetext>Created attachment 106994
Patch</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>465365</commentid>
    <comment_count>2</comment_count>
    <who name="John Bauman">jbauman</who>
    <bug_when>2011-09-10 18:09:07 -0700</bug_when>
    <thetext>See http://code.google.com/p/chromium/issues/detail?id=94444 for why this is useful. With the patch, the amount of memory used only barely goes up with time, instead of causing the renderer to run out of address space

I&apos;m not sure why adding didDraw is necessary for the image to be collected. There are a bunch of ways to use an image that may not cause that method to be called, so it might be nice to have some other way to GC them.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>465723</commentid>
    <comment_count>3</comment_count>
    <who name="Kenneth Russell">kbr</who>
    <bug_when>2011-09-12 12:10:07 -0700</bug_when>
    <thetext>Nice catch.

Could you instrument CachedResource::didAccessDecodedData and see which code path is taken for the images in question? It would be good to know exactly what interaction is going on with the memory cache -- in particular, whether the image is in the cache (presumably it is) and whether it&apos;s considered to be live.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>465993</commentid>
    <comment_count>4</comment_count>
    <who name="James Robinson">jamesr</who>
    <bug_when>2011-09-12 17:43:21 -0700</bug_when>
    <thetext>didDraw() kicks the memory cache and (potentially) triggers eviction, so it&apos;s possible on your test case that there&apos;s nothing else going on, there&apos;s nothing to trigger MemoryCache::prune() other than the didDraw call from WebGL.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>466109</commentid>
    <comment_count>5</comment_count>
    <who name="John Bauman">jbauman</who>
    <bug_when>2011-09-12 21:29:53 -0700</bug_when>
    <thetext>Yeah, looks like MemoryCache::prune is never being called, because the app only loads images and does WebGL rendering, neither of which cause that. It might be nice to also do pruning when images are loaded in case some other path forgets to do didDraw, though this patch is still valuable in updating the LRU list.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>466360</commentid>
    <comment_count>6</comment_count>
      <attachid>106994</attachid>
    <who name="James Robinson">jamesr</who>
    <bug_when>2011-09-13 10:09:15 -0700</bug_when>
    <thetext>Comment on attachment 106994
Patch

R=me</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>467018</commentid>
    <comment_count>7</comment_count>
      <attachid>106994</attachid>
    <who name="John Bauman">jbauman</who>
    <bug_when>2011-09-14 07:18:58 -0700</bug_when>
    <thetext>Comment on attachment 106994
Patch

Oops, forgot to set that it needs commit queue. James?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>467098</commentid>
    <comment_count>8</comment_count>
      <attachid>106994</attachid>
    <who name="WebKit Review Bot">webkit.review.bot</who>
    <bug_when>2011-09-14 10:08:34 -0700</bug_when>
    <thetext>Comment on attachment 106994
Patch

Rejecting attachment 106994 from commit-queue.

Failed to run &quot;[&apos;/mnt/git/webkit-commit-queue/Tools/Scripts/webkit-patch&apos;, &apos;--status-host=queues.webkit.org&apos;, &apos;-...&quot; exit_code: 2

Last 500 characters of output:
 name: third_party/ots
    url: From(&apos;chromium_deps&apos;, &apos;src/third_party/ots&apos;)
    should_process: True
    requirements: set([&apos;third_party&apos;, &apos;chromium_deps&apos;, &apos;./&apos;])
  
    name: third_party/snappy/src
    url: From(&apos;chromium_deps&apos;, &apos;src/third_party/snappy/src&apos;)
    should_process: True
    requirements: set([&apos;third_party&apos;, &apos;chromium_deps&apos;, &apos;./&apos;])

Died at Tools/Scripts/update-webkit-chromium line 80.
No such file or directory at /mnt/git/webkit-commit-queue/Tools/Scripts/webkitdirs.pm line 1929.

Full output: http://queues.webkit.org/results/9661518</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>467160</commentid>
    <comment_count>9</comment_count>
      <attachid>106994</attachid>
    <who name="Kenneth Russell">kbr</who>
    <bug_when>2011-09-14 11:15:23 -0700</bug_when>
    <thetext>Comment on attachment 106994
Patch

Looks like a flake. Let&apos;s try that again.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>467540</commentid>
    <comment_count>10</comment_count>
      <attachid>106994</attachid>
    <who name="WebKit Review Bot">webkit.review.bot</who>
    <bug_when>2011-09-14 19:11:41 -0700</bug_when>
    <thetext>Comment on attachment 106994
Patch

Clearing flags on attachment: 106994

Committed r95150: &lt;http://trac.webkit.org/changeset/95150&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>467541</commentid>
    <comment_count>11</comment_count>
    <who name="WebKit Review Bot">webkit.review.bot</who>
    <bug_when>2011-09-14 19:11:46 -0700</bug_when>
    <thetext>All reviewed patches have been landed.  Closing bug.</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="1"
              isprivate="0"
          >
            <attachid>106994</attachid>
            <date>2011-09-10 18:03:54 -0700</date>
            <delta_ts>2011-09-14 19:11:41 -0700</delta_ts>
            <desc>Patch</desc>
            <filename>bug-67899-20110910180353.patch</filename>
            <type>text/plain</type>
            <size>1684</size>
            <attacher name="John Bauman">jbauman</attacher>
            
              <data encoding="base64">U3VidmVyc2lvbiBSZXZpc2lvbjogOTQ4MjEKZGlmZiAtLWdpdCBhL1NvdXJjZS9XZWJDb3JlL0No
YW5nZUxvZyBiL1NvdXJjZS9XZWJDb3JlL0NoYW5nZUxvZwppbmRleCBiY2ZhNTlkNWM5YWM3MmI5
YTAwYzMxMTMyMTE0M2I5YjE1MzViMTE0Li40NzBiZDNiNzJjMmQ5YmRkMjk5ZmQ5NDBlMDRlZGMx
OTUzYjI2MTdlIDEwMDY0NAotLS0gYS9Tb3VyY2UvV2ViQ29yZS9DaGFuZ2VMb2cKKysrIGIvU291
cmNlL1dlYkNvcmUvQ2hhbmdlTG9nCkBAIC0xLDMgKzEsMTYgQEAKKzIwMTEtMDktMTAgIEpvaG4g
QmF1bWFuICA8amJhdW1hbkBjaHJvbWl1bS5vcmc+CisKKyAgICAgICAgTWFrZSBzdXJlIHRvIEdD
IGRlY29kZWQgaW1hZ2VzIHRoYXQgYXJlIG9ubHkgdXNlZCB3aXRoIFdlYkdMCisgICAgICAgIGh0
dHBzOi8vYnVncy53ZWJraXQub3JnL3Nob3dfYnVnLmNnaT9pZD02Nzg5OQorCisgICAgICAgIFJl
dmlld2VkIGJ5IE5PQk9EWSAoT09QUyEpLgorCisgICAgICAgIFRlbGwgQ2FjaGVkSW1hZ2UgdGhh
dCB0aGUgV2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