Closed Bug 581070 Opened 15 years ago Closed 15 years ago

revise page map as (sparse) abstract data type

Categories

(Tamarin Graveyard :: Garbage Collection (mmGC), enhancement, P2)

enhancement

Tracking

(Not tracked)

RESOLVED FIXED
flash10.2.x-Spicy

People

(Reporter: pnkfelix, Assigned: pnkfelix)

References

Details

Attachments

(9 files, 12 obsolete files)

86.48 KB, application/octet-stream
Details
3.61 KB, text/plain
Details
42.65 KB, application/octet-stream
Details
60.95 KB, patch
lhansen
: review+
Details | Diff | Splinter Review
46.67 KB, patch
Details | Diff | Splinter Review
87.52 KB, patch
Details | Diff | Splinter Review
6.48 KB, text/plain
Details
2.38 KB, patch
lhansen
: review+
Details | Diff | Splinter Review
4.42 KB, patch
lhansen
: review+
Details | Diff | Splinter Review
Task for bug 445780. The GC's page map is currently a simple byte array and base address. Turning it into a sparse structure is easier if one first makes it into an abstract data type; then we can switch between underlying representations by changing its type declaration (in one place).
Blocks: 445780
(checkpoint of work.)
Assignee: nobody → fklockii
Status: NEW → ASSIGNED
(checkpointing work. going to do some performance analysis of variants on secondary machine.)
(this probably needs little more than a rubber-stamp; its the follow-on patch that really matters.)
Attachment #460291 - Attachment is obsolete: true
Attachment #461531 - Flags: feedback?(treilly)
Comment on attachment 461531 [details] [diff] [review] refactor existing pagemap for later revision. Looks great, one thing you can do in a follow on patch is remove the initial page alloc in GC's ctor. It grows on demand and there's no reason to pre-allocate (I've removed it before for various reasons but never pushed it).
Attachment #461531 - Flags: feedback?(treilly) → feedback+
2-tiered for 32-bit, 3-tiered for 64-bit. Please provide feedback on the overall design structure, and also if you see any obvious performance problems. Note that the 3-tiered page map implementation is developed incrementally via implementation-inheritance. This was quite deliberate, and the design is structured so that one can just change the declaration in one place (in the pageMap member of GC.h) in order to switch between each of the three implementations {Tiered3, CacheT3, DelayT3}. Note also that one can change the values of tier1_nbits/tier2_nbits/tier3_nbits to change how the bits of a 64-bit address are divvied up into the indexes into the tree's interior nodes and the leaf byte-array. The effects on performance can be significant, but the relationship is not 100% clear to me at this point. I've chosen a starting set of values of 12/10/12. This way each leaf ends up being 2^12 byte entries = 4096 bytes = 1 page, and each tier2 node ends up holding 2^10 pointer (64-bit) entries = 8192 bytes = 2 pages, and finally the tier1 node holds 2^12 pointer entries = 8 pages. I've played with making the leaves bigger (10/10/14) so that DelayT3 would have a better chance of delaying longer before allocating the rest of the tree structure but this seemed like it hurt more than it helped. (Writing this now I realize that maybe 11/11/12 would be a another potential distribution to try. Or maybe I should try adapting the idea I had in Tiered2 and move some of those highest bits out so that they need not be a multiple of page size.) This is half-polished at this point. I've done a fair amount of performance-related bumming. I'll post performance results in a followup comment. (I'm doing those runs on a different machine so its easier to just do that separately.) Anyway, it seems pretty stable, but there was two failures that I saw when using the 10/10/14 bit distribution, so I would not want to push this to the repository until I've addressed that.
Attachment #460292 - Attachment is obsolete: true
Attachment #461535 - Flags: feedback?(treilly)
Memory usage results for 64-bit with 12/10/12 bit distribution. Note that negative numbers are good (Represent reduction in max memory used.) To be honest I find these results surprising; I do not have the dispersive adversary turned on, so I'm not really sure why my representation would be more memory efficient; maybe it is an artifact of the change in underlying gcheap allocation behavior? Some of the cases are so significant (50% reduction) that they may bear investigation on their own... % python runtests.py -f --iterations 7 --avm /Users/pnkfelix/Dev/Bugz/bugz581070/tr-pmap-baseline/objdir-selftest64/shell/avmshell --avm2 /Users/pnkfelix/Dev/Bugz/bugz581070/tr-delay12-10-12/objdir-selftest64/shell/avmshell --memory Tamarin tests started: 2010-07-29 21:43:22.683645 Executing 394 test(s) avm: /Users/pnkfelix/Dev/Bugz/bugz581070/tr-pmap-baseline/objdir-selftest64/shell/avmshell version: cyclone avm2: /Users/pnkfelix/Dev/Bugz/bugz581070/tr-delay12-10-12/objdir-selftest64/shell/avmshell version: cyclone iterations: 7 Note that %diff is calculated using the largest memory value (not avg) from all runs avm:0 avm2:0 test best avg best avg %diff sig Metric: memory (largerValuesFaster) asmicro/alloc-1.as 504K 504K 504K 504K 0.0 0.0 asmicro/alloc-10.as 2.1M 1.6M 1.5M 1.1M -28.6 -0.6 asmicro/alloc-11.as 504K 504K 504K 504K 0.0 0.0 asmicro/alloc-12.as 504K 504K 504K 504K 0.0 0.0 asmicro/alloc-13.as 504K 504K 504K 504K 0.0 0.0 asmicro/alloc-14.as 2.2M 1.7M 1.6M 1.2M -27.3 -0.7 asmicro/alloc-2.as 504K 504K 504K 504K 0.0 0.0 asmicro/alloc-3.as 1.2M 1.0M 1.9M 1.4M 58.3 1.4 + asmicro/alloc-4.as 504K 504K 504K 504K 0.0 0.0 asmicro/alloc-5.as 504K 504K 504K 504K 0.0 0.0 asmicro/alloc-6.as 504K 504K 504K 504K 0.0 0.0 asmicro/alloc-7.as 504K 504K 504K 504K 0.0 0.0 asmicro/alloc-8.as 1.5M 1.1M 1.4M 1.1M -6.7 -0.2 asmicro/alloc-9.as 1.8M 1.4M 1.7M 1.1M -5.6 -0.1 asmicro/array-1.as 496K 496K 496K 496K 0.0 0.0 asmicro/array-2.as 492K 492K 492K 492K 0.0 0.0 asmicro/array-pop-1.as 1.4M 1.4M 1.4M 1.4M 0.0 0.0 asmicro/array-push-1.as 492K 492K 492K 492K 0.0 0.0 asmicro/array-shift-1.as 1.6M 1.4M 1.4M 1.4M -12.5 -2.5 -- asmicro/array-slice-1.as 504K 504K 504K 504K 0.0 0.0 asmicro/array-sort-1.as 1.4M 1.4M 1.4M 1.4M 0.0 0.0 asmicro/array-sort-2.as 1.0M 997K 1.1M 1010K 10.0 0.9 asmicro/array-sort-3.as 5.3M 5.3M 5.3M 5.3M 0.0 0.0 asmicro/array-sort-4.as 6.2M 6.1M 6.2M 6.2M 0.0 0.0 asmicro/array-unshift-1.as 492K 492K 492K 492K 0.0 0.0 asmicro/closedvar-read-1.as 496K 496K 496K 496K 0.0 0.0 asmicro/closedvar-write-1.as 496K 496K 496K 496K 0.0 0.0 asmicro/closedvar-write-2.as 496K 496K 496K 496K 0.0 0.0 asmicro/do-1.as 496K 496K 496K 496K 0.0 0.0 asmicro/for-1.as 496K 496K 496K 496K 0.0 0.0 asmicro/for-2.as 496K 496K 496K 496K 0.0 0.0 asmicro/for-3.as 496K 496K 496K 496K 0.0 0.0 asmicro/for-in-1.as 492K 492K 492K 492K 0.0 0.0 asmicro/for-in-2.as 492K 492K 492K 492K 0.0 0.0 asmicro/funcall-1.as 492K 492K 492K 492K 0.0 0.0 asmicro/funcall-2.as 492K 492K 492K 492K 0.0 0.0 asmicro/funcall-3.as 492K 492K 492K 492K 0.0 0.0 asmicro/funcall-4.as 504K 504K 504K 504K 0.0 0.0 asmicro/globalvar-read-1.as 496K 496K 496K 496K 0.0 0.0 asmicro/globalvar-write-1.as 496K 496K 496K 496K 0.0 0.0 asmicro/isNaN-1.as 492K 492K 492K 492K 0.0 0.0 smicro/lookup-array-fetch-1.as 3.9M 3.6M 3.3M 3.3M -15.4 -1.8 - asmicro/lookup-array-in-1.as 3.9M 3.6M 3.8M 3.4M -2.6 -0.2 cro/lookup-negindex-array-1.as 872K 868K 872K 869K 0.0 0.0 cro/lookup-negindex-array-2.as 504K 501K 504K 501K 0.0 0.0 ro/lookup-negindex-object-1.as 876K 870K 872K 871K -0.5 -0.7 ro/lookup-negindex-object-2.as 504K 500K 512K 502K 1.6 1.4 + micro/lookup-object-fetch-1.as 5.0M 5.0M 5.0M 5.0M 0.0 0.0 asmicro/lookup-object-in-1.as 5.0M 5.0M 5.0M 5.0M 0.0 0.0 asmicro/number-toString-1.as 504K 504K 504K 504K 0.0 0.0 asmicro/number-toString-2.as 504K 504K 504K 504K 0.0 0.0 asmicro/oop-1.as 1.3M 966K 1.1M 901K -15.4 -0.5 asmicro/parseFloat-1.as 492K 492K 492K 492K 0.0 0.0 asmicro/parseInt-1.as 492K 492K 492K 492K 0.0 0.0 asmicro/regex-exec-1.as 504K 504K 504K 504K 0.0 0.0 asmicro/regex-exec-2.as 504K 504K 504K 504K 0.0 0.0 asmicro/regex-exec-3.as 504K 504K 504K 504K 0.0 0.0 asmicro/regex-exec-4.as 504K 504K 504K 504K 0.0 0.0 asmicro/restarg-1.as 496K 496K 496K 496K 0.0 0.0 asmicro/restarg-2.as 492K 492K 492K 492K 0.0 0.0 asmicro/restarg-3.as 504K 504K 504K 504K 0.0 0.0 asmicro/restarg-4.as 504K 504K 504K 504K 0.0 0.0 asmicro/string-casechange-1.as 504K 504K 504K 504K 0.0 0.0 asmicro/string-casechange-2.as 504K 504K 504K 504K 0.0 0.0 asmicro/string-charAt-1.as 492K 492K 492K 492K 0.0 0.0 asmicro/string-charAt-2.as 504K 504K 504K 504K 0.0 0.0 asmicro/string-charCodeAt-1.as 492K 492K 492K 492K 0.0 0.0 asmicro/string-charCodeAt-2.as 504K 504K 504K 504K 0.0 0.0 micro/string-fromCharCode-1.as 492K 492K 492K 492K 0.0 0.0 micro/string-fromCharCode-2.as 504K 504K 504K 504K 0.0 0.0 asmicro/string-indexOf-1.as 492K 492K 492K 492K 0.0 0.0 asmicro/string-indexOf-2.as 492K 492K 492K 492K 0.0 0.0 asmicro/string-indexOf-3.as 492K 492K 492K 492K 0.0 0.0 smicro/string-lastIndexOf-1.as 492K 492K 492K 492K 0.0 0.0 smicro/string-lastIndexOf-2.as 492K 492K 492K 492K 0.0 0.0 smicro/string-lastIndexOf-3.as 492K 492K 492K 492K 0.0 0.0 asmicro/string-slice-1.as 504K 504K 504K 504K 0.0 0.0 asmicro/string-split-1.as 504K 504K 504K 504K 0.0 0.0 asmicro/string-split-2.as 504K 504K 504K 504K 0.0 0.0 asmicro/string-substring-1.as 504K 504K 504K 504K 0.0 0.0 asmicro/switch-1.as 492K 492K 492K 492K 0.0 0.0 asmicro/switch-2.as 492K 492K 492K 492K 0.0 0.0 asmicro/switch-3.as 492K 492K 492K 492K 0.0 0.0 asmicro/try-1.as 492K 492K 492K 492K 0.0 0.0 asmicro/try-2.as 1.9M 1.1M 1.9M 1.4M 0.0 0.0 asmicro/try-3.as 504K 504K 504K 504K 0.0 0.0 asmicro/vector-push-1.as 492K 492K 492K 492K 0.0 0.0 asmicro/while-1.as 496K 496K 496K 496K 0.0 0.0 jsbench/Crypt.as 79.9M 79.5M 80.3M 79.8M 0.5 0.8 jsbench/Euler.as 7.1M 5.3M 6.7M 5.2M -5.6 -0.2 jsbench/FFT.as 26.5M 25.6M 25.9M 21.1M -2.3 -0.1 jsbench/HeapSort.as 9.7M 9.3M 9.7M 9.3M 0.0 0.0 jsbench/LUFact.as 31.3M 25.2M 31.1M 18.2M -0.6 -0.0 jsbench/Moldyn.as 2.2M 1.5M 1.8M 1.4M -18.2 -0.4 jsbench/RayTracer.as 1.9M 1.4M 2.2M 1.6M 15.8 0.4 jsbench/Series.as 10.4M 10.0M 10.2M 9.7M -1.9 -0.3 jsbench/SOR.as 62.1M 60.2M 58.2M 55.9M -6.3 -1.0 - jsbench/SparseMatmult.as 18.2M 17.6M 22.1M 19.7M 21.4 1.7 + jsbench/typed/Crypt.as 34.8M 34.8M 34.8M 34.8M 0.0 0.0 jsbench/typed/Euler.as 3.0M 2.2M 3.0M 2.4M 0.0 0.0 jsbench/typed/FFT.as 1.7M 1.5M 1.8M 1.6M 5.9 0.2 jsbench/typed/HeapSort.as 4.3M 4.3M 4.3M 4.3M 0.0 0.0 jsbench/typed/LUFact.as 3.2M 3.1M 3.7M 3.2M 15.6 1.9 + jsbench/typed/Moldyn.as 2.4M 1.6M 1.7M 1.3M -29.2 -0.6 jsbench/typed/RayTracer.as 1.3M 924K 1.2M 1015K -7.7 -0.2 jsbench/typed/Series.as 1.8M 1.2M 1.8M 1.2M 0.0 0.0 jsbench/typed/SOR.as 9.8M 9.6M 9.5M 9.5M -3.1 -1.6 - jsbench/typed/SparseMatmult.as 5.8M 5.6M 5.7M 5.6M -1.7 -0.7 jsmicro/alloc-1.as 504K 504K 504K 504K 0.0 0.0 jsmicro/alloc-10.as 1.5M 1.0M 1.7M 1.2M 13.3 0.3 jsmicro/alloc-11.as 504K 504K 504K 504K 0.0 0.0 jsmicro/alloc-12.as 504K 504K 504K 504K 0.0 0.0 jsmicro/alloc-13.as 504K 504K 504K 504K 0.0 0.0 jsmicro/alloc-14.as 2.2M 1.7M 2.1M 1.5M -4.5 -0.1 jsmicro/alloc-2.as 504K 504K 504K 504K 0.0 0.0 jsmicro/alloc-3.as 1.2M 1023K 1.6M 1.1M 33.3 0.7 jsmicro/alloc-4.as 504K 504K 504K 504K 0.0 0.0 jsmicro/alloc-5.as 504K 504K 504K 504K 0.0 0.0 jsmicro/alloc-6.as 504K 504K 504K 504K 0.0 0.0 jsmicro/alloc-7.as 504K 504K 504K 504K 0.0 0.0 jsmicro/alloc-8.as 1.6M 1.2M 1.9M 1.1M 18.7 0.4 jsmicro/alloc-9.as 1.5M 1.1M 1.9M 1.4M 26.7 0.6 jsmicro/array-1.as 492K 492K 492K 492K 0.0 0.0 jsmicro/array-2.as 492K 492K 492K 492K 0.0 0.0 jsmicro/array-pop-1.as 1.7M 1.7M 1.7M 1.7M 0.0 0.0 jsmicro/array-push-1.as 492K 492K 492K 492K 0.0 0.0 jsmicro/array-shift-1.as 1.7M 1.7M 1.7M 1.7M 0.0 0.0 jsmicro/array-slice-1.as 504K 504K 504K 504K 0.0 0.0 jsmicro/array-sort-1.as 1.7M 1.7M 1.7M 1.7M 0.0 0.0 jsmicro/array-sort-2.as 1.1M 1.0M 1.0M 1015K -9.1 -1.7 - jsmicro/array-sort-3.as 5.3M 5.3M 5.3M 5.3M 0.0 0.0 jsmicro/array-sort-4.as 6.3M 6.2M 6.3M 6.2M 0.0 0.0 jsmicro/array-unshift-1.as 504K 504K 504K 504K 0.0 0.0 jsmicro/closedvar-read-1.as 492K 492K 492K 492K 0.0 0.0 jsmicro/closedvar-write-1.as 492K 492K 492K 492K 0.0 0.0 jsmicro/closedvar-write-2.as 492K 492K 492K 492K 0.0 0.0 jsmicro/do-1.as 492K 492K 492K 492K 0.0 0.0 jsmicro/for-1.as 492K 492K 492K 492K 0.0 0.0 jsmicro/for-2.as 2.0M 1.2M 1.8M 1.3M -10.0 -0.2 jsmicro/for-3.as 1.6M 1.2M 1.8M 1.2M 12.5 0.2 jsmicro/for-in-1.as 492K 492K 492K 492K 0.0 0.0 jsmicro/for-in-2.as 492K 492K 492K 492K 0.0 0.0 jsmicro/funcall-1.as 492K 492K 492K 492K 0.0 0.0 jsmicro/funcall-2.as 492K 492K 492K 492K 0.0 0.0 jsmicro/funcall-3.as 492K 492K 492K 492K 0.0 0.0 jsmicro/funcall-4.as 504K 504K 504K 504K 0.0 0.0 jsmicro/globalvar-read-1.as 492K 492K 492K 492K 0.0 0.0 jsmicro/globalvar-write-1.as 492K 492K 492K 492K 0.0 0.0 jsmicro/isNaN-1.as 492K 492K 492K 492K 0.0 0.0 smicro/lookup-array-fetch-1.as 3.9M 3.7M 3.3M 3.3M -15.4 -2.2 -- jsmicro/lookup-array-in-1.as 3.9M 3.7M 3.9M 3.5M 0.0 0.0 micro/lookup-object-fetch-1.as 5.0M 5.0M 5.0M 5.0M 0.0 0.0 jsmicro/lookup-object-in-1.as 5.0M 5.0M 5.0M 5.0M 0.0 0.0 jsmicro/number-toString-1.as 504K 504K 504K 504K 0.0 0.0 jsmicro/number-toString-2.as 504K 504K 504K 504K 0.0 0.0 jsmicro/oop-1.as 956K 849K 1.1M 878K 17.8 0.8 jsmicro/parseFloat-1.as 1.4M 1.1M 1.6M 1.3M 14.3 0.4 jsmicro/parseInt-1.as 492K 492K 492K 492K 0.0 0.0 jsmicro/regex-exec-1.as 504K 504K 504K 504K 0.0 0.0 jsmicro/regex-exec-2.as 504K 504K 504K 504K 0.0 0.0 jsmicro/regex-exec-3.as 504K 504K 504K 504K 0.0 0.0 jsmicro/regex-exec-4.as 504K 504K 504K 504K 0.0 0.0 jsmicro/string-casechange-1.as 504K 504K 504K 504K 0.0 0.0 jsmicro/string-casechange-2.as 504K 504K 504K 504K 0.0 0.0 jsmicro/string-charAt-1.as 492K 492K 492K 492K 0.0 0.0 jsmicro/string-charAt-2.as 504K 504K 504K 504K 0.0 0.0 jsmicro/string-charCodeAt-1.as 492K 492K 492K 492K 0.0 0.0 jsmicro/string-charCodeAt-2.as 496K 496K 496K 496K 0.0 0.0 micro/string-fromCharCode-1.as 492K 492K 492K 492K 0.0 0.0 micro/string-fromCharCode-2.as 504K 504K 504K 504K 0.0 0.0 micro/string-fromCharCode-3.as 504K 504K 504K 504K 0.0 0.0 micro/string-fromCharCode-4.as 504K 504K 504K 504K 0.0 0.0 jsmicro/string-indexOf-1.as 492K 492K 492K 492K 0.0 0.0 jsmicro/string-indexOf-2.as 492K 492K 492K 492K 0.0 0.0 jsmicro/string-indexOf-3.as 492K 492K 492K 492K 0.0 0.0 smicro/string-lastIndexOf-1.as 492K 492K 492K 492K 0.0 0.0 smicro/string-lastIndexOf-2.as 492K 492K 492K 492K 0.0 0.0 smicro/string-lastIndexOf-3.as 492K 492K 492K 492K 0.0 0.0 jsmicro/string-slice-1.as 504K 504K 504K 504K 0.0 0.0 jsmicro/string-split-1.as 504K 504K 504K 504K 0.0 0.0 jsmicro/string-split-2.as 504K 504K 504K 504K 0.0 0.0 jsmicro/string-substring-1.as 504K 504K 504K 504K 0.0 0.0 jsmicro/switch-1.as 492K 492K 492K 492K 0.0 0.0 jsmicro/switch-2.as 492K 492K 492K 492K 0.0 0.0 jsmicro/switch-3.as 492K 492K 492K 492K 0.0 0.0 jsmicro/try-1.as 492K 492K 492K 492K 0.0 0.0 jsmicro/try-2.as 1.7M 1.2M 1.8M 1.1M 5.9 0.1 jsmicro/try-3.as 504K 504K 504K 504K 0.0 0.0 jsmicro/while-1.as 492K 492K 492K 492K 0.0 0.0 e/describetype/desctypeperf.as 1.6M 1.3M 1.7M 1.2M 6.2 0.1 anguage/e4x/addingToXMLList.as 1.6M 1.3M 1.5M 1.3M -6.3 -0.3 ge/e4x/appendChildAndString.as 1.6M 1.2M 1.6M 1.4M 0.0 0.0 concatenatingStringsFromE4X.as 1.4M 1.2M 1.5M 1.1M 7.1 0.2 x/simpleStringConcatenation.as 1.5M 1.2M 1.5M 1.3M 0.0 0.0 /e4x/usingAppendChildAndE4X.as 1.5M 1.3M 1.4M 1.2M -6.7 -0.2 nguage/string/append_concat.as 19.5M 19.5M 19.5M 19.5M 0.0 0.0 ge/string/append_equal_plus.as 19.3M 19.3M 19.3M 19.3M 0.0 0.0 ge/string/append_plus_equal.as 19.3M 19.3M 19.3M 19.3M 0.0 0.0 language/string/charAt.as 7.5M 7.5M 7.5M 7.5M 0.0 0.0 language/string/charCodeAt.as 7.5M 7.5M 7.5M 7.5M 0.0 0.0 language/string/indexOf.as 17.8M 17.8M 17.8M 17.8M 0.0 0.0 language/string/lastIndexOf.as 11.5M 11.5M 11.5M 11.5M 0.0 0.0 language/string/replace.as 3.5M 2.0M 3.2M 2.6M -8.6 -0.2 language/string/replace2.as 496K 496K 500K 496K 0.8 2.9 + language/string/search.as 868K 868K 868K 868K 0.0 0.0 language/string/slice.as 3.9M 3.9M 3.9M 3.9M 0.0 0.0 language/string/split.as 82.9M 82.9M 82.9M 82.9M 0.0 0.0 ring/static_ascii_array_100.as 4.1M 2.5M 2.1M 1.9M -48.8 -1.1 - tring/static_ascii_array_50.as 3.6M 3.5M 3.7M 3.3M 2.8 0.3 ing/static_latin1_array_100.as 8.1M 5.1M 4.8M 4.5M -40.7 -1.3 - ring/static_latin1_array_50.as 5.2M 4.8M 5.4M 5.2M 3.8 0.5 language/string/substr.as 1.9M 1.9M 1.9M 1.9M 0.0 0.0 language/string/substring.as 1.9M 1.9M 1.9M 1.9M 0.0 0.0 /string/typed/append_concat.as 19.3M 19.3M 19.3M 19.3M 0.0 0.0 ing/typed/append_equal_plus.as 19.3M 19.3M 19.3M 19.3M 0.0 0.0 ing/typed/append_plus_equal.as 19.3M 19.3M 19.3M 19.3M 0.0 0.0 anguage/string/typed/charAt.as 7.5M 7.4M 7.5M 7.3M 0.0 0.0 age/string/typed/charCodeAt.as 7.5M 7.4M 7.5M 7.4M 0.0 0.0 nguage/string/typed/indexOf.as 17.8M 17.7M 17.8M 17.6M 0.0 0.0 ge/string/typed/lastIndexOf.as 11.5M 11.5M 11.5M 11.5M 0.0 0.0 nguage/string/typed/replace.as 3.5M 2.1M 3.2M 2.3M -8.6 -0.1 guage/string/typed/replace2.as 496K 496K 496K 496K 0.0 0.0 anguage/string/typed/search.as 868K 868K 868K 868K 0.0 0.0 language/string/typed/slice.as 4.7M 4.1M 4.7M 4.2M 0.0 0.0 language/string/typed/split.as 82.9M 82.9M 82.9M 82.9M 0.0 0.0 anguage/string/typed/substr.as 1.9M 1.9M 1.9M 1.9M 0.0 0.0 uage/string/typed/substring.as 1.9M 1.9M 1.9M 1.9M 0.0 0.0 misc/boids.as 1.4M 1013K 1.4M 971K 0.0 0.0 misc/boidshack.as 11.0M 10.9M 11.0M 10.6M 0.0 0.0 misc/gameoflife.as 3.2M 2.9M 3.4M 3.0M 6.2 0.5 misc/primes.as 492K 492K 492K 492K 0.0 0.0 mmgc/gcbench.as 29.5M 29.5M 29.6M 29.5M 0.3 2.9 + mmgc/ofib-rc.as 44.2M 44.2M 44.2M 44.2M 0.0 0.0 mmgc/ofib.as 92.9M 88.8M 93.5M 89.4M 0.6 0.1 mmgc/sfib.as 2.0M 1.9M 2.0M 2.0M 0.0 0.0 scimark/FFT.as 2.1M 1.6M 1.5M 1.2M -28.6 -0.9 scimark/LU.as 2.0M 1.8M 2.2M 1.9M 10.0 0.7 scimark/MonteCarlo.as 492K 492K 492K 492K 0.0 0.0 scimark/SOR.as 2.8M 2.1M 2.7M 2.1M -3.6 -0.1 scimark/SparseCompRow.as 888K 834K 932K 833K 5.0 0.4 nspider/access-binary-trees.as 504K 504K 504K 504K 0.0 0.0 sunspider/access-fannkuch.as 492K 492K 492K 492K 0.0 0.0 sunspider/access-nbody.as 1.6M 1.4M 1.6M 1.3M 0.0 0.0 sunspider/access-nsieve.as 1.5M 1.5M 1.5M 1.5M 0.0 0.0 er/bitops-3bit-bits-in-byte.as 492K 492K 492K 492K 0.0 0.0 nspider/bitops-bits-in-byte.as 492K 492K 492K 492K 0.0 0.0 unspider/bitops-bitwise-and.as 492K 492K 492K 492K 0.0 0.0 unspider/bitops-nsieve-bits.as 492K 492K 492K 492K 0.0 0.0 pider/controlflow-recursive.as 532K 532K 532K 532K 0.0 0.0 sunspider/crypto-aes.as 504K 504K 504K 504K 0.0 0.0 sunspider/crypto-md5.as 492K 492K 492K 492K 0.0 0.0 sunspider/crypto-sha1.as 492K 492K 492K 492K 0.0 0.0 sunspider/date-format-tofte.as 1.3M 939K 1.0M 883K -23.1 -0.9 sunspider/math-cordic.as 1.1M 851K 1.4M 996K 27.3 0.6 sunspider/math-partial-sums.as 988K 925K 1.1M 935K 14.0 0.8 unspider/math-spectral-norm.as 1.4M 1.4M 1.6M 1.2M 14.3 0.5 sunspider/s3d-cube.as 1.2M 1.1M 1.2M 1.1M 0.0 0.0 sunspider/s3d-morph.as 920K 772K 928K 828K 0.9 0.0 sunspider/s3d-raytrace.as 1.9M 1.7M 1.6M 1.6M -15.8 -3.3 -- sunspider/string-fasta.as 504K 504K 504K 504K 0.0 0.0 unspider/string-unpack-code.as 1.5M 1.4M 1.4M 1.4M -6.7 -0.9 pider/string-validate-input.as 1.5M 1.3M 1.5M 1.3M 0.0 0.0 der/as3/access-binary-trees.as 504K 504K 504K 504K 0.0 0.0 nspider/as3/access-fannkuch.as 492K 492K 492K 492K 0.0 0.0 sunspider/as3/access-nbody.as 492K 492K 492K 492K 0.0 0.0 sunspider/as3/access-nsieve.as 1.5M 1.5M 1.5M 1.5M 0.0 0.0 s3/bitops-3bit-bits-in-byte.as 492K 492K 492K 492K 0.0 0.0 der/as3/bitops-bits-in-byte.as 492K 492K 492K 492K 0.0 0.0 ider/as3/bitops-bitwise-and.as 492K 492K 492K 492K 0.0 0.0 ider/as3/bitops-nsieve-bits.as 492K 492K 492K 492K 0.0 0.0 r/as3/controlflow-recursive.as 520K 520K 520K 520K 0.0 0.0 sunspider/as3/crypto-aes.as 504K 504K 504K 504K 0.0 0.0 sunspider/as3/crypto-md5.as 492K 492K 492K 492K 0.0 0.0 sunspider/as3/crypto-sha1.as 492K 492K 492K 492K 0.0 0.0 pider/as3/date-format-tofte.as 1.0M 869K 1008K 910K -1.6 -0.1 sunspider/as3/math-cordic.as 1.2M 1.0M 1.2M 1.1M 0.0 0.0 pider/as3/math-partial-sums.as 552K 525K 552K 511K 0.0 0.0 ider/as3/math-spectral-norm.as 492K 492K 492K 492K 0.0 0.0 sunspider/as3/s3d-cube.as 516K 516K 516K 516K 0.0 0.0 sunspider/as3/s3d-morph.as 1.1M 1.0M 1.1M 1023K 0.0 0.0 sunspider/as3/s3d-raytrace.as 1.4M 1.3M 1.4M 1.3M 0.0 0.0 sunspider/as3/string-fasta.as 1.2M 1.1M 1.2M 1.1M 0.0 0.0 ider/as3/string-unpack-code.as 1.6M 1.5M 1.6M 1.5M 0.0 0.0 r/as3/string-validate-input.as 988K 988K 988K 988K 0.0 0.0 r/as3vector/access-fannkuch.as 492K 492K 492K 492K 0.0 0.0 ider/as3vector/access-nbody.as 492K 492K 492K 492K 0.0 0.0 der/as3vector/access-nsieve.as 664K 664K 664K 664K 0.0 0.0 s3vector/bitops-nsieve-bits.as 492K 492K 492K 492K 0.0 0.0 pider/as3vector/math-cordic.as 788K 787K 792K 788K 0.5 1.1 + s3vector/math-spectral-norm.as 728K 705K 720K 708K -1.1 -0.4 unspider/as3vector/s3d-cube.as 512K 512K 512K 512K 0.0 0.0 nspider/as3vector/s3d-morph.as 856K 797K 884K 800K 3.3 0.2 ider/as3vector/string-fasta.as 748K 662K 864K 723K 15.5 0.7 ector/string-validate-input.as 988K 988K 988K 988K 0.0 0.0 v8/crypto.as 840K 683K 752K 665K -10.5 -0.5 v8/deltablue.as 2.0M 1.5M 2.1M 1.8M 5.0 0.2 v8/raytrace.as 2.2M 1.8M 1.5M 1.2M -31.8 -1.0 v8/richards.as 1.1M 1.1M 1.0M 910K -9.1 -1.1 - v8/typed/crypto.as 840K 693K 764K 612K -9.0 -0.4 v8/typed/deltablue.as 1.6M 1.3M 1.6M 1.4M 0.0 0.0 v8/typed/raytrace.as 1.7M 1.6M 1.6M 1.6M -5.9 -0.6 v8/typed/richards.as 900K 796K 880K 810K -2.2 -0.2 v8.5/js/crypto.as 504K 504K 504K 504K 0.0 0.0 v8.5/js/deltablue.as 2.0M 1.4M 1.9M 1.5M -5.0 -0.1 v8.5/js/raytrace.as 552K 510K 504K 504K -8.7 -2.6 -- v8.5/js/regexp.as 1.3M 1.2M 1.3M 1.2M 0.0 0.0 v8.5/js/richards.as 712K 568K 728K 601K 2.2 0.1 v8.5/js/splay.as 166.1M 166.1M 166.1M 166.1M 0.0 0.0 v8.5/optimized/crypto.as 668K 550K 668K 550K 0.0 0.0 v8.5/optimized/deltablue.as 2.6M 1.9M 2.1M 1.7M -19.2 -0.5 v8.5/optimized/raytrace.as 1.2M 1.0M 1.2M 1011K 0.0 0.0 v8.5/optimized/regexp.as 1.5M 1.4M 1.7M 1.3M 13.3 0.5 v8.5/optimized/richards.as 1.9M 1.5M 1.9M 1.2M 0.0 0.0 v8.5/optimized/splay.as 73.1M 73.1M 73.1M 73.1M 0.0 0.0 v8.5/typed/crypto.as 636K 538K 636K 540K 0.0 0.0 v8.5/typed/deltablue.as 2.3M 1.6M 1.6M 1.4M -30.4 -0.8 v8.5/typed/raytrace.as 1.2M 995K 1.2M 964K 0.0 0.0 v8.5/typed/regexp.as 1.5M 1.3M 1.4M 1.3M -6.7 -0.5 v8.5/typed/richards.as 1.8M 1.7M 1.8M 1.3M 0.0 0.0 v8.5/typed/splay.as 108.5M 108.5M 108.5M 108.5M 0.0 0.0 v8.5/untyped/crypto.as 504K 504K 504K 504K 0.0 0.0 v8.5/untyped/deltablue.as 2.4M 1.7M 2.1M 1.5M -12.5 -0.3 v8.5/untyped/raytrace.as 2.1M 1.6M 2.3M 1.7M 9.5 0.2 v8.5/untyped/regexp.as 1.6M 1.2M 1.8M 1.5M 12.5 0.4 v8.5/untyped/richards.as 568K 554K 552K 536K -2.8 -0.8 v8.5/untyped/splay.as 108.5M 108.5M 109.9M 109.3M 1.3 2.0 +
Time results for 64-bit build with 12/10/12 bit distribution. Here we're back to -'s and --'s being bad (as opposed to the memory stats reporting). The performance hits are more severe than I'm happy paying at the moment; even ignoring the asmicro/jsmicro results (since I do not know how to interpret the interaction between the pagemap code and those microbenchmarks), the crypto benchmark gets a 11-12% hit, gcbench gets a 9% hit, and string/replace gets a whopping 25% hit (both typed and untyped). Hopefully there's some opportunities for improving the patch that I have overlooked. (But like I said above, I have spent a fair amount of timing bumming it...) % python runtests.py -f --iterations 7 --avm /Users/pnkfelix/Dev/Bugz/bugz581070/tr-pmap-baseline/objdir-selftest64/shell/avmshell --avm2 /Users/pnkfelix/Dev/Bugz/bugz581070/tr-delay12-10-12/objdir-selftest64/shell/avmshell Tamarin tests started: 2010-07-30 01:17:54.472998 Executing 394 test(s) avm: /Users/pnkfelix/Dev/Bugz/bugz581070/tr-pmap-baseline/objdir-selftest64/shell/avmshell version: cyclone avm2: /Users/pnkfelix/Dev/Bugz/bugz581070/tr-delay12-10-12/objdir-selftest64/shell/avmshell version: cyclone iterations: 7 Note that %diff is calculated using the fastest value (not avg) of all runs avm:0 avm2:0 test best avg best avg %diff sig Metric: v8 (largerValuesFaster) asmicro/alloc-1.as 49 49.1 47 48.5 -1.7 -1.0 asmicro/alloc-10.as 13 12.8 12 12.7 0.2 0.0 asmicro/alloc-11.as 15 15.5 15 15.7 0.5 0.0 asmicro/alloc-12.as 11 11.9 11 11.9 0.1 0.0 asmicro/alloc-13.as 117 117.3 115 115.6 -1.5 -1.7 - asmicro/alloc-14.as 91 91.3 89 89.5 -2.3 -4.6 - asmicro/alloc-2.as 27 27.4 26 27.1 -1.6 -1.2 - asmicro/alloc-3.as 13 12.9 12 12.9 -1.8 -0.5 asmicro/alloc-4.as 63 63.6 62 64.1 0.9 0.5 asmicro/alloc-5.as 44 44.4 45 46.0 3.3 1.8 + asmicro/alloc-6.as 92 92.1 89 89.8 -2.2 -2.1 - asmicro/alloc-7.as 49 49.7 49 49.4 -0.5 -0.0 asmicro/alloc-8.as 14 14.1 13 13.8 -3.9 -1.1 - asmicro/alloc-9.as 14 13.9 13 13.7 -2.0 -0.6 asmicro/array-1.as 2904 2895.4 2885 2894.1 -0.2 -0.4 asmicro/array-2.as 907 905.1 900 906.0 0.2 0.4 asmicro/array-pop-1.as 475 469.8 466 470.3 0.0 0.0 asmicro/array-push-1.as 324 322.4 333 334.0 3.3 3.4 + asmicro/array-shift-1.as 193 186.5 186 192.0 1.4 0.4 asmicro/array-slice-1.as 26 25.8 25 25.8 -0.2 -0.2 asmicro/array-sort-1.as 38 38.0 38 38.7 1.6 1.2 + asmicro/array-sort-2.as 3 3.0 2 3.0 -0.1 -0.0 asmicro/array-sort-3.as 24 24.7 24 25.0 0.5 0.2 asmicro/array-sort-4.as 12 12.1 12 12.4 1.7 2.0 + asmicro/array-unshift-1.as 165 164.0 165 166.9 1.2 1.0 + asmicro/closedvar-read-1.as 4706 4696.2 4542 4672.5 0.1 0.1 asmicro/closedvar-write-1.as 2749 2739.4 2705 2737.4 -0.1 -0.2 asmicro/closedvar-write-2.as 2746 2741.1 2735 2743.0 0.1 0.4 asmicro/do-1.as 5480 5475.1 5421 5469.4 0.2 0.3 asmicro/for-1.as 4707 4697.7 4677 4692.2 -0.1 -0.4 asmicro/for-2.as 2996 2982.6 2935 2985.6 0.1 0.1 asmicro/for-3.as 2995 2982.4 2984 2991.9 0.1 0.2 asmicro/for-in-1.as 603 602.4 601 604.4 0.4 1.2 + asmicro/for-in-2.as 344 343.6 345 347.0 0.8 1.4 + asmicro/funcall-1.as 513 480.1 474 475.5 -7.2 -2.4 -- asmicro/funcall-2.as 301 298.0 291 292.2 -2.7 -1.1 - asmicro/funcall-3.as 451 415.7 420 445.2 0.9 0.1 asmicro/funcall-4.as 160 160.4 166 167.6 4.6 10.7 + asmicro/globalvar-read-1.as 4737 4730.6 4704 4725.8 -0.1 -0.2 asmicro/globalvar-write-1.as 2745 2733.8 2736 2746.5 0.1 0.3 asmicro/isNaN-1.as 779 774.9 748 758.4 -2.3 -1.8 - smicro/lookup-array-fetch-1.as 973 970.6 959 962.8 -0.8 -1.8 - asmicro/lookup-array-in-1.as 2062 2056.2 2033 2042.0 -0.6 -1.2 - cro/lookup-negindex-array-1.as 532 525.8 517 523.9 -0.7 -0.4 cro/lookup-negindex-array-2.as 430 429.0 426 432.5 1.0 1.1 + ro/lookup-negindex-object-1.as 540 535.9 520 535.1 0.5 0.2 ro/lookup-negindex-object-2.as 474 472.3 469 471.2 -0.1 -0.2 micro/lookup-object-fetch-1.as 1092 1087.1 1085 1090.2 0.1 0.2 asmicro/lookup-object-in-1.as 1773 1768.4 1751 1756.5 -0.7 -1.6 - asmicro/number-toString-1.as 10 10.1 9 10.2 1.0 0.1 asmicro/number-toString-2.as 91 91.4 91 91.7 0.0 0.0 asmicro/oop-1.as 5 5.2 5 5.1 -0.9 -0.0 asmicro/parseFloat-1.as 106 105.7 104 105.5 -0.1 -0.2 asmicro/parseInt-1.as 244 243.1 242 244.2 0.2 0.2 asmicro/regex-exec-1.as 80 79.8 76 79.6 0.6 0.2 asmicro/regex-exec-2.as 103 102.6 97 99.4 -2.8 -1.5 - asmicro/regex-exec-3.as 155 154.9 154 156.0 0.9 1.2 + asmicro/regex-exec-4.as 381 380.5 368 371.7 -1.7 -1.8 - asmicro/restarg-1.as 1177 1174.7 1167 1176.4 0.1 0.2 asmicro/restarg-2.as 655 652.2 612 646.7 0.1 0.0 asmicro/restarg-3.as 51 50.9 50 50.6 -1.8 -2.1 - asmicro/restarg-4.as 42 42.6 42 42.4 -0.4 -0.0 asmicro/string-casechange-1.as 33 33.1 34 35.1 6.1 2.5 ++ asmicro/string-casechange-2.as 35 35.2 34 35.1 -0.4 -0.2 asmicro/string-charAt-1.as 863 853.0 856 859.9 -0.1 -0.1 asmicro/string-charAt-2.as 92 92.4 90 90.8 -1.7 -3.3 - asmicro/string-charCodeAt-1.as 861 858.0 816 818.8 -4.6 -8.8 - asmicro/string-charCodeAt-2.as 861 854.4 831 834.0 -3.0 -3.1 - micro/string-fromCharCode-1.as 413 411.3 411 419.6 2.4 1.5 + micro/string-fromCharCode-2.as 77 77.9 76 77.4 0.0 0.0 asmicro/string-indexOf-1.as 275 274.8 267 267.9 -2.6 -7.2 - asmicro/string-indexOf-2.as 192 191.7 143 143.8 -25.0 -43.7 -- asmicro/string-indexOf-3.as 145 145.3 146 146.6 0.7 1.4 + smicro/string-lastIndexOf-1.as 826 823.2 775 815.7 -0.1 -0.1 smicro/string-lastIndexOf-2.as 145 144.9 196 198.3 37.0 44.0 ++ smicro/string-lastIndexOf-3.as 611 609.8 608 610.4 0.2 0.3 asmicro/string-slice-1.as 151 151.1 149 150.3 -0.7 -1.1 - asmicro/string-split-1.as 10 10.8 10 10.8 1.0 0.0 asmicro/string-split-2.as 10 10.5 10 10.6 0.2 0.0 asmicro/string-substring-1.as 161 160.8 155 158.3 -1.0 -0.8 asmicro/switch-1.as 826 824.9 818 822.7 -0.1 -0.2 asmicro/switch-2.as 54 54.2 48 49.1 -9.1 -12.8 -- asmicro/switch-3.as 63 63.6 55 56.0 -12.1 -15.0 -- asmicro/try-1.as 314 311.9 305 314.9 7.2 1.8 + asmicro/try-2.as 14 14.7 14 14.8 0.7 0.0 asmicro/try-3.as 70 69.9 69 70.1 -0.2 -0.1 asmicro/vector-push-1.as 66 65.8 64 64.8 -1.5 -1.2 - asmicro/while-1.as 4699 4688.2 4684 4698.3 0.2 0.4 Metric: time jsbench/Crypt.as 2898 2908.4 2890 2895.1 0.3 0.4 jsbench/Euler.as 5607 5650.3 5645 5660.9 -0.7 -1.2 - jsbench/FFT.as 6356 6386.1 6405 6804.0 -0.8 -0.1 jsbench/HeapSort.as 2622 2663.4 2560 2565.0 2.4 1.2 + jsbench/LUFact.as 6568 6597.1 6598 6605.4 -0.5 -1.0 - jsbench/Moldyn.as 7416 7441.7 7206 7241.6 2.8 5.1 + jsbench/RayTracer.as 5546 5575.4 5521 5532.7 0.5 0.8 jsbench/Series.as 6627 6639.0 6662 6677.4 -0.5 -1.0 - jsbench/SOR.as 27053 27091 26839 26917 0.8 2.9 + jsbench/SparseMatmult.as 12597 12654 12540 12592 0.5 0.6 jsbench/typed/Crypt.as 737 740.1 738 740.4 -0.1 -0.2 jsbench/typed/Euler.as 6974 7005.3 6959 7010.4 0.2 0.3 jsbench/typed/FFT.as 3717 3722.4 3721 3723.6 -0.1 -0.6 jsbench/typed/HeapSort.as 1219 1224.3 1228 1244.7 -0.7 -0.3 jsbench/typed/LUFact.as 6869 6910.0 6910 6955.4 -0.6 -0.5 jsbench/typed/Moldyn.as 3124 3164.1 3085 3149.1 1.2 0.3 jsbench/typed/RayTracer.as 847 849.6 850 851.7 -0.4 -0.8 jsbench/typed/Series.as 6009 6032.9 6027 6039.3 -0.3 -0.6 jsbench/typed/SOR.as 18414 18457 18337 18405 0.4 1.0 + jsbench/typed/SparseMatmult.as 2113 2122.0 2114 2117.7 -0.0 -0.1 Metric: v8 (largerValuesFaster) jsmicro/alloc-1.as 47 47.0 46 46.9 -0.3 -0.1 jsmicro/alloc-10.as 12 12.6 11 12.3 -1.5 -0.4 jsmicro/alloc-11.as 14 14.4 14 14.7 2.1 2.0 + jsmicro/alloc-12.as 11 11.3 11 11.3 0.0 0.0 jsmicro/alloc-13.as 98 98.4 96 97.1 -1.2 -2.4 - jsmicro/alloc-14.as 79 79.6 77 78.0 -1.7 -2.7 - jsmicro/alloc-2.as 26 26.7 25 26.4 -0.3 -0.2 jsmicro/alloc-3.as 12 12.6 12 12.7 1.7 0.6 jsmicro/alloc-4.as 62 61.9 61 62.1 0.4 0.3 jsmicro/alloc-5.as 43 43.4 44 44.7 2.9 2.0 + jsmicro/alloc-6.as 77 77.1 75 75.7 -2.4 -0.9 jsmicro/alloc-7.as 49 49.3 49 49.4 -0.3 -0.4 jsmicro/alloc-8.as 13 13.7 13 13.5 -2.6 -2.0 - jsmicro/alloc-9.as 14 13.8 13 13.7 -0.2 -0.1 jsmicro/array-1.as 534 533.7 529 532.6 -0.1 -0.2 jsmicro/array-2.as 389 387.5 378 386.9 0.2 0.1 jsmicro/array-pop-1.as 98 97.2 96 97.4 -0.3 -0.2 jsmicro/array-push-1.as 66 65.8 64 65.9 0.3 0.2 jsmicro/array-shift-1.as 80 80.1 78 81.0 1.6 0.9 jsmicro/array-slice-1.as 21 21.2 21 21.9 2.5 1.5 + jsmicro/array-sort-1.as 36 35.9 36 36.9 2.8 1.5 + jsmicro/array-sort-2.as 3 3.0 2 3.0 -0.2 -0.0 jsmicro/array-sort-3.as 24 24.6 24 24.9 0.4 0.1 jsmicro/array-sort-4.as 14 14.2 14 14.3 0.8 0.0 jsmicro/array-unshift-1.as 32 32.1 31 31.7 -1.2 -1.1 - jsmicro/closedvar-read-1.as 845 843.8 747 750.0 -11.1 -27.0 -- jsmicro/closedvar-write-1.as 612 608.6 500 510.7 -15.7 -7.3 -- jsmicro/closedvar-write-2.as 612 608.8 519 522.5 -14.4 -12.0 -- jsmicro/do-1.as 868 866.1 745 749.4 -13.5 -26.4 -- jsmicro/for-1.as 848 845.0 746 747.6 -11.5 -25.4 -- jsmicro/for-2.as 233 232.5 230 231.1 -0.7 -0.8 jsmicro/for-3.as 110 108.9 110 110.9 0.7 0.3 jsmicro/for-in-1.as 425 423.8 424 425.2 0.2 0.6 jsmicro/for-in-2.as 283 283.1 281 283.3 0.2 0.3 jsmicro/funcall-1.as 340 335.9 321 323.8 -4.4 -4.4 - jsmicro/funcall-2.as 323 320.0 314 315.4 -2.3 -0.8 jsmicro/funcall-3.as 308 306.5 293 294.4 -4.2 -3.4 - jsmicro/funcall-4.as 158 157.7 166 167.8 6.4 9.2 ++ jsmicro/globalvar-read-1.as 847 845.3 842 844.6 0.0 0.0 jsmicro/globalvar-write-1.as 610 608.8 608 611.0 0.3 0.5 jsmicro/isNaN-1.as 392 389.7 370 380.8 -2.1 -1.0 smicro/lookup-array-fetch-1.as 806 802.8 770 791.7 -1.1 -0.8 jsmicro/lookup-array-in-1.as 1098 1089.5 1095 1111.2 1.5 0.8 micro/lookup-object-fetch-1.as 875 872.7 864 867.2 -0.5 -1.0 jsmicro/lookup-object-in-1.as 1040 1037.7 1025 1034.8 -0.1 -0.2 jsmicro/number-toString-1.as 9 9.7 10 10.3 6.1 3.0 ++ jsmicro/number-toString-2.as 75 74.9 73 74.7 0.1 0.1 jsmicro/oop-1.as 5 5.3 5 5.1 -3.1 -2.0 - jsmicro/parseFloat-1.as 59 59.3 59 60.0 0.8 0.5 jsmicro/parseInt-1.as 162 162.0 159 160.9 -0.4 -0.6 jsmicro/regex-exec-1.as 68 67.7 65 66.7 -2.6 -1.2 - jsmicro/regex-exec-2.as 92 92.0 86 87.9 -3.8 -2.4 - jsmicro/regex-exec-3.as 136 136.3 135 136.1 0.2 0.3 jsmicro/regex-exec-4.as 309 308.4 301 302.5 -1.8 -3.5 - jsmicro/string-casechange-1.as 22 22.8 23 23.5 2.9 1.9 + jsmicro/string-casechange-2.as 23 23.2 22 23.3 0.4 0.3 jsmicro/string-charAt-1.as 129 128.6 133 133.8 3.7 4.0 + jsmicro/string-charAt-2.as 57 57.8 57 57.6 -0.2 -0.0 jsmicro/string-charCodeAt-1.as 125 124.7 125 126.5 1.4 1.0 + jsmicro/string-charCodeAt-2.as 125 124.5 120 124.3 0.2 0.1 micro/string-fromCharCode-1.as 116 116.0 113 115.4 -0.7 -0.4 micro/string-fromCharCode-2.as 51 51.8 51 51.9 0.3 0.4 micro/string-fromCharCode-3.as 90 90.0 87 88.7 -1.0 -0.7 micro/string-fromCharCode-4.as 93 93.1 92 92.8 -0.3 -0.3 jsmicro/string-indexOf-1.as 114 113.3 112 113.5 -0.9 -0.3 jsmicro/string-indexOf-2.as 78 78.0 68 68.9 -12.0 -7.3 -- jsmicro/string-indexOf-3.as 69 69.2 69 69.8 0.7 1.4 + smicro/string-lastIndexOf-1.as 111 111.0 110 111.3 0.2 0.3 smicro/string-lastIndexOf-2.as 68 68.2 75 77.6 14.0 7.6 ++ smicro/string-lastIndexOf-3.as 109 109.0 103 108.4 0.5 0.2 jsmicro/string-slice-1.as 73 73.4 72 73.2 -0.3 -0.6 jsmicro/string-split-1.as 10 10.0 10 10.1 0.7 0.2 jsmicro/string-split-2.as 9 9.9 9 9.9 0.4 0.0 jsmicro/string-substring-1.as 73 73.1 71 72.8 0.1 0.1 jsmicro/switch-1.as 102 102.7 129 131.9 28.8 36.2 ++ jsmicro/switch-2.as 45 45.8 50 50.3 10.0 3.0 ++ jsmicro/switch-3.as 51 51.6 57 58.2 12.9 21.5 ++ jsmicro/try-1.as 246 242.1 233 236.5 -1.8 -0.7 jsmicro/try-2.as 14 14.3 14 14.3 -2.9 -1.2 - jsmicro/try-3.as 58 57.6 57 57.5 -0.5 -0.4 jsmicro/while-1.as 846 844.3 747 749.4 -11.2 -22.1 -- Metric: time e/describetype/desctypeperf.as 459 462.4 466 470.6 -1.5 -1.6 - anguage/e4x/addingToXMLList.as 14 16.1 15 16.0 -7.1 -0.4 ge/e4x/appendChildAndString.as 38 40.6 39 41.6 -2.6 -0.3 concatenatingStringsFromE4X.as 5 5.6 5 6.1 0.0 0.0 x/simpleStringConcatenation.as 1 1.7 1 2.0 0.0 0.0 /e4x/usingAppendChildAndE4X.as 39 43.0 40 43.3 -2.6 -0.2 nguage/string/append_concat.as 58 62.0 59 59.0 -1.7 -0.5 ge/string/append_equal_plus.as 50 52.0 50 51.4 0.0 0.0 ge/string/append_plus_equal.as 49 50.7 50 52.3 -2.0 -0.2 language/string/charAt.as 115 116.9 112 116.3 2.6 0.4 language/string/charCodeAt.as 126 128.1 130 132.3 -3.2 -0.8 language/string/indexOf.as 232 235.6 232 235.3 0.0 0.0 language/string/lastIndexOf.as 173 177.0 167 169.9 3.5 1.1 + language/string/replace.as 275 278.6 342 347.4 -24.4 -6.7 -- language/string/replace2.as 560 562.7 587 589.0 -4.8 -6.2 - language/string/search.as 29 32.0 29 30.3 0.0 0.0 language/string/slice.as 177 180.3 175 178.3 1.1 0.2 language/string/split.as 380 384.0 381 385.6 -0.3 -0.1 ring/static_ascii_array_100.as 691 695.7 691 694.3 0.0 0.0 tring/static_ascii_array_50.as 673 677.4 671 676.4 0.3 0.3 ing/static_latin1_array_100.as 1353 1359.4 1354 1357.0 -0.1 -0.1 ring/static_latin1_array_50.as 674 681.3 672 678.7 0.3 0.1 language/string/substr.as 131 136.3 131 135.4 0.0 0.0 language/string/substring.as 129 131.0 127 129.0 1.6 0.5 /string/typed/append_concat.as 55 55.3 55 58.0 0.0 0.0 ing/typed/append_equal_plus.as 44 45.7 45 46.1 -2.3 -0.4 ing/typed/append_plus_equal.as 45 46.9 45 47.0 0.0 0.0 anguage/string/typed/charAt.as 34 35.6 33 35.4 2.9 0.2 age/string/typed/charCodeAt.as 30 31.4 31 33.0 -3.3 -0.3 nguage/string/typed/indexOf.as 232 237.0 232 234.7 0.0 0.0 ge/string/typed/lastIndexOf.as 173 174.6 166 167.7 4.0 1.6 + nguage/string/typed/replace.as 273 278.0 341 344.0 -24.9 -11.1 -- guage/string/typed/replace2.as 568 571.3 594 597.1 -4.6 -4.7 - anguage/string/typed/search.as 29 31.9 29 30.9 0.0 0.0 language/string/typed/slice.as 132 132.9 133 135.0 -0.8 -0.4 language/string/typed/split.as 382 384.3 380 383.4 0.5 0.4 anguage/string/typed/substr.as 97 98.0 99 99.7 -2.1 -0.7 uage/string/typed/substring.as 91 92.3 93 95.3 -2.2 -0.6 misc/boids.as 1256 1267.0 1274 1283.7 -1.4 -1.0 misc/boidshack.as 361 364.0 357 366.9 1.1 0.3 misc/gameoflife.as 1950 1953.6 1945 1951.3 0.3 0.5 misc/primes.as 4116 4121.1 4116 4128.9 0.0 0.0 mmgc/gcbench.as 2214 2404.6 2413 2419.7 -9.0 -2.6 -- mmgc/ofib-rc.as 300 309.9 306 313.9 -2.0 -0.5 mmgc/ofib.as 1029 1098.0 1056 1092.6 -2.6 -0.4 mmgc/sfib.as 268 270.9 274 275.7 -2.2 -1.4 - scimark/FFT.as 2070 2073.3 2052 2062.4 0.9 1.9 + scimark/LU.as 2196 2199.6 2205 2222.7 -0.4 -0.3 scimark/MonteCarlo.as 1305 1309.9 1304 1306.6 0.1 0.2 scimark/SOR.as 2110 2112.7 2114 2121.4 -0.2 -0.5 scimark/SparseCompRow.as 73 74.7 72 75.0 1.4 0.2 nspider/access-binary-trees.as 25 26.9 25 27.9 0.0 0.0 sunspider/access-fannkuch.as 54 55.0 54 55.6 0.0 0.0 sunspider/access-nbody.as 61 62.6 62 63.4 -1.6 -0.3 sunspider/access-nsieve.as 35 37.0 35 37.4 0.0 0.0 er/bitops-3bit-bits-in-byte.as 7 9.1 7 9.1 0.0 0.0 nspider/bitops-bits-in-byte.as 22 23.9 23 23.7 -4.5 -0.4 unspider/bitops-bitwise-and.as 116 118.9 119 124.0 -2.6 -0.3 unspider/bitops-nsieve-bits.as 23 24.7 22 24.6 4.3 0.2 pider/controlflow-recursive.as 11 12.1 10 12.3 9.1 0.3 sunspider/crypto-aes.as 28 30.3 28 30.3 0.0 0.0 sunspider/crypto-md5.as 11 11.7 11 13.1 0.0 0.0 sunspider/crypto-sha1.as 9 11.9 10 11.4 -11.1 -0.3 sunspider/date-format-tofte.as 308 327.3 309 330.6 -0.3 -0.0 sunspider/math-cordic.as 43 44.9 43 45.1 0.0 0.0 sunspider/math-partial-sums.as 108 110.0 106 108.4 1.9 0.5 unspider/math-spectral-norm.as 23 25.4 24 24.0 -4.3 -0.6 sunspider/s3d-cube.as 55 57.1 55 56.7 0.0 0.0 sunspider/s3d-morph.as 28 29.3 28 30.7 0.0 0.0 sunspider/s3d-raytrace.as 56 58.1 55 58.1 1.8 0.2 sunspider/string-fasta.as 52 53.0 52 52.7 0.0 0.0 unspider/string-unpack-code.as 115 116.9 111 113.6 3.5 0.9 pider/string-validate-input.as 31 33.3 31 32.9 0.0 0.0 der/as3/access-binary-trees.as 7 9.0 7 9.6 0.0 0.0 nspider/as3/access-fannkuch.as 37 37.7 36 37.3 2.7 0.3 sunspider/as3/access-nbody.as 4 5.3 4 5.0 0.0 0.0 sunspider/as3/access-nsieve.as 26 27.9 26 27.0 0.0 0.0 s3/bitops-3bit-bits-in-byte.as 4 4.6 4 4.6 0.0 0.0 der/as3/bitops-bits-in-byte.as 7 9.0 8 9.9 -14.3 -0.3 ider/as3/bitops-bitwise-and.as 1 2.0 1 2.4 0.0 0.0 ider/as3/bitops-nsieve-bits.as 11 12.6 11 12.3 0.0 0.0 r/as3/controlflow-recursive.as 3 4.1 3 3.4 0.0 0.0 sunspider/as3/crypto-aes.as 22 24.0 23 24.9 -4.5 -0.3 sunspider/as3/crypto-md5.as 10 11.7 10 11.6 0.0 0.0 sunspider/as3/crypto-sha1.as 8 9.7 8 10.6 0.0 0.0 pider/as3/date-format-tofte.as 291 320.9 290 316.1 0.3 0.0 sunspider/as3/math-cordic.as 18 18.9 18 19.3 0.0 0.0 pider/as3/math-partial-sums.as 33 35.0 33 34.9 0.0 0.0 ider/as3/math-spectral-norm.as 3 3.7 3 4.1 0.0 0.0 sunspider/as3/s3d-cube.as 14 15.4 15 17.0 -7.1 -0.3 sunspider/as3/s3d-morph.as 20 20.9 21 21.1 -5.0 -1.1 - sunspider/as3/s3d-raytrace.as 29 30.6 29 29.9 0.0 0.0 sunspider/as3/string-fasta.as 28 29.9 28 30.1 0.0 0.0 ider/as3/string-unpack-code.as 114 116.0 110 110.6 3.5 2.6 + r/as3/string-validate-input.as 25 26.4 26 27.0 -4.0 -0.3 r/as3vector/access-fannkuch.as 25 28.4 25 25.6 0.0 0.0 ider/as3vector/access-nbody.as 4 5.1 4 5.6 0.0 0.0 der/as3vector/access-nsieve.as 9 10.9 9 11.4 0.0 0.0 s3vector/bitops-nsieve-bits.as 5 6.7 5 6.1 0.0 0.0 pider/as3vector/math-cordic.as 11 13.9 12 13.3 -9.1 -0.3 s3vector/math-spectral-norm.as 11 13.0 10 12.3 9.1 0.3 unspider/as3vector/s3d-cube.as 14 14.7 14 15.7 0.0 0.0 nspider/as3vector/s3d-morph.as 19 20.7 19 19.6 0.0 0.0 ider/as3vector/string-fasta.as 31 32.3 31 31.7 0.0 0.0 ector/string-validate-input.as 27 28.0 27 28.9 0.0 0.0 Metric: v8 (largerValuesFaster) v8/crypto.as 897 895.6 765 783.7 -12.0 -8.4 -- v8/deltablue.as 2444 2431.3 2396 2413.0 -0.8 -1.1 - v8/raytrace.as 3913 3895.6 3824 3849.9 0.3 0.2 v8/richards.as 1615 1605.4 1523 1534.1 -4.8 -6.2 - v8/typed/crypto.as 916 911.6 903 911.4 -0.2 -0.2 v8/typed/deltablue.as 3729 3689.7 3658 3683.6 -0.6 -0.6 v8/typed/raytrace.as 8581 8538.0 8445 8528.3 -0.1 -0.1 v8/typed/richards.as 2766 2746.1 2794 2803.0 1.7 0.9 v8.5/js/crypto.as 788 785.1 693 695.7 -11.4 -18.1 -- v8.5/js/deltablue.as 433 432.6 435 438.9 1.6 3.0 + v8.5/js/raytrace.as 946 943.0 929 942.4 0.0 0.0 v8.5/js/regexp.as 130 129.4 120 123.7 -3.1 -1.6 - v8.5/js/richards.as 387 386.7 381 384.3 -0.3 -0.5 v8.5/js/splay.as 1047 992.6 971 990.7 0.3 0.1 v8.5/optimized/crypto.as 5277 5268.6 5218 5257.0 -0.1 -0.2 v8.5/optimized/deltablue.as 4202 4165.9 4040 4143.6 -0.6 -0.3 v8.5/optimized/raytrace.as 10466 10369 10146 10313 -0.7 -0.4 v8.5/optimized/regexp.as 131 129.7 123 124.4 -3.8 -2.7 - v8.5/optimized/richards.as 5145 5126.0 5100 5128.0 0.2 0.2 v8.5/optimized/splay.as 7410 7071.6 6843 7201.9 -1.4 -0.2 v8.5/typed/crypto.as 3102 3080.7 3052 3083.6 0.0 0.0 v8.5/typed/deltablue.as 4495 4431.3 4309 4352.4 -2.2 -1.6 - v8.5/typed/raytrace.as 10466 10395 10271 10415 0.1 0.1 v8.5/typed/regexp.as 131 129.7 120 124.1 -3.8 -1.8 - v8.5/typed/richards.as 5130 5090.1 5145 5157.3 0.7 0.7 v8.5/typed/splay.as 1638 1575.6 1635 1648.1 1.5 0.2 v8.5/untyped/crypto.as 866 864.7 857 874.4 1.5 1.5 + v8.5/untyped/deltablue.as 2365 2345.3 2489 2507.3 6.6 7.6 ++ v8.5/untyped/raytrace.as 4151 4116.9 4139 4167.4 0.9 0.7 v8.5/untyped/regexp.as 129 128.9 122 123.3 -3.9 -3.9 - v8.5/untyped/richards.as 655 646.7 634 641.1 -1.1 -0.4 v8.5/untyped/splay.as 1589 1448.7 1341 1447.1 1.9 0.1
nit: is there a reason you're using non-C99 types in various of the new code? (eg "unsigned char", "int") generally, C99 types are preferred for all new code unless there's a compelling reason to avoid them.
(In reply to comment #8) > nit: is there a reason you're using non-C99 types in various of the new code? > (eg "unsigned char", "int") No (good) reason. Will fix. Thanks for the reminder!
Comment on attachment 461535 [details] [diff] [review] added sparse PageMap implementations. There's an obvious bug (introduced late in my dev cycle); SetupDelayedPagemap is invoked either zero or two times, but there are assumptions in the code that it will be invoked at most one time. Retracting feedback request until I fix that and post a new patch (but if you have commentary on what's there, feel free to post, since I do not anticipate a major revision to the overall approach).
Attachment #461535 - Flags: feedback?(treilly)
Attached patch unified patch for dschaffe (obsolete) — Splinter Review
This is a handoff I'm doing to dschaffe to help with performance testing; its a slight revision of the composition of the patches already attached to the ticket (one that mostly passes the sandbox builds, except for a couple of errors I have not yet been able to reproduce).
Attached patch unified patch for dschaffe (obsolete) — Splinter Review
Re-attempt to hand off patch to dschaffe. (played a bit too fast and loose with "hg diff" on my first attempt.) Again, this is largely the composition of the other two patches. I also tweaked the nbits parameters for PageMap.h to be (11,9,14) because I am more interested in knowing how that performs than the old (12,10,12) setting.
Attachment #463258 - Attachment is obsolete: true
This is similar to the previous iteration, except the scope of the bug increased slightly to also include getting rid of the uses of "int" and "unsigned char" and replacing them with "PageType" and "uint8_t" Will be uploading my final draft of the sparse implementations next.
Attachment #461531 - Attachment is obsolete: true
Attachment #465318 - Flags: superreview?(lhansen)
Attachment #465318 - Flags: review?(treilly)
Final draft of sparse page map implementation. I have performance results for 64-bit on the "Real World" benchmarks; I'll upload that as an attachment shortly. But the short version of the story is that I investigated the cache hit rate and determined that the two leaf sizes I was investigating (2^12 and 2^14) were too small or overly large, and so I have now adopted a distribution, (3,9,9,13), of the bits in the address that is quite good for the "Real World" benchmarks. The above distribution is encoded in the values of the tier{0,1,2,3}_nbits constants. As I said above, the tiered page map implementation is developed incrementally via implementation-inheritance; the design is structured so that one can just change the declaration in one place (in the pageMap member of GC.h) in order to switch between each of the three implementations.
Attachment #461535 - Attachment is obsolete: true
Attachment #465321 - Flags: superreview?(lhansen)
Attachment #465321 - Flags: review?(treilly)
Excel spreadsheet with data from various runs I did following the directions on running the "Real World" benchmarks as described at https://zerowing.corp.adobe.com/display/FlashPlayer/Real-World+Performance+Tests+Instructions#Real-WorldPerformanceTestsInstructions-MemoryUsage%28privatebytesinstandaloneplayer%29 I've highlighted (in green) the numbers corresponding to the values I selected for the patch.
Comment on attachment 465318 [details] [diff] [review] refactor existing pagemap for later revision. Generally speaking I'm quite fond of the refactoring. The following comments pertain to issues I've found, most of them apparently minor or cosmetic (esp comments). PageMap.h: Is it true that MemEnd returns a value that's the exclusive upper bound of the domain of the map? Elsewhere we see that it returns memEnd, and the initial value of that is 0xF...F, which looks more like an inclusive bound. "All prior returned indexes are implicitly invalidated." Would be useful to say who returned those indexes, certainly none of the public methods did? About EnsureCapacity, can/should/must we say something about granularity? Must 'item' be a pointer to the start of a page? What happens if it's not? Is there a reason to allow the case where it isn't? About AddrSet it's said that it "binds" val to key, but that seems to be an abuse of terminology (JMHO). About Tiered2 we read that it should be compatible with "PageMap1" but I don't see that anywhere. Do the computations of tier1_pages and tier2_pages assume something about the operands? Otherwise these computations will round down. " /*semantic, not syntactic*/ " Say what? "DelayT4 is like CacheT3 ..." Probably CacheT4. PageMap-inlines.h: These comments seem spurious: "can't use heapAlloc here", "can't use heapFree here", since those are methods on GC and a GC appears not to be available. PageMap.cpp: MAX_UINTPTR could be defined as eg ~uintptr_t(0) on any platform, presumably. "XXX" looks like a disguised "FIXME"? Quite a few of these. "sigh" - what's that about? "can't use heapFree here" - see above. GC.cpp: Minor question mark: efficiency of new version of GC::MarkGCPages.
Comment on attachment 465321 [details] [diff] [review] added sparse PageMap implementations. Evidently I had applied this patch as well, apart from the change in GC.h, so the comments on the previous patch apply partly to this one.
To-do list from walkthrough: "Uniform" code is more or less obsolete, we want to be sure to have it #ifdef'd. We probably want to leave it in for one major release in order to benchmark new code against it, in a pinch. Action items: - #ifdef it - file bug to remove it - file bug that tracks buggy aspects of it (boundary case Tommy alluded to) We want to #ifdef the new 32-bit code too so that it's not on when the 64-bit code is enabled. Action items: - #ifdef it All XXX's must be addressed. Action items: - XXX must be fixed or turned into FIXME + bug report We need a story for a full 64-bit address space (beyond 48 bits). It need not be an implemented story, necessarily. We need to ponder where we may encounter a full 64-bit address space. Action items: - Document / compute / prototype a 64-bit story - Figure out what other 64-bit architectures there are that we might encounter (PPC64? POWER? SPARC?) API cleanup. Action items: - Maybe remove AllocPageMapVia / DestroyPageMapVia, they're only used for the "Uniform" case Benchmarking. Action items: - Habbo hotel or something major on 32-bit and 64-bit: speed and memory - Android
The Uniform::EnsureCapacity XXX can be replaced by a ref to this bug: https://bugzilla.mozilla.org/show_bug.cgi?id=588079
Comment on attachment 465318 [details] [diff] [review] refactor existing pagemap for later revision. I would have preferred to see EnsureCapacity and SetVal rolled into a SetRegionVal or something but not a big deal. Also the initial page map allocate can/should go away.
Attachment #465318 - Flags: review?(treilly) → review+
Comment on attachment 465321 [details] [diff] [review] added sparse PageMap implementations. My comments are included in Lar's roll-up, otherwise looks good, don't think I need to re-review (but will if asked).
Attachment #465321 - Flags: review?(treilly) → review+
Some numbers that were computed (and are here revised): Each 4K leaf page covers a 64MB address range: 2^15 bits/page / 2 bits/entry = 2^14 entries/page 2^14 entries/page * 2^12 bytes/entry = 2^26 bytes/page = 64MB Suppose we use a two-tiered structure for a 64-bit address range. Then the upper level containing one word per lower-level page requires a multi-gigabyte table: 2^64 bytes / 2^26 bytes/pointer = 2^38 pointers 2^38 pointers * 2^3 bytes/pointer = 2^41 bytes Ergo a two-tiered structure is not appropriate for a 64-bit address range. For a 48-bit address range we have 2^48 bytes / 2^26 bytes/pointer = 2^22 pointers 2^22 pointers * 2^3 bytes/pointer = 2^25 bytes = 32MB So for a 48-bit address range we probably also do not want to use a two-tier structure, although it's in principle possible to do so.
(In reply to comment #16) Most comments will be addressed directly by updating the code; I'm listing exceptions here. > Comment on attachment 465318 [details] [diff] [review] > refactor existing pagemap for later revision. > > ... > > PageMap.h: > > Is it true that MemEnd returns a value that's the exclusive upper bound of the > domain of the map? Elsewhere we see that it returns memEnd, and the initial > value of that is 0xF...F, which looks more like an inclusive bound. Maybe I'm misunderstanding. Initial value of memEnd is 0, and initial value of memStart is MAX_UINTPTR (both in original code and in refactored version). > PageMap-inlines.h: > > These comments seem spurious: "can't use heapAlloc here", "can't use heapFree > here", since those are methods on GC and a GC appears not to be available. This is artifact of my refactoring; again I was preserving existing control structure and thought it best to also preserve the existing comments motivating that structure. But these comments may do more harm than good; the revised structure may actually allow OOM'ing during page map expansion (though I have not yet confirmed this). > PageMap.cpp: > > "sigh" - what's that about? C'mon, the "need" for an explicit for loop to initialize an array of pointers to NULL doesn't upset you? (Aside: in the refactoring I explicitly rely on NULL being represented by a zero bit-pattern, so maybe I should just drop this for-loop entirely.) > GC.cpp: > > Minor question mark: efficiency of new version of GC::MarkGCPages. This fell under the category of "operation assumed to be infrequent." Let me know if you want me to investigate explicitly.
(In reply to comment #23) > > > Comment on attachment 465318 [details] [diff] [review] [details] > > refactor existing pagemap for later revision. > > > > ... > > > > PageMap.h: > > > > Is it true that MemEnd returns a value that's the exclusive upper bound of > > the > > domain of the map? Elsewhere we see that it returns memEnd, and the initial > > value of that is 0xF...F, which looks more like an inclusive bound. > > Maybe I'm misunderstanding. Initial value of memEnd is 0, and initial value > of memStart is MAX_UINTPTR (both in original code and in refactored version). You're right, I misread the code. Ignore. > > PageMap-inlines.h: > > > > These comments seem spurious: "can't use heapAlloc here", "can't use > > heapFree > > here", since those are methods on GC and a GC appears not to be available. > > This is artifact of my refactoring; again I was preserving existing control > structure and thought it best to also preserve the existing comments > motivating > that structure. But these comments may do more harm than good; the revised > structure may actually allow OOM'ing during page map expansion (though I have > not yet confirmed this). Right, clearly a fallout from refactoring, comments should be removed tho'. > > PageMap.cpp: > > > > "sigh" - what's that about? > > C'mon, the "need" for an explicit for loop to initialize an array of pointers > to NULL doesn't upset you? (Aside: in the refactoring I explicitly rely on > NULL being represented by a zero bit-pattern, so maybe I should just drop this > for-loop entirely.) The reaction was to the non-content of "sigh" more than the loop... I suspect I write comments like that myself too but that I should stop. I want you to stop too :-) Anyway everyone assumes NULL is all-zero-bits throughout the Tamarin code base. Fact of life - the world would come to an end if this were to change. > > GC.cpp: > > > > Minor question mark: efficiency of new version of GC::MarkGCPages. > > This fell under the category of "operation assumed to be infrequent." Let me > know if you want me to investigate explicitly. You're probably right - the common case is to mark just one page, and this code is not likely to be worse than the old code for that.
(In reply to comment #16) > "All prior returned indexes are implicitly invalidated." Would be useful to > say who returned those indexes, certainly none of the public methods did? Excellent point, the Indexes are only part of the interfaces to the private methods, and its super-confusing to have this note in the public interface exposing that implementation detail.
(In reply to comment #20) > Comment on attachment 465318 [details] [diff] [review] > refactor existing pagemap for later revision. > > I would have preferred to see EnsureCapacity and SetVal rolled into a > SetRegionVal or something but not a big deal. I started on this idea before I put the code up for review; at that time I didn't like it where it was going (felt like it made the interface wider than I liked) and aborted. I'll give it another shot. > Also the initial page map allocate can/should go away. Right, I'll make sure to do this.
Comment on attachment 463275 [details] [diff] [review] unified patch for dschaffe This was a short-term method of getting a patch to dschaffe; I do not want it confused with the "real" patches.
Attachment #463275 - Attachment is obsolete: true
(In reply to comment #26) > (In reply to comment #20) > > Comment on attachment 465318 [details] [diff] [review] [details] > > refactor existing pagemap for later revision. > > > > I would have preferred to see EnsureCapacity and SetVal rolled into a > > SetRegionVal or something but not a big deal. > > I started on this idea before I put the code up for review; at that time I > didn't like it where it was going (felt like it made the interface wider than I > liked) and aborted. I'll give it another shot. (A maximally general interface would probably still want to expose an EnsureCapacity method that did not modify the existing mappings, which would be an argument against replacing the two with a roll-up. But for the only use-case for the current code base, every EnsureCapacity call is immediately followed by the SetVal invocations for the entire range, so the roll-up seems like the right thing to do for now; a more general API can wait until we have need for it.)
(In reply to comment #22) > Some numbers that were computed (and are here revised): > > Each 4K leaf page covers a 64MB address range: > > 2^15 bits/page / 2 bits/entry = 2^14 entries/page > 2^14 entries/page * 2^12 bytes/entry = 2^26 bytes/page = 64MB > > Suppose we use a two-tiered structure for a 64-bit address range. Then the > upper level containing one word per lower-level page requires a multi-gigabyte > table: > > 2^64 bytes / 2^26 bytes/pointer = 2^38 pointers > 2^38 pointers * 2^3 bytes/pointer = 2^41 bytes > > Ergo a two-tiered structure is not appropriate for a 64-bit address range. I believe there is a small fallacy in the above reasoning. Namely, you are assuming the leaves must each be one page in size. But if you really wanted a two-level page map, you would make your leaves bigger, and thus you would not need such a large root node in the tree to cover the address range. (The Tiered4 code is designed to support such leaves.) But such redistribution can only save you so much, of course. Consider: Each page covers a 64 MB address range (as above). Each leaf holds 2^L pages. (In Lars' analysis, L=0.) 2^L pages/leaf * 2^26 bytesCovered/page = 2^{26 + L} bytesCovered/leaf For the upper tier, we keep pointers to the multi-page leaves, the same as what Lars described in the analysis of comment #22: 2^64 bytes / 2^{26 + L} bytesCovered/pointer = 2^{38 - L} pointers 2^{38 - L} * 2^3 bytes/pointer = 2^{41 - L} bytes. If we equally distribute the load between the pair of tiers, then we would want to minimize delta( 2^{41 - L}, 2^{12 + L} ) If we try for zero delta between the two: 41 - L = 12 + L 2*L = 29 L = 14.5 But L must be integral since will be allocating in page-sized units -- so take L=14 -- or L=15, its not really going to matter for the final conclusion. (Another option is what already doing in the Tiered4 codebase: having a another special top-most tier, an array that is allocated inline (which would pay a bit more to dynamically calculate the offset to lookup within the GC object, but I do not think that compares to the cost as adding a true tier in terms of adding a whole extra load to the series, as is required for Tiered3 and so on) and thus would be much smaller than a page and yet allow for the nodes below it to be smaller. Incorporating that option into the above analysis is doable but not really what I'm interested in spending time on right now -- the rough intution I think is that for every factor of 4 you are willing to pay up front in the array member, you get a 1/2 reduction on the the node and leaf sizes). Anyway, with L=14, each leaf is 2^14 = 16,384 pages i.e. 64 MB. And likewise the interior node would be 2^{41 - 14} bytes = 128 MB. This is still a pretty ridiculous cost, even with the delayed expansion algorithm that I put into DelayT4. Its not utterly absurd the way a multi-gigabyte allocation would be, but its bad. So, by the same reasoning that concluded comment 22, it is in principle possible to use a two-tiered page map to cover a 64-bit address space, we probably do not want to do so.
(In reply to comment #18) > - Maybe remove AllocPageMapVia / DestroyPageMapVia, they're only used for > the "Uniform" case Note that DestroyPageMapVia is used for all variants, not just Uniform. I believe Tommy was pushing for that to be changed to use PageMap's C++ destructor rather than explicit method. But the destruction needs the GCHeap to free the pages it has allocated. So before I can do this, I would need to make the GCHeap a member of the PageMap (something I did consider but decided was not in the spirit of pure refactoring of the existing code.) My plan is to keep DestroyPageMapVia, at least for this iteration. A later revision of the API can go through and evaluate whether there are any other issues with switching to a C++ destructor for this.
(In reply to comment #18) > > "Uniform" code is more or less obsolete, we want to be sure to have it > #ifdef'd. We probably want to leave it in for one major release in order to > benchmark new code against it, in a pinch. Action items: > > - #ifdef it > - file bug to remove it Filed as: https://bugzilla.mozilla.org/show_bug.cgi?id=588878
Revised refactoring patch, taking comments from Tommy and Lars into account.
Attachment #465318 - Attachment is obsolete: true
Attachment #465318 - Flags: superreview?(lhansen)
Revised sparse-pagemap implementation patch. The second-order derivative here (that is, the changes when comparing the patches themselves) is more extreme with this revision than the previous one -- in particular, I'm not particularly enamored with the way I tried to satisfy Tommy's request for EnsureCapacity and AddrSet to be rolled up into one routine. But I believe I have addressed all of the comments about the earlier patches. Still to come: I need to make sure the composition of both passes a sandbox build, and I need to post the benchmark results that I have been gathering today with these newest versions (caveat: I'm only running the tests/performance/ suite on my personal MacBook Pro, and its been notorious hard for me to interpret the results there. I am hoping to do a couple of the real-world performance tests when I am in the office tomorrow.)
Attachment #465321 - Attachment is obsolete: true
Attachment #465321 - Flags: superreview?(lhansen)
Below are the results comparing the baseline (at rev 5088) against that+the two patches, in 64-bit mode. The results are once again all over the place. The 14% hit on math-spectral-norm.as is a little worrisome; I'll look into that and maybe the others once the 32-bit benchmark run is done. % python runtests.py -f --iterations 7 --avm ../../../tr-pmap-baseline/objdir-selftest64/shell/avmshell --avm2 ../../../tr-pmap-sparsely/objdir-selftest64/shell/avmshell Tamarin tests started: 2010-08-19 16:37:44.906467 Executing 401 test(s) avm: ../../../tr-pmap-baseline/objdir-selftest64/shell/avmshell version: cyclone avm2: ../../../tr-pmap-sparsely/objdir-selftest64/shell/avmshell version: cyclone iterations: 7 avm:cyclone avm2:cyclone test best avg best avg %dBst %dAvg Metric: v8 custom v8 normalized metric (hardcoded in the test) asmicro/alloc-1.as 51 49.9 50 48.7 -1.96 -2.29 asmicro/alloc-10.as 13 12.7 13 12.4 0 -2.25 asmicro/alloc-11.as 16 15.9 15 15 -6.25 -5.41 -- asmicro/alloc-12.as 11 11 11 11 0 0 asmicro/alloc-13.as 119 117.4 122 120.4 2.52 2.55 asmicro/alloc-14.as 88 83.7 88 84.6 0 1.02 asmicro/alloc-2.as 27 26.4 27 26.9 0 1.62 asmicro/alloc-3.as 12 12 12 11.9 0 -1.19 asmicro/alloc-4.as 73 72.7 72 71.7 -1.37 -1.38 - asmicro/alloc-5.as 45 44.3 46 45.3 2.22 2.26 + asmicro/alloc-6.as 91 90.7 93 91.3 2.20 0.63 asmicro/alloc-7.as 55 54.7 54 54 -1.82 -1.31 - asmicro/alloc-8.as 15 14.3 15 14.4 0 1.00 asmicro/alloc-9.as 14 13.9 15 14.3 7.14 3.09 + asmicro/arguments-1.as 1162 1158.9 1161 1154.4 -0.09 -0.38 asmicro/arguments-2.as 673 631.1 677 653.1 0.59 3.49 asmicro/arguments-3.as 28 28 29 28.3 3.57 1.02 + asmicro/arguments-4.as 43 43 42 42 -2.33 -2.33 - asmicro/array-1.as 2861 2851.4 2871 2861.9 0.35 0.37 asmicro/array-2.as 905 901.9 903 899 -0.22 -0.32 asmicro/array-pop-1.as 476 470.4 472 466.1 -0.84 -0.91 asmicro/array-push-1.as 323 321.1 310 306.1 -4.02 -4.67 - asmicro/array-shift-1.as 185 182.7 191 186.7 3.24 2.19 + asmicro/array-slice-1.as 26 25.9 26 26 0 0.55 asmicro/array-sort-1.as 39 39 38 37.4 -2.56 -4.03 - asmicro/array-sort-2.as 3 3 3 3 0 0 asmicro/array-sort-3.as 24 24 24 23.4 0 -2.38 asmicro/array-sort-4.as 12 12 12 12 0 0 asmicro/array-unshift-1.as 172 171.4 167 166.9 -2.91 -2.67 - asmicro/closedvar-read-1.as 4723 4710.9 4727 4717 0.08 0.13 asmicro/closedvar-write-1.as 2741 2732.1 2732 2718.9 -0.33 -0.49 asmicro/closedvar-write-2.as 2740 2731.7 2735 2727.9 -0.18 -0.14 asmicro/do-1.as 5456 5434.1 5473 5462.3 0.31 0.52 asmicro/for-1.as 4588 4576.3 4578 4566.1 -0.22 -0.22 asmicro/for-2.as 2988 2983.6 2991 2985.1 0.10 0.05 asmicro/for-3.as 2985 2970.4 2993 2985.6 0.27 0.51 asmicro/for-in-1.as 582 581 557 555 -4.30 -4.48 - asmicro/for-in-2.as 242 241.1 244 243.4 0.83 0.95 asmicro/funcall-1.as 514 513.6 516 514 0.39 0.08 asmicro/funcall-2.as 300 299.3 299 298.4 -0.33 -0.29 asmicro/funcall-3.as 457 455.3 440 439.1 -3.72 -3.55 - asmicro/funcall-4.as 163 163 167 166.7 2.45 2.28 + asmicro/globalvar-read-1.as 4709 4698.4 4707 4636.4 -0.04 -1.32 asmicro/globalvar-write-1.as 2742 2736.9 2750 2745.1 0.29 0.30 asmicro/isNaN-1.as 785 783.7 785 782.4 0 -0.16 smicro/lookup-array-fetch-1.as 986 983.6 950 947.7 -3.65 -3.65 - asmicro/lookup-array-in-1.as 2052 2044.9 1981 1967.4 -3.46 -3.79 - cro/lookup-negindex-array-1.as 527 523.1 530 523.9 0.57 0.14 cro/lookup-negindex-array-2.as 456 455.1 457 455.3 0.22 0.03 ro/lookup-negindex-object-1.as 540 536.9 539 535.9 -0.19 -0.19 ro/lookup-negindex-object-2.as 499 497.1 505 503.6 1.20 1.29 + micro/lookup-object-fetch-1.as 1100 1092.4 1067 1062 -3 -2.79 - asmicro/lookup-object-in-1.as 1767 1750.1 1721 1717.1 -2.60 -1.89 - asmicro/number-toString-1.as 11 11 11 11 0 0 asmicro/number-toString-2.as 94 93.6 95 94 1.06 0.46 asmicro/oop-1.as 5 5 5 5 0 0 asmicro/parseFloat-1.as 101 100.6 101 100.6 0 0 asmicro/parseInt-1.as 244 243.9 244 243.3 0 -0.23 asmicro/regex-exec-1.as 81 81 84 84 3.70 3.70 + asmicro/regex-exec-2.as 101 100.6 103 102.3 1.98 1.70 + asmicro/regex-exec-3.as 154 153.6 154 153.7 0 0.09 asmicro/regex-exec-4.as 390 387 389 388.4 -0.26 0.37 asmicro/restarg-1.as 1168 1162.3 1169 1165 0.09 0.23 asmicro/restarg-2.as 678 645.3 677 658.4 -0.15 2.04 asmicro/restarg-3.as 56 55.7 57 56.9 1.79 2.05 + asmicro/restarg-4.as 44 43.4 43 42.7 -2.27 -1.64 - asmicro/string-casechange-1.as 35 35 35 34.9 0 -0.41 asmicro/string-casechange-2.as 36 35.7 35 35 -2.78 -2.00 - asmicro/string-charAt-1.as 864 862.3 862 859 -0.23 -0.38 asmicro/string-charAt-2.as 96 95.1 96 95.1 0 0 asmicro/string-charCodeAt-1.as 862 858 861 858 -0.12 0 asmicro/string-charCodeAt-2.as 848 844 845 842.1 -0.35 -0.22 micro/string-fromCharCode-1.as 434 433.6 438 437 0.92 0.79 + micro/string-fromCharCode-2.as 82 81.7 82 81.1 0 -0.70 asmicro/string-indexOf-1.as 267 264.6 279 277.9 4.49 5.02 + asmicro/string-indexOf-2.as 192 191 192 191.6 0 0.30 asmicro/string-indexOf-3.as 146 145.9 146 145.7 0 -0.10 smicro/string-lastIndexOf-1.as 846 844.1 846 842.4 0 -0.20 smicro/string-lastIndexOf-2.as 145 144.7 145 144.7 0 0 smicro/string-lastIndexOf-3.as 607 605.4 607 587.7 0 -2.93 asmicro/string-slice-1.as 153 152.3 154 153.1 0.65 0.56 asmicro/string-split-1.as 11 11 11 11 0 0 asmicro/string-split-2.as 11 11 11 11 0 0 asmicro/string-substring-1.as 164 163.9 166 165.3 1.22 0.87 + asmicro/switch-1.as 733 729.9 732 730.4 -0.14 0.08 asmicro/switch-2.as 54 54 54 53.9 0 -0.26 asmicro/switch-3.as 63 63 63 63 0 0 asmicro/try-1.as 347 345.6 343 341.4 -1.15 -1.20 - asmicro/try-2.as 15 15 15 15 0 0 asmicro/try-3.as 74 74 74 74 0 0 asmicro/vector-push-1.as 65 65 62 61.7 -4.62 -5.05 - asmicro/while-1.as 4596 4576.9 4603 4594.9 0.15 0.39 Metric: time jsbench/Crypt.as 2900 2903.9 2913 2917.4 -0.45 -0.47 - jsbench/Euler.as 5694 5711.3 5717 5749.3 -0.40 -0.67 jsbench/FFT.as 6531 6564.7 7064 7090.6 -8.16 -8.01 -- jsbench/HeapSort.as 2478 2489.1 2666 2678.9 -7.59 -7.62 -- jsbench/LUFact.as 6659 6717.9 6653 6683 0.09 0.52 jsbench/Moldyn.as 7283 7299.6 7312 7332.1 -0.40 -0.45 jsbench/RayTracer.as 5546 5621.1 5539 5556.7 0.13 1.15 jsbench/SOR.as 25977 26025 25893 25951.1 0.32 0.28 + jsbench/Series.as 6676 6692.3 6713 6725.1 -0.55 -0.49 - jsbench/SparseMatmult.as 12442 12737.9 13360 13452.3 -7.38 -5.61 -- jsbench/typed/Crypt.as 747 749.7 748 750.4 -0.13 -0.10 jsbench/typed/Euler.as 7154 7181.1 7150 7218.7 0.06 -0.52 jsbench/typed/FFT.as 3737 3743.3 3746 3757.4 -0.24 -0.38 jsbench/typed/HeapSort.as 1206 1219.7 1206 1214.3 0 0.45 jsbench/typed/LUFact.as 7049 7069.9 7054 7065.3 -0.07 0.06 jsbench/typed/Moldyn.as 3210 3230.1 3224 3234.7 -0.44 -0.14 jsbench/typed/RayTracer.as 851 854.3 854 858.7 -0.35 -0.52 jsbench/typed/SOR.as 18507 18831.7 18653 18910.6 -0.79 -0.42 jsbench/typed/Series.as 6106 6155 6152 6216.3 -0.75 -1.00 jsbench/typed/SparseMatmult.as 2331 2357.3 2154 2165.1 7.59 8.15 ++ Metric: v8 custom v8 normalized metric (hardcoded in the test) jsmicro/alloc-1.as 48 47.7 48 46.3 0 -2.99 jsmicro/alloc-10.as 13 12.6 13 12.4 0 -1.14 jsmicro/alloc-11.as 15 14.7 15 14.6 0 -0.97 jsmicro/alloc-12.as 11 10.9 11 10.9 0 0 jsmicro/alloc-13.as 99 97.6 102 101 3.03 3.51 + jsmicro/alloc-14.as 79 77.6 79 77.1 0 -0.55 jsmicro/alloc-2.as 26 25.9 26 26 0 0.55 jsmicro/alloc-3.as 12 12 12 12 0 0 jsmicro/alloc-4.as 70 68.6 69 68.9 -1.43 0.42 jsmicro/alloc-5.as 44 43.9 44 44 0 0.33 jsmicro/alloc-6.as 76 76 78 78 2.63 2.63 + jsmicro/alloc-7.as 55 55 54 53.7 -1.82 -2.34 - jsmicro/alloc-8.as 14 14 14 13.7 0 -2.04 jsmicro/alloc-9.as 14 14 14 14 0 0 jsmicro/arguments-1.as 193 192.6 192 191.9 -0.52 -0.37 - jsmicro/arguments-2.as 127 126.7 128 127.6 0.79 0.68 jsmicro/arguments-3.as 26 26 26 26 0 0 jsmicro/array-1.as 530 527.1 531 527.9 0.19 0.14 jsmicro/array-2.as 388 387.6 387 386.1 -0.26 -0.37 jsmicro/array-pop-1.as 100 98 99 97.6 -1 -0.44 jsmicro/array-push-1.as 64 62.3 64 61.7 0 -0.92 jsmicro/array-shift-1.as 82 80.7 81 79.9 -1.22 -1.06 jsmicro/array-slice-1.as 22 21.6 22 22 0 1.99 jsmicro/array-sort-1.as 37 37 35 34.3 -5.41 -7.34 - jsmicro/array-sort-2.as 3 2.9 3 2.9 0 0 jsmicro/array-sort-3.as 25 24.1 23 23 -8 -4.73 -- jsmicro/array-sort-4.as 14 14 14 13.9 0 -1.02 jsmicro/array-unshift-1.as 33 32.1 34 34 3.03 5.78 + jsmicro/closedvar-read-1.as 844 841.4 842 838.3 -0.24 -0.37 jsmicro/closedvar-write-1.as 608 605.1 605 599.7 -0.49 -0.90 jsmicro/closedvar-write-2.as 608 606.6 605 603.9 -0.49 -0.45 - jsmicro/do-1.as 866 863.9 865 864 -0.12 0.02 jsmicro/for-1.as 801 795.4 845 838.7 5.49 5.44 ++ jsmicro/for-2.as 234 232.6 230 228.7 -1.71 -1.66 - jsmicro/for-3.as 109 108.3 108 107.9 -0.92 -0.40 jsmicro/for-in-1.as 410 409 410 408.9 0 -0.03 jsmicro/for-in-2.as 205 205 209 207.9 1.95 1.39 + jsmicro/funcall-1.as 342 338.6 342 340.7 0 0.63 jsmicro/funcall-2.as 324 322.1 324 321.9 0 -0.09 jsmicro/funcall-3.as 308 306 308 305 0 -0.33 jsmicro/funcall-4.as 2103 2094.4 2080 2074.4 -1.09 -0.95 - jsmicro/globalvar-read-1.as 842 827.9 844 836 0.24 0.98 jsmicro/globalvar-write-1.as 609 605.4 608 604.7 -0.16 -0.12 jsmicro/isNaN-1.as 390 389 391 389.3 0.26 0.07 smicro/lookup-array-fetch-1.as 815 811.6 778 776.9 -4.54 -4.28 - jsmicro/lookup-array-in-1.as 1128 1123.4 1090 1076 -3.37 -4.22 - micro/lookup-object-fetch-1.as 892 886.9 853 848.9 -4.37 -4.28 - jsmicro/lookup-object-in-1.as 1045 1035.9 1035 1030.6 -0.96 -0.51 jsmicro/number-toString-1.as 10 10 10 10 0 0 jsmicro/number-toString-2.as 77 75.7 77 76.3 0 0.75 jsmicro/oop-1.as 5 5 5 5 0 0 jsmicro/parseFloat-1.as 57 57 57 57 0 0 jsmicro/parseInt-1.as 160 159.7 160 159.7 0 0 jsmicro/regex-exec-1.as 69 68.1 71 69.7 2.90 2.31 jsmicro/regex-exec-2.as 89 88.6 89 88.7 0 0.16 jsmicro/regex-exec-3.as 137 136.1 139 138.9 1.46 1.99 + jsmicro/regex-exec-4.as 314 312 311 308.3 -0.96 -1.19 jsmicro/string-casechange-1.as 24 23.7 24 23.6 0 -0.60 jsmicro/string-casechange-2.as 22 22 24 24 9.09 9.09 ++ jsmicro/string-charAt-1.as 134 133.6 131 130.7 -2.24 -2.14 - jsmicro/string-charAt-2.as 58 57.9 58 58 0 0.25 jsmicro/string-charCodeAt-1.as 128 126 126 125.6 -1.56 -0.34 jsmicro/string-charCodeAt-2.as 126 125.7 125 124.9 -0.79 -0.68 - micro/string-fromCharCode-1.as 120 119.1 118 117.3 -1.67 -1.56 - micro/string-fromCharCode-2.as 53 53 53 52.9 0 -0.27 micro/string-fromCharCode-3.as 90 89.9 92 91.4 2.22 1.75 + micro/string-fromCharCode-4.as 93 92.9 94 93.7 1.08 0.92 jsmicro/string-indexOf-1.as 115 114.3 114 113.3 -0.87 -0.87 jsmicro/string-indexOf-2.as 78 77.9 78 77.7 0 -0.18 jsmicro/string-indexOf-3.as 70 69.4 70 69 0 -0.62 smicro/string-lastIndexOf-1.as 110 109.1 110 109 0 -0.13 smicro/string-lastIndexOf-2.as 69 68.3 67 67 -2.90 -1.88 - smicro/string-lastIndexOf-3.as 111 110.6 109 108.6 -1.80 -1.81 - jsmicro/string-slice-1.as 60 59.7 74 73.3 23.33 22.73 ++ jsmicro/string-split-1.as 10 10 10 10 0 0 jsmicro/string-split-2.as 10 9.9 10 10 0 1.45 jsmicro/string-substring-1.as 60 59.7 74 73.6 23.33 23.21 ++ jsmicro/switch-1.as 132 131.3 131 131 -0.76 -0.22 - jsmicro/switch-2.as 50 49.6 50 49.4 0 -0.29 jsmicro/switch-3.as 58 57.4 58 57.6 0 0.25 jsmicro/try-1.as 241 240.4 237 234.7 -1.66 -2.38 - jsmicro/try-2.as 15 14.7 15 15 0 1.94 jsmicro/try-3.as 61 61 60 60 -1.64 -1.64 - jsmicro/while-1.as 801 797 844 842.1 5.37 5.66 ++ Metric: time e/describetype/desctypeperf.as 476 477.9 468 471.7 1.68 1.29 + anguage/e4x/addingToXMLList.as 14 14.6 14 15.9 0 -8.82 ge/e4x/appendChildAndString.as 39 39.9 39 41 0 -2.87 concatenatingStringsFromE4X.as 4 5.7 4 5.1 0 10.00 x/simpleStringConcatenation.as 1 1.7 1 1.9 0 -8.33 /e4x/usingAppendChildAndE4X.as 39 42 39 41.1 0 2.04 nguage/string/append_concat.as 60 62 61 61.9 -1.67 0.23 ge/string/append_equal_plus.as 52 54.1 52 53 0 2.11 ge/string/append_plus_equal.as 52 52.7 52 54 0 -2.44 language/string/charAt.as 112 116.4 111 112.9 0.89 3.07 language/string/charCodeAt.as 128 130.1 126 126.9 1.56 2.52 language/string/indexOf.as 233 239.3 233 237.7 0 0.66 language/string/lastIndexOf.as 173 175.4 173 175.1 0 0.16 language/string/replace.as 332 337.7 321 325 3.31 3.76 + language/string/replace2.as 600 604.7 607 608.9 -1.17 -0.69 - language/string/search.as 29 29.9 29 30.4 0 -1.91 language/string/slice.as 178 179 173 174.6 2.81 2.47 + language/string/split.as 362 363.6 364 366.9 -0.55 -0.90 ring/static_ascii_array_100.as 704 710 715 720.1 -1.56 -1.43 - tring/static_ascii_array_50.as 685 691 696 702.4 -1.61 -1.65 ing/static_latin1_array_100.as 1378 1390.7 1397 1405.6 -1.38 -1.07 ring/static_latin1_array_50.as 688 701.4 699 702.4 -1.60 -0.14 language/string/substr.as 131 132.4 129 131.3 1.53 0.86 language/string/substring.as 127 128.7 126 128 0.79 0.55 /string/typed/append_concat.as 57 57.9 59 60.3 -3.51 -4.20 ing/typed/append_equal_plus.as 47 48.3 48 49.3 -2.13 -2.07 ing/typed/append_plus_equal.as 47 49 47 49.3 0 -0.58 anguage/string/typed/charAt.as 33 33.3 33 35.9 0 -7.73 age/string/typed/charCodeAt.as 30 31.6 30 31 0 1.81 nguage/string/typed/indexOf.as 233 233.9 232 235 0.43 -0.49 ge/string/typed/lastIndexOf.as 173 176.4 173 176.3 0 0.08 nguage/string/typed/replace.as 345 349 321 327.1 6.96 6.26 ++ guage/string/typed/replace2.as 599 604 608 622 -1.50 -2.98 anguage/string/typed/search.as 29 32 29 29.9 0 6.70 language/string/typed/slice.as 130 132.3 129 130.4 0.77 1.40 language/string/typed/split.as 362 364.6 361 367.3 0.28 -0.74 anguage/string/typed/substr.as 96 97.6 96 98.4 0 -0.88 uage/string/typed/substring.as 90 94 90 92.6 0 1.52 misc/boids.as 1252 1263.6 1240 1246.1 0.96 1.38 + misc/boidshack.as 361 364 354 357 1.94 1.92 + misc/gameoflife.as 1972 1980.9 1985 1992.6 -0.66 -0.59 - misc/primes.as 4139 4157.9 4133 4139.9 0.14 0.43 mmgc/gcbench.as 2207 2342.4 2217 2262 -0.45 3.43 mmgc/ofib-rc.as 328 333 307 324.7 6.40 2.49 + mmgc/ofib.as 905 922.6 948 955 -4.75 -3.52 - mmgc/sfib.as 268 270.6 268 270.1 0 0.16 scimark/FFT.as 2084 2091.1 2079 2088.1 0.24 0.14 scimark/LU.as 2246 2263.1 2203 2227.3 1.91 1.58 + scimark/MonteCarlo.as 1272 1273.6 1272 1276.6 0 -0.24 scimark/SOR.as 2115 2126.4 2108 2120.9 0.33 0.26 scimark/SparseCompRow.as 76 77.4 72 72.7 5.26 6.09 ++ nspider/access-binary-trees.as 24 24.7 24 25.1 0 -1.73 sunspider/access-fannkuch.as 54 55 55 56.3 -1.85 -2.34 sunspider/access-nbody.as 63 65.6 61 62.9 3.17 4.14 sunspider/access-nsieve.as 35 35.4 35 35.9 0 -1.21 er/bitops-3bit-bits-in-byte.as 7 8.7 8 10.1 -14.29 -16.39 nspider/bitops-bits-in-byte.as 21 22.4 21 22.1 0 1.27 unspider/bitops-bitwise-and.as 116 117.6 118 119.7 -1.72 -1.82 unspider/bitops-nsieve-bits.as 22 23.4 21 22.7 4.55 3.05 pider/controlflow-recursive.as 10 11 10 12 0 -9.09 sunspider/crypto-aes.as 26 26.7 26 27.4 0 -2.67 sunspider/crypto-md5.as 10 13 10 11.4 0 12.09 sunspider/crypto-sha1.as 10 11.4 9 11.3 10 1.25 sunspider/date-format-tofte.as 316 332 316 331.9 0 0.04 sunspider/math-cordic.as 42 43.7 42 43.3 0 0.98 sunspider/math-partial-sums.as 106 108.3 106 107.4 0 0.79 unspider/math-spectral-norm.as 24 24.4 27 28 -12.50 -14.62 - sunspider/s3d-cube.as 54 56.1 54 55.4 0 1.27 sunspider/s3d-morph.as 28 29.4 28 28.9 0 1.94 sunspider/s3d-raytrace.as 52 52.7 52 53.1 0 -0.81 sunspider/string-fasta.as 55 57.6 54 56.4 1.82 1.99 unspider/string-unpack-code.as 117 118 118 119.9 -0.85 -1.57 pider/string-validate-input.as 30 31.6 30 31.3 0 0.90 der/as3/access-binary-trees.as 7 9 7 9 0 0 nspider/as3/access-fannkuch.as 37 39.4 36 37.3 2.70 5.43 sunspider/as3/access-nbody.as 5 5 4 4.3 20 14.29 + sunspider/as3/access-nsieve.as 26 28.3 26 27 0 4.55 s3/bitops-3bit-bits-in-byte.as 4 5 4 4.4 0 11.43 der/as3/bitops-bits-in-byte.as 7 7.3 7 8.7 0 -19.61 ider/as3/bitops-bitwise-and.as 1 2.4 1 2.3 0 5.88 ider/as3/bitops-nsieve-bits.as 10 11.1 11 12.3 -10 -10.26 r/as3/controlflow-recursive.as 2 3.6 2 3.1 0 12.00 sunspider/as3/crypto-aes.as 20 20.7 20 20.7 0 0 sunspider/as3/crypto-md5.as 9 10.6 9 12.4 0 -17.57 sunspider/as3/crypto-sha1.as 8 10.9 8 8.9 0 18.42 pider/as3/date-format-tofte.as 306 325.1 305 320.7 0.33 1.36 sunspider/as3/math-cordic.as 18 19 18 19.3 0 -1.50 pider/as3/math-partial-sums.as 34 34.7 34 34.1 0 1.65 ider/as3/math-spectral-norm.as 4 5.1 4 4.9 0 5.56 sunspider/as3/s3d-cube.as 13 14.1 13 13.7 0 3.03 sunspider/as3/s3d-morph.as 20 21.3 20 20.3 0 4.70 sunspider/as3/s3d-raytrace.as 27 27.7 27 27.7 0 0 sunspider/as3/string-fasta.as 28 28.4 28 28.6 0 -0.50 ider/as3/string-unpack-code.as 114 116.6 118 118.6 -3.51 -1.72 - r/as3/string-validate-input.as 25 26.6 25 26 0 2.15 r/as3vector/access-fannkuch.as 24 26 24 25 0 3.85 ider/as3vector/access-nbody.as 4 5 4 5 0 0 der/as3vector/access-nsieve.as 9 10.7 9 10.9 0 -1.33 s3vector/bitops-nsieve-bits.as 5 5.7 5 6.6 0 -15.00 pider/as3vector/math-cordic.as 11 12 11 12 0 0 s3vector/math-spectral-norm.as 10 10.6 10 10.4 0 1.35 unspider/as3vector/s3d-cube.as 12 13.3 12 13.4 0 -1.08 nspider/as3vector/s3d-morph.as 19 21.6 19 20.4 0 5.30 ider/as3vector/string-fasta.as 31 33.7 31 33.4 0 0.85 ector/string-validate-input.as 25 27.3 26 27.7 -4 -1.57 Metric: v8 custom v8 normalized metric (hardcoded in the test) v8/crypto.as 901 898.9 896 894.9 -0.55 -0.45 - v8/deltablue.as 2486 2479 2472 2452 -0.56 -1.09 v8/earley-boyer.as 1237 1217 1217 1206.7 -1.62 -0.85 v8/raytrace.as 3917 3876.3 3902 3893.6 -0.38 0.45 v8/richards.as 1584 1583.1 1566 1554.6 -1.14 -1.80 - v8/typed/crypto.as 917 896 916 913.4 -0.11 1.95 v8/typed/deltablue.as 3783 3750.7 3850 3800 1.77 1.31 + v8/typed/earley-boyer.as 1225 1211.1 1211 1206 -1.14 -0.42 - v8/typed/raytrace.as 8572 8528.1 8639 8558.1 0.78 0.35 v8/typed/richards.as 2871 2858.1 2878 2852.7 0.24 -0.19 v8.5/js/crypto.as 788 783.9 788 786.7 0 0.36 v8.5/js/deltablue.as 452 451 455 452.6 0.66 0.35 + v8.5/js/earley-boyer.as 1231 1211.9 1218 1185 -1.06 -2.22 v8.5/js/raytrace.as 967 963.3 963 961.1 -0.41 -0.22 v8.5/js/regexp.as 120 119.9 124 123.3 3.33 2.86 + v8.5/js/richards.as 387 385.3 395 392.4 2.07 1.85 + v8.5/js/splay.as 1245 1020 1034 991.4 -16.95 -2.80 v8.5/optimized/crypto.as 5270 5234.7 5312 5283 0.80 0.92 v8.5/optimized/deltablue.as 4103 4087.3 4148 4120.4 1.10 0.81 + v8.5/optimized/earley-boyer.as 1228 1210.6 1224 1187 -0.33 -1.95 v8.5/optimized/raytrace.as 10590 10517 10529 10465.4 -0.58 -0.49 v8.5/optimized/regexp.as 119 119 123 122.7 3.36 3.12 + v8.5/optimized/richards.as 5184 5160.7 5238 5216.9 1.04 1.09 + v8.5/optimized/splay.as 7445 7273.3 7445 7243.1 0 -0.41 v8.5/typed/crypto.as 3083 3048.1 3078 3061.7 -0.16 0.45 v8.5/typed/deltablue.as 4576 4529.6 4532 4492.3 -0.96 -0.82 v8.5/typed/earley-boyer.as 1220 1206.1 1212 1203.1 -0.66 -0.25 v8.5/typed/raytrace.as 10623 10586.7 10548 10513.7 -0.71 -0.69 - v8.5/typed/regexp.as 120 119.1 123 122.9 2.50 3.12 + v8.5/typed/richards.as 5176 5154.3 5222 5202.4 0.89 0.93 + v8.5/typed/splay.as 1694 1588.7 1703 1689 0.53 6.31 v8.5/untyped/crypto.as 878 875.3 866 862.6 -1.37 -1.45 - v8.5/untyped/deltablue.as 2540 2515.4 2491 2407.3 -1.93 -4.30 v8.5/untyped/earley-boyer.as 1227 1218.9 1214 1199.7 -1.06 -1.57 v8.5/untyped/raytrace.as 4235 4211.3 4168 4142.3 -1.58 -1.64 - v8.5/untyped/regexp.as 119 117.4 123 122.3 3.36 4.14 + v8.5/untyped/richards.as 667 664.6 659 654 -1.20 -1.59 - v8.5/untyped/splay.as 1583 1463.9 1633 1591.9 3.16 8.74
And these are comparing the 32-bit builds. Both runs were done on my home laptop (Dido), a 2.66 Ghz i7 running OS X 10.6.4. The 32-bit results are also varied, but strike me as less all-over-the-map than the 64-bit ones (maybe due to the simpler structure of Tiered2). But that's based on a rough skim, not a real analysis of the data. % python runtests.py -f --iterations 7 --avm ../../../tr-pmap-baseline/objdir-selftest32/shell/avmshell --avm2 ../../../tr-pmap-sparsely/objdir-selftest32/shell/avmshell Tamarin tests started: 2010-08-19 18:19:11.541101 Executing 401 test(s) avm: ../../../tr-pmap-baseline/objdir-selftest32/shell/avmshell version: cyclone avm2: ../../../tr-pmap-sparsely/objdir-selftest32/shell/avmshell version: cyclone iterations: 7 avm:cyclone avm2:cyclone test best avg best avg %dBst %dAvg Metric: v8 custom v8 normalized metric (hardcoded in the test) asmicro/alloc-1.as 45 45 45 45 0 0 asmicro/alloc-10.as 16 16 16 16 0 0 asmicro/alloc-11.as 15 15 15 15 0 0 asmicro/alloc-12.as 9 9 9 9 0 0 asmicro/alloc-13.as 92 91.7 90 89.1 -2.17 -2.80 - asmicro/alloc-14.as 78 77.7 77 77 -1.28 -0.92 - asmicro/alloc-2.as 21 21 22 21.1 4.76 0.68 + asmicro/alloc-3.as 18 17.7 18 18 0 1.61 asmicro/alloc-4.as 54 53.9 53 52.9 -1.85 -1.86 - asmicro/alloc-5.as 37 37 35 35 -5.41 -5.41 -- asmicro/alloc-6.as 74 73.3 72 71.9 -2.70 -1.95 - asmicro/alloc-7.as 42 41.7 42 42 0 0.68 asmicro/alloc-8.as 17 17 17 17 0 0 asmicro/alloc-9.as 17 16.9 17 17 0 0.85 asmicro/arguments-1.as 839 836 840 836.4 0.12 0.05 asmicro/arguments-2.as 461 458.6 460 459.3 -0.22 0.16 asmicro/arguments-3.as 22 22 22 22 0 0 asmicro/arguments-4.as 31 31 31 31 0 0 asmicro/array-1.as 2427 2419 2435 2429.9 0.33 0.45 asmicro/array-2.as 631 628.4 632 629.6 0.16 0.18 asmicro/array-pop-1.as 397 391.9 396 392.4 -0.25 0.15 asmicro/array-push-1.as 296 294.7 294 292.9 -0.68 -0.63 asmicro/array-shift-1.as 152 151 154 152.3 1.32 0.85 + asmicro/array-slice-1.as 20 19 21 20.4 5 7.52 asmicro/array-sort-1.as 29 28.9 29 29 0 0.50 asmicro/array-sort-2.as 2 2 2 2 0 0 asmicro/array-sort-3.as 21 21 21 21 0 0 asmicro/array-sort-4.as 10 10 10 10 0 0 asmicro/array-unshift-1.as 171 170.4 170 169 -0.58 -0.84 asmicro/closedvar-read-1.as 4692 4680.9 4687 4670.6 -0.11 -0.22 asmicro/closedvar-write-1.as 2739 2714.7 2738 2734.4 -0.04 0.73 asmicro/closedvar-write-2.as 2733 2722.6 2742 2738.9 0.33 0.60 asmicro/do-1.as 4690 4675.4 4681 4669.9 -0.19 -0.12 asmicro/for-1.as 4683 4663.1 4690 4666.7 0.15 0.08 asmicro/for-2.as 2849 2838.7 2855 2841 0.21 0.08 asmicro/for-3.as 2988 2982.9 2980 2967.4 -0.27 -0.52 asmicro/for-in-1.as 476 474.3 481 478.7 1.05 0.93 + asmicro/for-in-2.as 184 183.6 190 189.1 3.26 3.04 + asmicro/funcall-1.as 368 367 368 365.7 0 -0.35 asmicro/funcall-2.as 250 248.9 255 254.1 2 2.12 + asmicro/funcall-3.as 362 360.4 367 365.3 1.38 1.35 + asmicro/funcall-4.as 118 117.4 112 110.1 -5.08 -6.20 -- asmicro/globalvar-read-1.as 4740 4687.4 4742 4705.6 0.04 0.39 asmicro/globalvar-write-1.as 2723 2705.6 2715 2697.3 -0.29 -0.31 asmicro/isNaN-1.as 569 562 572 561.4 0.53 -0.10 smicro/lookup-array-fetch-1.as 851 840.7 851 844.6 0 0.46 asmicro/lookup-array-in-1.as 1911 1897.7 1888 1871.9 -1.20 -1.36 - cro/lookup-negindex-array-1.as 511 508 510 508.1 -0.20 0.03 cro/lookup-negindex-array-2.as 441 438.3 438 433.7 -0.68 -1.04 ro/lookup-negindex-object-1.as 527 523.4 525 522 -0.38 -0.27 ro/lookup-negindex-object-2.as 492 489.7 493 487.4 0.20 -0.47 micro/lookup-object-fetch-1.as 940 935.1 935 930 -0.53 -0.55 asmicro/lookup-object-in-1.as 1551 1545 1559 1551.3 0.52 0.41 asmicro/number-toString-1.as 6 6 6 6 0 0 asmicro/number-toString-2.as 65 64.9 65 64.3 0 -0.88 asmicro/oop-1.as 4 4 4 4 0 0 asmicro/parseFloat-1.as 82 78 81 78.6 -1.22 0.73 asmicro/parseInt-1.as 194 189.1 195 191.4 0.52 1.21 asmicro/regex-exec-1.as 67 66 67 65.6 0 -0.65 asmicro/regex-exec-2.as 78 76.6 76 75.4 -2.56 -1.49 asmicro/regex-exec-3.as 136 135.1 133 132.4 -2.21 -2.01 - asmicro/regex-exec-4.as 309 307.6 309 307.3 0 -0.09 asmicro/restarg-1.as 834 823.7 839 812.4 0.60 -1.37 asmicro/restarg-2.as 463 453 465 457.9 0.43 1.07 asmicro/restarg-3.as 42 42 42 41.7 0 -0.68 asmicro/restarg-4.as 31 30.1 31 30.6 0 1.42 asmicro/string-casechange-1.as 25 24.4 24 24 -4 -1.75 - asmicro/string-casechange-2.as 24 24 25 24.7 4.17 2.98 + asmicro/string-charAt-1.as 562 554.6 563 550.7 0.18 -0.70 asmicro/string-charAt-2.as 66 65.6 66 65.7 0 0.22 asmicro/string-charCodeAt-1.as 533 523.6 536 526.7 0.56 0.60 asmicro/string-charCodeAt-2.as 530 519.4 527 519 -0.57 -0.08 micro/string-fromCharCode-1.as 331 327.6 333 331.1 0.60 1.09 micro/string-fromCharCode-2.as 61 59.7 61 60.4 0 1.20 asmicro/string-indexOf-1.as 210 205.1 210 201.7 0 -1.67 asmicro/string-indexOf-2.as 142 137.1 140 138.7 -1.41 1.15 asmicro/string-indexOf-3.as 75 74.3 75 74.4 0 0.19 smicro/string-lastIndexOf-1.as 635 627 638 627.4 0.47 0.07 smicro/string-lastIndexOf-2.as 142 141.7 142 141.7 0 0 smicro/string-lastIndexOf-3.as 433 429.7 432 430.3 -0.23 0.13 asmicro/string-slice-1.as 119 118.1 117 116.1 -1.68 -1.69 - asmicro/string-split-1.as 9 9 10 9.7 11.11 7.94 ++ asmicro/string-split-2.as 9 9 9 9 0 0 asmicro/string-substring-1.as 125 124.3 121 119.4 -3.20 -3.91 - asmicro/switch-1.as 993 979 996 987.3 0.30 0.85 asmicro/switch-2.as 47 46.7 46 45.4 -2.13 -2.75 - asmicro/switch-3.as 53 52.9 53 52.4 0 -0.81 asmicro/try-1.as 236 234.6 235 233.7 -0.42 -0.37 asmicro/try-2.as 16 16 17 16.4 6.25 2.68 ++ asmicro/try-3.as 59 58.4 60 60 1.69 2.69 + asmicro/vector-push-1.as 48 48 48 47.9 0 -0.30 asmicro/while-1.as 4670 4626.7 4682 4650.3 0.26 0.51 Metric: time jsbench/Crypt.as 3432 3438.7 3456 3465 -0.70 -0.76 - jsbench/Euler.as 6972 7014.1 6874 6924.6 1.41 1.28 + jsbench/FFT.as 7679 7739.6 7595 7693.3 1.09 0.60 jsbench/HeapSort.as 2947 2956.3 2951 2976.7 -0.14 -0.69 jsbench/LUFact.as 8058 8096.6 8031 8075.6 0.34 0.26 jsbench/Moldyn.as 9359 9508.7 9069 9127.3 3.10 4.01 + jsbench/RayTracer.as 7135 7263.3 7522 7621.4 -5.42 -4.93 -- jsbench/SOR.as 31829 32246.1 32078 32850.9 -0.78 -1.88 jsbench/Series.as 8097 8155.9 8102 8154 -0.06 0.02 jsbench/SparseMatmult.as 13796 13968 13871 13988.3 -0.54 -0.15 jsbench/typed/Crypt.as 859 864.6 844 848.4 1.75 1.87 + jsbench/typed/Euler.as 9116 9171.1 9018 9142 1.08 0.32 jsbench/typed/FFT.as 4524 4681.6 4576 4695.4 -1.15 -0.30 jsbench/typed/HeapSort.as 1595 1646.9 1617 1647.7 -1.38 -0.05 jsbench/typed/LUFact.as 8675 8817 8660 8780.9 0.17 0.41 jsbench/typed/Moldyn.as 4150 4169.1 3973 4007.6 4.27 3.88 + jsbench/typed/RayTracer.as 1110 1129.3 1104 1111.9 0.54 1.54 jsbench/typed/SOR.as 24205 24327.4 23793 24081 1.70 1.01 + jsbench/typed/Series.as 7054 7185.6 7051 7213.4 0.04 -0.39 jsbench/typed/SparseMatmult.as 2966 2997.3 2940 2984.3 0.88 0.43 Metric: v8 custom v8 normalized metric (hardcoded in the test) jsmicro/alloc-1.as 43 41.3 43 41.9 0 1.38 jsmicro/alloc-10.as 15 14.6 15 14.7 0 0.98 jsmicro/alloc-11.as 13 12.9 14 14 7.69 8.89 ++ jsmicro/alloc-12.as 8 8 8 8 0 0 jsmicro/alloc-13.as 76 74.3 73 72.4 -3.95 -2.50 - jsmicro/alloc-14.as 66 64.3 65 63.4 -1.52 -1.33 jsmicro/alloc-2.as 21 19.6 21 20 0 2.19 jsmicro/alloc-3.as 17 16.4 17 16.3 0 -0.87 jsmicro/alloc-4.as 50 49.4 50 48.4 0 -2.02 jsmicro/alloc-5.as 35 34.4 33 33 -5.71 -4.15 -- jsmicro/alloc-6.as 60 58.1 60 58.9 0 1.23 jsmicro/alloc-7.as 41 40.9 41 41 0 0.35 jsmicro/alloc-8.as 16 16 17 17 6.25 6.25 ++ jsmicro/alloc-9.as 16 16 17 16.9 6.25 5.36 ++ jsmicro/arguments-1.as 144 141.4 141 141 -2.08 -0.30 jsmicro/arguments-2.as 103 103 102 101.6 -0.97 -1.39 - jsmicro/arguments-3.as 19 19 19 19 0 0 jsmicro/array-1.as 393 391.9 392 390.9 -0.25 -0.26 jsmicro/array-2.as 285 283.4 286 279.7 0.35 -1.31 jsmicro/array-pop-1.as 70 69.3 71 69.7 1.43 0.62 jsmicro/array-push-1.as 49 47.9 49 48.1 0 0.60 jsmicro/array-shift-1.as 60 59 58 56.7 -3.33 -3.87 jsmicro/array-slice-1.as 16 16 17 16.7 6.25 4.46 + jsmicro/array-sort-1.as 27 27 27 27 0 0 jsmicro/array-sort-2.as 2 2 2 2 0 0 jsmicro/array-sort-3.as 21 20.4 21 20.1 0 -1.40 jsmicro/array-sort-4.as 11 11 11 11 0 0 jsmicro/array-unshift-1.as 25 24.7 25 24.9 0 0.58 jsmicro/closedvar-read-1.as 556 553.6 559 554.9 0.54 0.23 jsmicro/closedvar-write-1.as 434 431.3 432 430 -0.46 -0.30 jsmicro/closedvar-write-2.as 436 431.4 433 431.4 -0.69 0 jsmicro/do-1.as 567 544.4 570 558.7 0.53 2.62 jsmicro/for-1.as 566 557.9 573 561.3 1.24 0.61 jsmicro/for-2.as 191 188.3 193 188.1 1.05 -0.08 jsmicro/for-3.as 94 92.7 95 92.1 1.06 -0.62 jsmicro/for-in-1.as 320 311.7 320 316.3 0 1.47 jsmicro/for-in-2.as 157 155.7 153 150.9 -2.55 -3.12 - jsmicro/funcall-1.as 220 213.9 219 214.3 -0.45 0.20 jsmicro/funcall-2.as 214 211 212 210.6 -0.93 -0.20 jsmicro/funcall-3.as 213 208.4 213 207.9 0 -0.27 jsmicro/funcall-4.as 1500 1478.3 1502 1482.1 0.13 0.26 jsmicro/globalvar-read-1.as 563 556.9 567 555 0.71 -0.33 jsmicro/globalvar-write-1.as 438 433.4 441 434.4 0.68 0.23 jsmicro/isNaN-1.as 263 259.1 269 266 2.28 2.65 smicro/lookup-array-fetch-1.as 685 682.3 685 676.4 0 -0.86 jsmicro/lookup-array-in-1.as 1055 1032.6 1036 1017.1 -1.80 -1.49 micro/lookup-object-fetch-1.as 736 723.3 733 721 -0.41 -0.32 jsmicro/lookup-object-in-1.as 949 923.4 943 933.3 -0.63 1.07 jsmicro/number-toString-1.as 6 6 6 6 0 0 jsmicro/number-toString-2.as 56 55.1 55 54.7 -1.79 -0.78 - jsmicro/oop-1.as 4 3.9 4 3.7 0 -3.70 jsmicro/parseFloat-1.as 47 44.9 46 43.6 -2.13 -2.87 jsmicro/parseInt-1.as 130 126.4 130 127.9 0 1.13 jsmicro/regex-exec-1.as 58 56.3 57 55.3 -1.72 -1.78 jsmicro/regex-exec-2.as 69 68.4 69 67.9 0 -0.84 jsmicro/regex-exec-3.as 119 114.7 113 111.1 -5.04 -3.11 jsmicro/regex-exec-4.as 256 253 260 257.3 1.56 1.69 jsmicro/string-casechange-1.as 17 16.3 17 17 0 4.39 jsmicro/string-casechange-2.as 17 16.7 17 17 0 1.71 jsmicro/string-charAt-1.as 95 94.4 95 94.7 0 0.30 jsmicro/string-charAt-2.as 40 39.4 42 42 5 6.52 + jsmicro/string-charCodeAt-1.as 88 87.4 88 87.4 0 0 jsmicro/string-charCodeAt-2.as 87 86.6 89 88.6 2.30 2.31 + micro/string-fromCharCode-1.as 88 85 87 84.3 -1.14 -0.84 micro/string-fromCharCode-2.as 40 38.7 40 39.6 0 2.21 micro/string-fromCharCode-3.as 70 69.3 69 68.7 -1.43 -0.82 - micro/string-fromCharCode-4.as 73 72.9 71 71 -2.74 -2.55 - jsmicro/string-indexOf-1.as 82 80.4 83 82.6 1.22 2.66 jsmicro/string-indexOf-2.as 57 57 56 55.7 -1.75 -2.26 - jsmicro/string-indexOf-3.as 42 42 44 43.9 4.76 4.42 + smicro/string-lastIndexOf-1.as 83 82.7 83 83 0 0.35 smicro/string-lastIndexOf-2.as 57 56.9 57 55.6 0 -2.26 smicro/string-lastIndexOf-3.as 78 77.9 79 78.4 1.28 0.73 + jsmicro/string-slice-1.as 51 51 51 51 0 0 jsmicro/string-split-1.as 9 8.1 9 9 0 10.53 jsmicro/string-split-2.as 8 8 9 8 12.50 0 + jsmicro/string-substring-1.as 54 53.9 53 53 -1.85 -1.59 - jsmicro/switch-1.as 118 117.1 117 117 -0.85 -0.12 - jsmicro/switch-2.as 42 42 43 42.6 2.38 1.36 + jsmicro/switch-3.as 48 47.1 48 47.6 0 0.91 jsmicro/try-1.as 161 160.3 162 161.4 0.62 0.71 jsmicro/try-2.as 16 16 16 16 0 0 jsmicro/try-3.as 47 47 47 47 0 0 jsmicro/while-1.as 574 566.7 574 571 0 0.76 Metric: time e/describetype/desctypeperf.as 486 489.6 470 473.9 3.29 3.21 + anguage/e4x/addingToXMLList.as 17 19.1 16 18.6 5.88 2.99 ge/e4x/appendChildAndString.as 43 43.4 43 45 0 -3.62 concatenatingStringsFromE4X.as 5 7 6 7.1 -20 -2.04 x/simpleStringConcatenation.as 1 1.7 1 1.7 0 0 /e4x/usingAppendChildAndE4X.as 42 44.7 42 45.9 0 -2.56 nguage/string/append_concat.as 70 71.3 71 73.1 -1.43 -2.61 ge/string/append_equal_plus.as 58 59.6 59 59.7 -1.72 -0.24 ge/string/append_plus_equal.as 58 59.7 58 59.6 0 0.24 language/string/charAt.as 188 190.3 185 186.9 1.60 1.80 language/string/charCodeAt.as 212 213.9 214 216.3 -0.94 -1.14 language/string/indexOf.as 421 423.4 421 426 0 -0.61 language/string/lastIndexOf.as 174 176.1 173 175.1 0.57 0.57 language/string/replace.as 402 406.9 408 414.1 -1.49 -1.79 language/string/replace2.as 723 727.7 733 736 -1.38 -1.14 - language/string/search.as 29 30 29 30.9 0 -2.86 language/string/slice.as 274 287.9 278 285.1 -1.46 0.94 language/string/split.as 401 403.4 398 402.1 0.75 0.32 ring/static_ascii_array_100.as 846 849.7 843 848.6 0.35 0.13 tring/static_ascii_array_50.as 829 832.7 828 832.1 0.12 0.07 ing/static_latin1_array_100.as 1667 1683.9 1668 1671.7 -0.06 0.72 ring/static_latin1_array_50.as 831 832.7 831 834.9 0 -0.26 language/string/substr.as 200 201 200 201.7 0 -0.36 language/string/substring.as 188 189.4 193 194.7 -2.66 -2.79 - /string/typed/append_concat.as 62 64 62 63.4 0 0.89 ing/typed/append_equal_plus.as 52 54 53 53.4 -1.92 1.06 ing/typed/append_plus_equal.as 52 54.4 52 53.9 0 1.05 anguage/string/typed/charAt.as 42 43.3 42 42.7 0 1.32 age/string/typed/charCodeAt.as 42 43.6 43 43.7 -2.38 -0.33 nguage/string/typed/indexOf.as 421 422.4 421 423.3 0 -0.20 ge/string/typed/lastIndexOf.as 173 175.4 174 176.6 -0.58 -0.65 nguage/string/typed/replace.as 399 402.3 441 448.1 -10.53 -11.40 -- guage/string/typed/replace2.as 723 726.1 734 740.4 -1.52 -1.97 - anguage/string/typed/search.as 29 29.3 28 30.3 3.45 -3.41 language/string/typed/slice.as 167 170.1 171 171.9 -2.40 -1.01 - language/string/typed/split.as 399 401.1 395 397.9 1.00 0.82 + anguage/string/typed/substr.as 126 126.9 128 130.4 -1.59 -2.82 uage/string/typed/substring.as 118 119.6 124 125.7 -5.08 -5.14 - misc/boids.as 1498 1507.6 1502 1506.1 -0.27 0.09 misc/boidshack.as 424 425.4 426 428.6 -0.47 -0.74 misc/gameoflife.as 2308 2314.4 2304 2312.3 0.17 0.09 misc/primes.as 4289 4312.1 4278 4300.4 0.26 0.27 mmgc/gcbench.as 2686 2696.3 2539 2609 5.47 3.24 + mmgc/ofib-rc.as 228 231.1 227 228.4 0.44 1.17 mmgc/ofib.as 1063 1071 1028 1055.3 3.29 1.47 + mmgc/sfib.as 346 360.9 349 353 -0.87 2.18 scimark/FFT.as 2602 2641.3 2592 2623.9 0.38 0.66 scimark/LU.as 2800 2843 2778 2815 0.79 0.98 scimark/MonteCarlo.as 2543 2564.1 2513 2603.9 1.18 -1.55 scimark/SOR.as 2569 2607.4 2550 2588.6 0.74 0.72 scimark/SparseCompRow.as 89 90.7 89 92.6 0 -2.05 nspider/access-binary-trees.as 29 30.7 29 30 0 2.33 sunspider/access-fannkuch.as 67 68.9 68 69 -1.49 -0.21 sunspider/access-nbody.as 77 78.3 76 78.7 1.30 -0.55 sunspider/access-nsieve.as 41 43.1 41 42.9 0 0.66 er/bitops-3bit-bits-in-byte.as 11 13.3 10 11.9 9.09 10.75 nspider/bitops-bits-in-byte.as 26 26.6 26 28 0 -5.38 unspider/bitops-bitwise-and.as 169 172.1 168 169.1 0.59 1.74 unspider/bitops-nsieve-bits.as 34 36.3 34 34.6 0 4.72 pider/controlflow-recursive.as 15 15.6 14 15.1 6.67 2.75 sunspider/crypto-aes.as 33 35 33 36 0 -2.86 sunspider/crypto-md5.as 16 17.1 16 18.4 0 -7.50 sunspider/crypto-sha1.as 16 18.6 16 18.7 0 -0.77 sunspider/date-format-tofte.as 271 278.3 275 278.1 -1.48 0.05 sunspider/math-cordic.as 51 53.4 52 53.7 -1.96 -0.53 sunspider/math-partial-sums.as 156 160.1 158 159.6 -1.28 0.36 unspider/math-spectral-norm.as 31 31.6 30 31.9 3.23 -0.90 sunspider/s3d-cube.as 67 68.4 67 69.9 0 -2.09 sunspider/s3d-morph.as 36 38.1 37 38 -2.78 0.37 sunspider/s3d-raytrace.as 68 70.1 69 70.9 -1.47 -1.02 sunspider/string-fasta.as 75 78.3 74 78 1.33 0.36 unspider/string-unpack-code.as 144 149.6 144 148.3 0 0.86 pider/string-validate-input.as 37 38.9 37 38.7 0 0.37 der/as3/access-binary-trees.as 7 8.6 8 10.3 -14.29 -20.00 nspider/as3/access-fannkuch.as 43 45.1 43 45.6 0 -0.95 sunspider/as3/access-nbody.as 5 5.4 5 6 0 -10.53 sunspider/as3/access-nsieve.as 28 29.3 29 29.9 -3.57 -1.95 s3/bitops-3bit-bits-in-byte.as 4 4.6 4 5.1 0 -12.50 der/as3/bitops-bits-in-byte.as 7 8.3 7 7.7 0 6.90 ider/as3/bitops-bitwise-and.as 1 1.6 1 1.6 0 0 ider/as3/bitops-nsieve-bits.as 22 23 22 23.3 0 -1.24 r/as3/controlflow-recursive.as 3 3.6 3 4.7 0 -32.00 sunspider/as3/crypto-aes.as 26 28.3 25 26.3 3.85 7.07 sunspider/as3/crypto-md5.as 21 21.3 20 22 4.76 -3.36 sunspider/as3/crypto-sha1.as 16 17.6 16 17.1 0 2.44 pider/as3/date-format-tofte.as 258 266.3 258 265.9 0 0.16 sunspider/as3/math-cordic.as 22 24.3 21 24.3 4.55 0 pider/as3/math-partial-sums.as 50 52.9 50 51.1 0 3.24 ider/as3/math-spectral-norm.as 4 5.1 4 4.7 0 8.33 sunspider/as3/s3d-cube.as 17 19.9 17 18.9 0 5.04 sunspider/as3/s3d-morph.as 25 26.3 25 25.7 0 2.17 sunspider/as3/s3d-raytrace.as 34 36 34 36.4 0 -1.19 sunspider/as3/string-fasta.as 35 37.4 34 36 2.86 3.82 ider/as3/string-unpack-code.as 146 147.3 144 147.3 1.37 0 r/as3/string-validate-input.as 30 32 30 30.9 0 3.57 r/as3vector/access-fannkuch.as 30 32.4 30 30.9 0 4.85 ider/as3vector/access-nbody.as 5 5 5 5 0 0 der/as3vector/access-nsieve.as 11 11.1 11 11.6 0 -3.85 s3vector/bitops-nsieve-bits.as 7 8.3 7 7.9 0 5.17 pider/as3vector/math-cordic.as 13 13.9 13 13.9 0 0 s3vector/math-spectral-norm.as 13 16.4 13 15.7 0 4.35 unspider/as3vector/s3d-cube.as 15 17 15 17.4 0 -2.52 nspider/as3vector/s3d-morph.as 21 22.6 22 24.7 -4.76 -9.49 ider/as3vector/string-fasta.as 37 38.9 38 40.3 -2.70 -3.68 ector/string-validate-input.as 31 31.9 30 32.3 3.23 -1.35 Metric: v8 custom v8 normalized metric (hardcoded in the test) v8/crypto.as 472 470 472 466.7 0 -0.70 v8/deltablue.as 1840 1793.3 1842 1819.9 0.11 1.48 v8/earley-boyer.as 1177 1157.1 1187 1170.4 0.85 1.15 v8/raytrace.as 3357 3316.1 3380 3294.7 0.69 -0.65 v8/richards.as 1198 1183.7 1195 1186.4 -0.25 0.23 v8/typed/crypto.as 479 472.7 482 476.3 0.63 0.76 v8/typed/deltablue.as 2955 2932 3001 2986.4 1.56 1.86 + v8/typed/earley-boyer.as 1176 1147.6 1179 1120.3 0.26 -2.38 v8/typed/raytrace.as 7402 7380.7 7454 7433.7 0.70 0.72 + v8/typed/richards.as 2304 2295.6 2299 2274.6 -0.22 -0.91 v8.5/js/crypto.as 432 428.3 433 425.6 0.23 -0.63 v8.5/js/deltablue.as 366 362 365 362.7 -0.27 0.20 v8.5/js/earley-boyer.as 1155 1144.1 1163 1148.1 0.69 0.35 v8.5/js/raytrace.as 768 751.7 781 773.1 1.69 2.85 v8.5/js/regexp.as 102 101.6 101 100.1 -0.98 -1.49 v8.5/js/richards.as 306 304 308 305.4 0.65 0.47 v8.5/js/splay.as 944 915.4 952 926.1 0.85 1.17 v8.5/optimized/crypto.as 4168 4132 4175 4121.4 0.17 -0.26 v8.5/optimized/deltablue.as 3713 3667.1 3717 3661.9 0.11 -0.14 v8.5/optimized/earley-boyer.as 1147 1120.3 1159 1135 1.05 1.31 v8.5/optimized/raytrace.as 8874 8769.6 8958 8903.1 0.95 1.52 v8.5/optimized/regexp.as 103 100.9 101 98.7 -1.94 -2.24 v8.5/optimized/richards.as 4234 4177 4280 4196 1.09 0.45 v8.5/optimized/splay.as 6370 6244.9 6287 6140.1 -1.30 -1.68 v8.5/typed/crypto.as 2628 2592.7 2627 2610.1 -0.04 0.67 v8.5/typed/deltablue.as 4029 3956.4 4086 3997.9 1.41 1.05 v8.5/typed/earley-boyer.as 1152 1131.9 1170 1142 1.56 0.90 v8.5/typed/raytrace.as 8861 8805.9 8928 8872.1 0.76 0.75 v8.5/typed/regexp.as 101 100.5 100 99.4 -0.99 -1.07 v8.5/typed/richards.as 4275 4206.3 4291 4232.3 0.37 0.62 v8.5/typed/splay.as 1189 1168.9 1181 1167.4 -0.67 -0.12 v8.5/untyped/crypto.as 454 442.1 458 453.6 0.88 2.58 v8.5/untyped/deltablue.as 1863 1832.7 1884 1866.1 1.13 1.82 v8.5/untyped/earley-boyer.as 1158 1142 1161 1140.9 0.26 -0.10 v8.5/untyped/raytrace.as 3530 3472.9 3516 3477.6 -0.40 0.14 v8.5/untyped/regexp.as 102 100.8 100 98.3 -1.96 -2.51 v8.5/untyped/richards.as 494 489.7 490 487.1 -0.81 -0.53 v8.5/untyped/splay.as 1124 1091.7 1107 1085.4 -1.51 -0.58
sigh; did not pass sandbox. investigating.
fixed to appease buildbot. My original goal here was to ensure that the template functions I was adding would only ever be used within that file == so I made the functions static. At the same time, I wanted to friend the new template functions so that they could access the private member functions (since conceptually all these functions are are an attempt to capture a common idiom and share it amongst all of the classes _without_ using virtual method dispatch). But I do not want to take the time right now to figure out the right way to express this in a standard-compliant fashion (or find out that the standard disallows it).
Attachment #467588 - Attachment is obsolete: true
Comment on attachment 467586 [details] [diff] [review] refactor existing pagemap for later revision. the sandbox build passed; am assuming the tests will as well. Hitting sack, so I'm pre-emptively filing a review request with Lars (but it would be best Lars if you could double check that the sandbox build I filed at 19:28:23 EST actually ran through the sandbox test suite successfully.)
Attachment #467586 - Flags: review?(lhansen)
Comment on attachment 467641 [details] [diff] [review] added sparse PageMap implementations. (ditto; see previous comment)
Attachment #467641 - Flags: review?(lhansen)
(In reply to comment #38) > Comment on attachment 467586 [details] [diff] [review] > refactor existing pagemap for later revision. > > the sandbox build passed; am assuming the tests will as well. Hitting sack, so > I'm pre-emptively filing a review request with Lars (but it would be best Lars > if you could double check that the sandbox build I filed at 19:28:23 EST > actually ran through the sandbox test suite successfully.) The buildbot labeling of runs is not good but if I interpret it correctly it compiled and passed smokes but there were a couple of test failures on one platform, with a sampling test not passing.
(In reply to comment #40) > (In reply to comment #38) > > Comment on attachment 467586 [details] [diff] [review] [details] > > refactor existing pagemap for later revision. > > > > the sandbox build passed; am assuming the tests will as well. Hitting sack, so > > I'm pre-emptively filing a review request with Lars (but it would be best Lars > > if you could double check that the sandbox build I filed at 19:28:23 EST > > actually ran through the sandbox test suite successfully.) > > The buildbot labeling of runs is not good but if I interpret it correctly it > compiled and passed smokes but there were a couple of test failures on one > platform, with a sampling test not passing. You're referring to this, right? http://p01fpcapp01.corp.adobe.com:8760/builders/linux64-test-sandbox/builds/132 In that, I see these failures on Linux 64: == Testsuite_Release-jit == FAILURES: as3/Statements/Exceptions/UserDefinedErrorsPackageWithoutMatchingCatch.abc : unexpected exit code expected:0 actual:139 Signal Name: Not Found FAILED! as3/Statements/Exceptions/UserDefinedErrorsPackageWithoutMatchingCatch.abc : captured output: Segmentation fault == Testsuite_Debug == FAILURES: as3/sampling/StringMaster.abc : unexpected exit code expected:0 actual:133 Signal Name: Not Found FAILED! as3/sampling/StringMaster.abc : captured output: Trace/breakpoint trap So I guess these are the failures you are referring to... I will investigate now. (Hopefully I will be able to replicate.)
(In reply to comment #41) > I will investigate now. (Hopefully I will be able to replicate.) I was not able to replicate either on them on my Linux64 VMware image. Will try connecting to a build machine and see if I can replicate there...
(In reply to comment #42) > (In reply to comment #41) > > I will investigate now. (Hopefully I will be able to replicate.) > > I was not able to replicate either on them on my Linux64 VMware image. Will > try connecting to a build machine and see if I can replicate there... nope, could not replicate even on the build machine itself. Intermittent failure? Mrrh... I am going to shift my effort to investigating the larger performance regressions noted in comment 34 and comment 35.
I have to run, but I spent the remainder of the day doing 20-iteration runs of the worst of the bunch in the 64-bit benchmarks above. The results (see attachment) tell me that this is all in the noise (look at the stddev's in the attachment). (Caveat: the culprits measurements here were done on my work laptop; the original measurements were done on Dido, my personal machine). ANyway, it all means that I don't see the numbers above as a reason not to land, at least, not on their own.
(If you open up the Excel spreadsheet, note that the columns with the original data have been hidden, as to focus initial attention on the mean values of that data.) Executive summary: On Android, things on _average_ tend to get improve a tiny bit w.r.t. both time and space. One exception is GammaBros, which regressed a little in time and space. In all cases, it seems like its just due to one semi-extreme outlier occurring in the baseline data. (If I had more time I might do more iterations; its not absurd to hypothesize in the meantime that the sparse pagemap structure has a little less noise in its max-mem than the baseline does...) If you take out the outliers, then the results are not as rosy, but they aren't deal-breakers either, IMO. The one remaining case of interest is XmlParse, whose max memory improves by quite a bit, and its not just caused by an outlier in the baseline data; it is actually quite regular. Anyway, I have not seen anything here that makes me think the PageMap code needs further revision. BASELINE SPARSE PAGEMAP XmlParse XmlParse avg ms: 326 avg ms: 302.6 avg kb: 27786.4 avg kb: 22376 YahooFinance YahooFinance avg ms: 353.2 avg ms: 323.2 avg kb: 12724.8 avg kb: 12819.2 WallE WallE avg ms: 16786.8 avg ms: 14285.4 avg kb: 44212 avg kb: 38639.2 Coverflow Coverflow avg fps: 9.12 avg fps: 9.1 avg kb: 71220.8 avg kb: 71141.6 avg init: 71220.8 avg init: 71141.6 ScrollingCJK ScrollingCJK avg fps: 4.166 avg fps: 4.392 avg kb: 17265.6 avg kb: 14836.8 Economist avg kb: 25521 TowerOfDefense TowerOfDefense avg fps: 18.94 avg fps: 19.02 avg kb: 32349.6 avg kb: 29518.4 GammaBros GammaBros avg fps: 23.06 avg fps: 21.9 avg kb: 36152.8 avg kb: 37029.6
(In reply to comment #45) > Coverflow Coverflow > avg fps: 9.12 avg fps: 9.1 > avg kb: 71220.8 avg kb: 71141.6 > avg init: 71220.8 avg init: 71141.6 This can't be right; I must have changed the formula some bad way after the fact. Will look into right now.
fixed formula bug noted in previous comment. New values for that entry (all its saying is that there's one more dimension of time on which the sparse page map seems to improve matters, for some reason): Coverflow Coverflow avg fps: 9.12 avg fps: 9.1 avg kb: 71220.8 avg kb: 71141.6 avg init ms: 2447.6 avg init ms: 2326.8
Attachment #469602 - Attachment is obsolete: true
Comment on attachment 467586 [details] [diff] [review] refactor existing pagemap for later revision. PageMap.h: Nit: if PageMap::kPageSize must be the same as GCHeap::kBlockSize, could we not use the latter to initialize the former so that there's no space for confusion? Ditto kPageShift? kPageSize is actually a bit curious because it's not used anywhere except to assert that it's the same as GCHeap::kBlockSize. kPageShift isn't used anywhere at all except to assert that it corresponds to kPageSize. Nit: unusual (for Tamarin anyway) for constructor declaration to follow declaration of other member functions in the definition of PageMap. Nit: in interface to ExpandSetAll, naming the parameter "numpages" rather than "np" would create smaller cognitive load. (Compare to ClearAddrs, EnsureCapacity.) PageMap-inlines.h: Bug? DestroyPageMapVia does not set pageMap to NULL after freeing whatever it points to. Since PageMap.h went to the trouble of defining kPageShift, it could be used here rather than being hardcoded as '12'. AddrToVal references GCHeap::kBlockSize. Do you mean PageMap::kPageSize? This is anything but clear. (Yes, I recognize it's old code, and yes, I understand that what it's trying to do is to ensure that the index is within the bounds of the largest possible page map on the architecture and so the assert is probably correct - after serious reflection. A DEBUG-mode predicate with a good name would rule out most confusion.) Also, the provocative computation "64*65536" would not suffer a lot of damage from being documented or expanded as more easily recognizable factors, or documented lightly. Ditto the 64 by itself in the 32-bit case. PageMap.cpp: Nit: house style for the constructor would be closer to Uniform::Uniform() : memStart(MAX_UINTPTR) , memEnd(0) , pageMap(NULL) {} that what you have. Same comments apply to AddrSet as applied to AddrToVal, above: which block size do you really want to use? In EnsureCapacity, is it GCHeap::kBlockSize you want to test or PageMap::kPageSize? Here I suspect it's the former but I don't know (especially since they have the same value now and I can't work backward from a correct answer to derive the correct block size and match it to a definition). Bug? ClearAddrs assumes AddrIsMappable for its range but that's not documented. Nit: In general I think the predicates that write to the pageMap need to ensure that the writes are within bounds, in DEBUG mode. I know this is old code we're trying to ditch, just sayin'. R+ provisional on the bugs being addressed, bonus points for addressing some of the other issues too (no re-review required).
Attachment #467586 - Flags: review?(lhansen) → review+
Comment on attachment 467641 [details] [diff] [review] added sparse PageMap implementations. PageMap.h: Nit: We want parameter names in SimpleExpandSetAll and SimpleClearAddrs, certainly in PageMapBase, and with a blank line separating the definitions. (Names of bound variables matter :-) Are we waiting for further elaboration beyond 48 bits of virtual address, or do we expect that that will just have to happen when we need it? The discussion we've had earlier in this bug hasn't really led anywhere except to the conclusion that two tiers aren't enough. I see this patch uses kPageSize so consider the objection about its non-use in the previous patch retracted. Ditto kPageShift. PageMap-inlines.h: Nit: you're missing a cast in Tiered2::AddrToByteShiftAmt which was not caught by any compiler because this code is 32-bit only. Curiously the problem appears in Tiered4::AddrToByteShiftAmt, where the windows compiler should have complained. Maybe the (... & 3) pacifies it. In the case of Tiered2, could we use a dummy block (all kNonGC bits) to avoid NULL tests in AddrToVal and AddrClear? (IIRC the Uniform code does not allow a clear on an unmapped address anyway.) Nit: use of naked 'int' in Tiered4::LeafAddrToVal. PageMap.cpp: Nit: Tiered2::DestroyPageMapVia could usefully set array slots to NULL after freeing the storage, at least in a debug build. Nit: I see "// sigh." is still with us. I'm probably easily confused, but I see that eg tier2_pages is computed using kPageSize whereas the assertions in Tiered4::EnsureCapacity use GCHeap::kBlockSize. A comment here would clarify what it is that you're asserting. Ditto other places. Negative state variables are invariably evil and show it here: noMoreDelay is initially false, and then we test "! noMoreDelay". Say what? Oh, we're still delaying... We have an unhandled XXX: "// the +1 might be unnecessary (see XXX w/ Uniform::EnsureCapacity)"
Attachment #467641 - Flags: review?(lhansen) → review+
(In reply to comment #49) > Are we waiting for further elaboration beyond 48 bits of virtual address, or do > we expect that that will just have to happen when we need it? The discussion > we've had earlier in this bug hasn't really led anywhere except to the > conclusion that two tiers aren't enough. Right, some of the action items from the earlier meeting were: "We need a story for a full 64-bit address space (beyond 48 bits). It need not be an implemented story, necessarily. We need to ponder where we may encounter a full 64-bit address space. Action items: - Document / compute / prototype a 64-bit story - Figure out what other 64-bit architectures there are that we might encounter (PPC64? POWER? SPARC?)" The two options I see are either: * to redistribute the bits of the three tiered version to cover a 64-bit address space, or * to generalize it to four tiers. I had thought earlier that three tiers might not be enough, but that was mostly intuition and I have not done a thorough analysis yet. I think the mental exercise Lars and I went through for the two tier version was good preparation for a similar analysis of the three tiered version. I also suspect the delaying and caching strategies could mean that three tiers versus four tiers simply may not matter. But maybe that is a naive suspicion, at least for the single element cache I am employing now. Anyway, I will work out the analysis of whether bit-redistribution could work for a 64-bit space. Where do you want it documented: as a comment on this ticket, or as comments in the code, or a wiki-page, or ... ?
A comment in the code is probably best.
(In reply to comment #51) > A comment in the code is probably best. Okay. I will address your comments today. (Aside: I am embarrassed that I missed the "sigh"; I killed off one of them at some point but I guess missed the other. Probably should be more embarrassed about the XXX that remained.) On that note, I am not sure I am going to have time this week (and thus for quite a while) to handle the remaining XXX. I am paranoid about introducing a bug at this late stage. Perhaps just change to a comment to say the question needs to be resolved and put either this bug # or a different follow-up bug #? Finally, I assume that no re-review is necessary for the second patch as well?
(In reply to comment #52) > > On that note, I am not sure I am going to have time this week (and thus for > quite a while) to handle the remaining XXX. I am paranoid about introducing a > bug at this late stage. Perhaps just change to a comment to say the question > needs to be resolved and put either this bug # or a different follow-up bug #? Sure. > Finally, I assume that no re-review is necessary for the second patch as well? Yup.
(In reply to comment #48) > Comment on attachment 467586 [details] [diff] [review] > > AddrToVal references GCHeap::kBlockSize. Do you mean PageMap::kPageSize? This > is anything but clear. (Yes, I recognize it's old code, and yes, I understand > that what it's trying to do is to ensure that the index is within the bounds of > the largest possible page map on the architecture and so the assert is probably > correct - after serious reflection. A DEBUG-mode predicate with a good name > would rule out most confusion.) Also, the provocative computation "64*65536" > would not suffer a lot of damage from being documented or expanded as more > easily recognizable factors, or documented lightly. Ditto the 64 by itself in > the 32-bit case. Hmm, yes, I was just cut-and-pasting the old code here, in the spirit of pure refactoring. Once I got the code running, I verified by eye that it was still a pure refactoring, but did not attempt to spend much time interpreting details about it like how this assertion was composed. The computations here are certainly stare-worthy. I'll see what I can do to resolve this. At this point, I am pretty sure that the 64-bit version of the assertion is (and always has been) implicitly relying on the fact that our 64-bit platforms will only use a 48-bit address space. At least that's the best I can muster to explain the 65536 constant: that's 2^16; it is accounting for the extra 16-bits of address space you get when moving from a 32-bit address space to a 48-bit address space. So someone took the 32-bit version of the assertion and added a multiply by 2^16. (But other theories to the origin of this formula are welcome.) As for the origin of the 64, the numbers all work out for the values of the constants we have currently, but I'm losing faith that the assertions/computations are robust to changes to those constants. I do not see us choosing any values that would cause the assertions to fire falsely, but that doesn't excuse the situation. Again, I'll see what I can do to resolve this. Sorry that you spent so long staring at these snippets during the review.
(In reply to comment #54) > > As for the origin of the 64, the numbers all work out for the values of the > constants we have currently, but I'm losing faith that the > assertions/computations are robust to changes to those constants. I do not see > us choosing any values that would cause the assertions to fire falsely, but > that doesn't excuse the situation. Again, I'll see what I can do to resolve > this. On this note, I'm tempted to remove the reference to kBlockSize/kPageSize entirely from these assertions. As you said yourself, what this assertion ends up checking is that we stay within the largest possible pagemap; I do not think the kBlockSize/kPageSize is being used in a way that properly contributes to the check on the computed index. We might be better off with just hard-coded constants at this spot in the code (as much as I hate to consider introducing more hard-coded constants into the code base). Or maybe just a comment saying that the formulation of the assertion is quite suspect. The part where the kPageSize *does* matter is in the amount that we shift an address down to find its index; increasing the kPageSize would associate a larger block of memory with a single payload entry in the pagemap, and thus cause the shift amount used to convert an address to an index to grow. Thus the value of 'index' will fall within a tighter range. But this computation does nothing to account for that correspondence; if you were to increase the kBlocksize/kPageSize, it checks the index against a *looser* bound, on the value of 'index' not a tigher one. Am I missing something? Do you see any problems with the reasoning above?
(In reply to comment #55) > > On this note, I'm tempted to remove the reference to kBlockSize/kPageSize > entirely from these assertions. As you said yourself, what this assertion > ends up checking is that we stay within the largest possible pagemap; I do not > think the kBlockSize/kPageSize is being used in a way that properly contributes > to the check on the computed index. I think that sounds very plausible. > We might be better off with just > hard-coded constants at this spot in the code (as much as I hate to consider > introducing more hard-coded constants into the code base). Agreed, plus a comment to note how they were computed and what they represent. > Or maybe just a > comment saying that the formulation of the assertion is quite suspect. I would be reasonably happy with that as a stop-gap solution. > The part where the kPageSize *does* matter is in the amount that we shift an > address down to find its index; increasing the kPageSize would associate a > larger block of memory with a single payload entry in the pagemap, and thus > cause the shift amount used to convert an address to an index to grow. Thus the > value of 'index' will fall within a tighter range. But this computation does > nothing to account for that correspondence; if you were to increase the > kBlocksize/kPageSize, it checks the index against a *looser* bound, on the > value of 'index' not a tigher one. Excellent point. So: at least comment on the meaning and correctness of the assertions and the implications of changing page size and/or block size; replace with constants + comment is probably better. At your discretion.
(In reply to comment #49) > Nit: Tiered2::DestroyPageMapVia could usefully set array slots to NULL after > freeing the storage, at least in a debug build. I'd be willing to add code that did it in all builds, but I don't understand what the gain is of doing it in a debug-build alone. If such a change did anything at all, it seems like it would introduce the potential for deviations in behavior between release and debug. (In the bad sense.) (Another option would be to poison the array slots -- that I could understand doing only in debug builds.) Anyway, I will just clear the array slots to NULL; it should not matter since this method should only be invoked from the GC destructor.
(In reply to comment #49) > I'm probably easily confused, but I see that eg tier2_pages is computed using > kPageSize whereas the assertions in Tiered4::EnsureCapacity use > GCHeap::kBlockSize. A comment here would clarify what it is that you're > asserting. Ditto other places. Oh, this was definitely a case of me confusing myself, and then allowing that confusion leak out. I had at one point hoped to make the PageMap a member of GCHeap, and therefore I was trying to avoid putting a dependency on GCHeap::kBlockSize into the PageMap.h header (since the PageMap.h header would have to come before GCHeap.h in the series of #includes). Then I was making evil use of the equivalence between kPageSize and kBlockSize in order to double-check some things within the PageMap.h header. Later on, I scrapped the plan to put the PageMap into GCHeap. But artifacts of that early hackage remained. Thank you very much for catching this; it has forced me to put down some clarifying notes discussing the distinction between kPageSize and kBlockSize, and fix some bad choices of field/variable names to boot.
I've revised both patches, and will be attaching them in a moment. These are the two sandbox builds I ran. (I ran one for the refactoring patch on its own, and another for the combo of the two patches.) http://tamarin-builds.mozilla.org/tamarin-redux/changes/2355 http://tamarin-builds.mozilla.org/tamarin-redux/changes/2361 They look good to me so far; the latter one is not quite done with the test phase yet.
incorporates feedback from Lars. Most significant change was in the much-discussed assertion, which has been factored out, cleaned up, and significantly commented; see Uniform::IndexSaneForAddressRange I still don't have mozilla hg credentials, so ... lars, please push when you get the chance, thanks! (tagging as review just as reminder for you.)
Attachment #467586 - Attachment is obsolete: true
Attachment #471952 - Flags: review?(lhansen)
incorporates feedback from Lars. Here's what I did not address yet: * still no elaboration for when we go beyond 48-bit address space. At worst we'll add another tier, but I'm starting to come around to the belief that we might be able to make do with 3 tiers. Tommy mentioned he saw that Google has some pagemap-like open-source code that is also using a tiered structure; may want to check that out too (assuming license/copyright won't corrupt matters; obviously check that first) * no dummy block yet for Tiered2; its a good idea (I've been treating the null-check as free but do not have justification, especially for such hot methods). But its also too large a change for me to try to tackle right now. I'll open a follow-on bug for it. * this was not part of the feedback (at least not directly), but its something I meant to do today: I would like to alpha-rename tierN_pages to tierN_blocks, for all relevant N. The notion is to try to consistently refer to a page as a unit of covered-address-space, and to refer to a block as a unit of internally allocated storage in the structure. So since tierN_xxxx (where xxxx was pages) is meant to be a count of how many blocks we'll allocate from GCHeap::Alloc invocations, it really makes more sense to have the name reflect that. I still don't have mozilla hg credentials, so ... lars, please push when you get the chance, thanks! (tagging as review just as reminder for you.)
Attachment #467641 - Attachment is obsolete: true
Comment on attachment 471952 [details] [diff] [review] refactor existing pagemap for later revision. ACK.
Attachment #471952 - Flags: review?(lhansen) → review+
Pushed with tweaks to the Xcode and Visual Studio project files: tamarin-redux changeset: 5174:2cfa17d4147c
Status: ASSIGNED → RESOLVED
Closed: 15 years ago
Resolution: --- → FIXED
Patch backed out because it appears to introduce instability on Linux-64.
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
Priority: -- → P2
Target Milestone: --- → flash10.2.x-Spicy
The failing build mentioned in comment 64, I believe: http://tamarin-builds.mozilla.org/tamarin-redux/builders/linux64-test/builds/327 A relevant failure message: 1030 running ecma3/Math/e15_8_2_8.as unexpected exit code expected:0 actual:139 Signal Name: Not Found FAILED! captured output: Segmentation fault FAILED passes:0 fails:1 unexpected passes: 0 expected failures: 0 Short story: I have reproduced the failure. Long version: I have not managed to reproduce the exact failure on the test case above (at least not in 10,000 trials), but brbaker had an abc file lying around from his own investigation that appears to be a slimmed down version of e15_8_2_18.as in that same directory. I started using that and found that even then I could not consistently reproduce the problem in 10,000 trials; but 100,000 trials seems to suffice. Also, I tried choosing other pagemap variants (namely I tried the two parents of DelayT4: CacheT4 and Tiered4). As far as I can tell, the problem only arised with DelayT4, which is a promising avenue of investigation (but may also be a red herring).
(In reply to comment #66) > 1030 running ecma3/Math/e15_8_2_8.as > unexpected exit code expected:0 actual:139 Signal Name: Not Found FAILED! ... > Long version: I have not managed to reproduce the exact failure on the test > case above (at least not in 10,000 trials), The number of trials just needed to be pumped up; I see the failure when I use 100,000 trials, via for example: time for (( i=0 ; i < 100000; i++ )) ; do echo ITERATION $i; \ /tmp/pmshell-d3 ecma3/Math/e15_8_2_8.abc ; res=$? ; \ test "$res" == 0 || { echo "ExitCode: $res" ; echo ""; break; } ;\ done | tail -50
The segfault does not arise when using gdb. My printf debugging instrumentation indicates that a failed run dies before we even hit the main() procedure. I used strace to try to get some more information about how far we get into the run before the segfault arises; it happens pretty shortly after we've finished reading and have closed the avmshell executable. (Which is consistent with the indication that the segfault is happening before we get to main().)
(In reply to comment #68) > Created attachment 477269 [details] > strace output on failed iteration > > The segfault does not arise when using gdb. before anyone suggests it: yeah, I forgot about the option of analyzing a core dump. So now I'm trying to figure out how to turn on core dump generation under Ubuntu...
Core dump blames the new pagemap code, specifically: Program terminated with signal 11, Segmentation fault. #0 MMgc::PageMap::DelayT4::SetupDelayedPagemap (this=0x7fb097fec4a8, heap=0x784430, start=<value optimized out>, limit=<value optimized out>) at /home/fklockii/Dev/tamarin-redux/MMgc/PageMap.cpp:484 484 uint8_t ***subMap1 = pageMap[i]; So I have something concrete to dig into now.
And iterating a debug build provides even more info (I'm not sure why an appropriate message is not being printed rather than having to resort to inspecting a core dump). #4 0x0000000000403601 in avmplus::_AvmAssertMsg (condition=0, message=0x61ea90 "Assertion failed: \"((rtn < tier0_entries))\" (\"/home/build/fklockii/tamarin-redux/MMgc/PageMap-inlines.h\":223)\n") at /home/build/fklockii/tamarin-redux/VMPI/AvmAssert.h:72 #5 0x000000000047a005 in MMgc::PageMap::DelayT4::SetupDelayedPagemap (this=0x7fcebffec4b8, heap=0x8be5b0, start=18446744073709551615, limit=0) at /home/build/fklockii/tamarin-redux/MMgc/PageMap-inlines.h:223 #6 0x000000000047a586 in MMgc::PageMap::DelayT4::EnsureCapacity (this=0x7fcebffec4b8, heap=0x8be5b0, item=0x7fcebffff000, numPages=1) at /home/build/fklockii/tamarin-redux/MMgc/PageMap.cpp:577 #7 0x000000000047b35b in MMgc::PageMap::SimpleExpandSetAll<MMgc::PageMap::DelayT4> ( pm=0x7fcebffec4b8, heap=0x8be5b0, item=0x7fcebffff000, numPages=1, val=MMgc::PageMap::kGCAllocPage) at /home/build/fklockii/tamarin-redux/MMgc/PageMap.cpp:55
(In reply to comment #71) > And iterating a debug build provides even more info (I'm not sure why an > appropriate message is not being printed rather than having to resort to > inspecting a core dump). I suspect this may have been due to mis-interactions with my "tail -50" invocation. I'm pretty sure now that the problem is arising in SetupDelayedPagemap's invocation of AddrToIndex0; the computation ends up producing an index that is too large, I think. Not 100% sure yet because some of the assertions are triggering, I think because of the (AddrToIndex0(limit-1)+1) dance I am doing (to round up rather than down after dropping the low order bits), which would be fine except that the limit is currently initialized to 0 (as an absurd value), which underflows. But I think that is only triggering an assertion, not the segfault that is triggered in the release builds. Issue: I should have caught that assertion failure earlier. Did I not test a debug build on any inputs that reached the point of initializing the rest of the pagemap? That may motivate me to polish off bug 580603, which should ensure pagemap expansion. . .
(In reply to comment #72) > Issue: I should have caught that assertion failure earlier. Did I not test a > debug build on any inputs that reached the point of initializing the rest of > the pagemap? That may motivate me to polish off bug 580603, which should > ensure pagemap expansion. . . Ah, I think the assertion failure only happens if the very first addition to the pagemap also forces the pair of invocations of SetupDelayedPageMap (and thus passes along the absurd initial values for memStart and memEnd). If there's any intervening EnsureCapacity calls that do not set up the delayed pagemap, then the memStart and memEnd fields are set to sane values, and the subsequent expansion won't cause any assertion failures. So that explains why I had not run into this, and may also explain the actual bug here (and why it pops up so rarely).
Fixes the intermittent segfault that brbaker found. The problem was a combination of three factors: 1. When the delayed pagemap structure is initialized, the code initializes two ranges: the old cached range, and the new requested range. But if the very first request to initialize the pagemap also extends beyond a leaf, then the "old cached range" is the absurd range [MAX_UINT, 0), ie an empty set, and there was no guard against this range being passed in. 2. The reason that I had thought doing this was sound was because the code to initialize a range is a loop from the start to the limit, so such a loop should become a no-op when start >= limit, as should be the case ("obviously") when start == MAX_UINT and limit == 0. 3. But the loop from start to limit is really a series of nested loops, and the code decomposes the start and limit words to extract the indexes into the pagemap tree structure. The extraction for the limit first shifts off the low order bits, taking the ceiling rather than the floor (since the limit value needs to be high enough to encompass any portion of the address space that was lost by the down shift), using the pattern limit' = (dropbits(limit-1)+1). Likewise start' = dropbits(start). When you put (1) and (3) together, ka-boom. A limit of 0 will cause an underflow in (limit-1); the low order bits are dropped and the loop that is supposed to be a no-op will actually have a start' < limit' and do computation with an absurdly large index. (For a little while when I was investigating this I thought the +1 after the downshift would save me and bring the limit' back to 0, but the values involved here are unsigned, so the downshift does not fill the upper bits with 1's.) I considered a couple different solutions here, and decided to just avoid (1), but also add an assert regarding (3).
Attachment #477907 - Flags: review?(lhansen)
While I wait for the review on the fixes to the sparse pagemap implementation, I pushed the refactoring as a separate patch (which was my intention from the start, to keep the hg-blame output clean). This should introduce no change to pagemap behavior; its just a code reorganization with a dedicated abstract type for the pagemap structure. pushed to TR: http://hg.mozilla.org/tamarin-redux/rev/6338961f4c91
Comment on attachment 477907 [details] [diff] [review] fix for intermittent segfault Somewhat of a rubber stamp, your explanation seems lucid enough.
Attachment #477907 - Flags: review?(lhansen) → review+
Comment on attachment 478774 [details] [diff] [review] fix to xcode project for pagemap addition radio silence in chat room on whether such deltas require review...
Attachment #478774 - Flags: review?(lhansen)
Comment on attachment 478774 [details] [diff] [review] fix to xcode project for pagemap addition Rubber stamp.
Attachment #478774 - Flags: review?(lhansen) → review+
Xcode project fix pushed to TR, changeset 5263: http://hg.mozilla.org/tamarin-redux/rev/9ddfeeef7275 VC2008 project fix pushed to TR, changeset 5264: http://hg.mozilla.org/tamarin-redux/rev/f5c968960c33
Pushed sparse implementations to TR, changeset 5267: http://hg.mozilla.org/tamarin-redux/rev/ed812c4752fd
Status: REOPENED → RESOLVED
Closed: 15 years ago15 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: