Closed Bug 763519 Opened 12 years ago Closed 12 years ago

Bring back ByteArray capacity adjustment policy induced by length setter

Categories

(Tamarin Graveyard :: Library, defect)

defect
Not set
normal

Tracking

(Not tracked)

RESOLVED INCOMPLETE

People

(Reporter: pnkfelix, Assigned: pnkfelix)

References

Details

Attachments

(2 files, 1 obsolete file)

Spawned off of Bug 699176, comment 54

The logic in ByteArray::Grower::run reintroduces the doubling behavior

Grower::run was introduced by:

 http://hg.mozilla.org/tamarin-redux/rev/3b1b1c96a04c
Assignee: nobody → fklockii
Attachment #631972 - Flags: review?(kpalacz)
Comment on attachment 631972 [details] [diff] [review]
patch B v1: fix policy

Krzyzstof: for reference, compare against the version of the ByteArray.cpp code from    rev 7394:c3eb08266f02 aka CL @1063253

Also, if you do not have time for review, please delegate to e.g. wmaddox.  (But probably better to have someone doing concurrency take care of the sanity-checking here.)
Attachment #631972 - Attachment description: fix policy → patch B v1: fix policy
(In reply to Felix S Klock II from comment #5)
> Krzyzstof: for reference, compare against the version of the ByteArray.cpp
> code from    rev 7394:c3eb08266f02 aka CL @1063253

In particular, these are the differences I was focusing on when I reviewed the above:

The changes to ByteArray::SetLengthCommon, where newCap was dropped:

 http://hg.mozilla.org/tamarin-redux/diff/3b1b1c96a04c/core/ByteArrayGlue.cpp#l1.324

and The changes to Grower::ReallocBackingStore, where newCapacity was dropped:

 http://hg.mozilla.org/tamarin-redux/diff/3b1b1c96a04c/core/ByteArrayGlue.cpp#l1.188
Comment on attachment 631972 [details] [diff] [review]
patch B v1: fix policy

Review of attachment 631972 [details] [diff] [review]:
-----------------------------------------------------------------

Looks good to me. The disappearance of the original code might have been a result of an integration, although I haven't done the forensics to verify. Unfortunately this code just changed again in the concurrency branch, and would have to be reintegrated. Not sure if this is a reason to hold up this patch though.
Attachment #631972 - Flags: review?(kpalacz) → review+
(In reply to Krzysztof Palacz from comment #7)
> Comment on attachment 631972 [details] [diff] [review]
> patch B v1: fix policy

Landed in AVM branch in CL 1076034.  (Working on integrating to Main branch now.)
(In reply to Krzysztof Palacz from comment #7)
> Unfortunately this code just changed again in the concurrency branch, and
> would have to be reintegrated. Not sure if this is a reason to hold up this
> patch though.

Sigh.

I should have paid more attention to this comment; it looks like a member of the concurrency team may have independently put in a different fix for the problem (and then pushed it to Main branch).  I guess I'll review and resolve one-way-or-another.
Comment on attachment 631974 [details] [diff] [review]
patch T v2: add second test checking that length reduction 'can' reduce capacity

testcase looks good.  I ran it before and after the fix patch. I confirmed the test used to fail and passes now.
Attachment #631974 - Flags: review?(dschaffe) → review+
(In reply to Felix S Klock II from comment #9)
> I guess I'll review and resolve one-way-or-another.

(the outside changes didn't resolve the problem.  i rebased the patch and will be pushing shortly.)
changeset: 7431:48481330bf28
user:      Felix Klock II <fklockii@adobe.com>
summary:   Bug 763519: bring back ByteArray capacity adj policy induced by length setter (r=kpalacz).

http://hg.mozilla.org/tamarin-redux/rev/48481330bf28
changeset: 7432:31ed638e211b
user:      Felix Klock II <fklockii@adobe.com>
summary:   Bug 763519: Backed out CL 1076034 aka changeset 48481330bf28 (r=fklockii).

http://hg.mozilla.org/tamarin-redux/rev/31ed638e211b
changeset: 7433:b93a61ccc3bb
user:      Felix Klock II <fklockii@adobe.com>
summary:   Bug 757375: latest round of concurrency changes (p=jasowill, r=kpalacz,bgetlin,dtomack).

http://hg.mozilla.org/tamarin-redux/rev/b93a61ccc3bb
changeset: 7436:83028a01b0c6
user:      Felix Klock II <fklockii@adobe.com>
summary:   Bug 763519: fix ByteArray growth policy post CL @1076050 (r=kpalacz).

http://hg.mozilla.org/tamarin-redux/rev/83028a01b0c6
changeset: 7437:bdb826bd6701
user:      Felix Klock II <fklockii@adobe.com>
summary:   Bug 763519: regression test checking new capacity adjustment policy (r=dschaffe).

http://hg.mozilla.org/tamarin-redux/rev/bdb826bd6701
Status: NEW → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
Reopening bug for investigation.

Tom, Felix;
We are seeing this test case fail, runs out of memory and throws Error #1000 under WindowsRT when the interpreter is active.
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
(In reply to Brent Baker from comment #17)
> Reopening bug for investigation.
> 
> Tom, Felix;
> We are seeing this test case fail, runs out of memory and throws Error #1000
> under WindowsRT when the interpreter is active.

My apologizes, the test fails under ALL execution modes, hybrid, jit and interp.
Also see WE:3283218 and bz bug 775743
Blocks: 775743
changeset: 7498:02cc117784aa
user:      Brent Baker <brbaker@adobe.com>
summary:   Bug 763519: mark expected failure under winrt

http://hg.mozilla.org/tamarin-redux/rev/02cc117784aa
(In reply to Brent Baker from comment #17)
> Reopening bug for investigation.
> 
> Tom, Felix;
> We are seeing this test case fail, runs out of memory and throws Error #1000
> under WindowsRT when the interpreter is active.

Forked off into Bug 788461.
Status: REOPENED → RESOLVED
Closed: 12 years ago12 years ago
Resolution: --- → INCOMPLETE
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: