[parrot/parrot] e04e1e: [pmc] start with resizablepmcarray unshift optimiz...
GitHub
noreply at github.com
Fri Dec 5 13:33:29 UTC 2014
Branch: refs/heads/master
Home: https://github.com/parrot/parrot
Commit: e04e1e31ab41e51d76a10c04b11cc193989e3050
https://github.com/parrot/parrot/commit/e04e1e31ab41e51d76a10c04b11cc193989e3050
Author: Reini Urban <rurban at cpanel.net>
Date: 2014-12-04 (Thu, 04 Dec 2014)
Changed paths:
M src/pmc/class.pmc
M src/pmc/resizablepmcarray.pmc
M src/runcore/trace.c
Log Message:
-----------
[pmc] start with resizablepmcarray unshift optimizations
using a max offset 8, as in nqp/qrpa. See GH #1152
Here offset is still const 0.
Commit: 58bbda3eb65805668b4d6e44b798fdb1d374019e
https://github.com/parrot/parrot/commit/58bbda3eb65805668b4d6e44b798fdb1d374019e
Author: Reini Urban <rurban at cpanel.net>
Date: 2014-12-04 (Thu, 04 Dec 2014)
Changed paths:
M src/events.c
M src/pmc/resizablepmcarray.pmc
Log Message:
-----------
[pmc] rpa trace: do_shift(INTERP, ...)
need interp for tracing, slow or fast
Commit: e08d1625ba38e58fc9fea45f5e09ee06bb839efa
https://github.com/parrot/parrot/commit/e08d1625ba38e58fc9fea45f5e09ee06bb839efa
Author: Reini Urban <rurban at cpanel.net>
Date: 2014-12-04 (Thu, 04 Dec 2014)
Changed paths:
M src/pmc/fixedpmcarray.pmc
M src/pmc/resizablepmcarray.pmc
Log Message:
-----------
[pmc] rpa enabled shift optimizations w/o splice
resizablepmcarray shift,unshift,resize,push,pop look now good.
just splice is missing. GH #1152
Commit: e53a2ef78d515ad3bc7b496780c36fed718e608d
https://github.com/parrot/parrot/commit/e53a2ef78d515ad3bc7b496780c36fed718e608d
Author: Reini Urban <rurban at cpanel.net>
Date: 2014-12-04 (Thu, 04 Dec 2014)
Changed paths:
M src/pmc/resizablepmcarray.pmc
Log Message:
-----------
[pmc] rpa: trying to fix splice WIP
Not offset optimized yet. And something still fails.
GH #1152
Commit: 588e44714a4a992474dab8df98638db1b7969614
https://github.com/parrot/parrot/commit/588e44714a4a992474dab8df98638db1b7969614
Author: Reini Urban <rurban at cpanel.net>
Date: 2014-12-04 (Thu, 04 Dec 2014)
Changed paths:
M src/pmc/resizablepmcarray.pmc
Log Message:
-----------
[pmc] rpa: WIP some more fixes, but still failing
Commit: 670c8a0289e1b047de78ec10d90c7a8c918637c1
https://github.com/parrot/parrot/commit/670c8a0289e1b047de78ec10d90c7a8c918637c1
Author: Reini Urban <rurban at cpanel.net>
Date: 2014-12-04 (Thu, 04 Dec 2014)
Changed paths:
M src/pmc/resizablepmcarray.pmc
Log Message:
-----------
[pmc] rpa: remove old code without USE_OFFSET
Still one invalid access of freed data in push_pmc, and
invalid read in shift_pmc.
valgrind ./parrot_old -o runtime/parrot/library/HLL.pbc ext/nqp-rx/src/stage0/HLL-s0.pir
Commit: 386af50e08aa5e3f8ea8db9ff3fb9e84b3e8ef28
https://github.com/parrot/parrot/commit/386af50e08aa5e3f8ea8db9ff3fb9e84b3e8ef28
Author: Reini Urban <rurban at cpanel.net>
Date: 2014-12-04 (Thu, 04 Dec 2014)
Changed paths:
M src/pmc/resizablepmcarray.pmc
Log Message:
-----------
[pmc] rpa: fix 2 cases: shift+push offset overflow
also:
* fix non-debugging TRACE_RPAd macro
* add some UNLIKELY hints
Commit: 17d7d92e97bcd3d0eda95dba15dbdb855f0f27c7
https://github.com/parrot/parrot/commit/17d7d92e97bcd3d0eda95dba15dbdb855f0f27c7
Author: Reini Urban <rurban at cpanel.net>
Date: 2014-12-04 (Thu, 04 Dec 2014)
Changed paths:
M src/pmc/resizablepmcarray.pmc
Log Message:
-----------
[pmc] rpa: fix defined, no throw. add get/set trace with -t1
Commit: 2d1d2f2b2558e48b44fd32b22792820d9f94d2aa
https://github.com/parrot/parrot/commit/2d1d2f2b2558e48b44fd32b22792820d9f94d2aa
Author: Reini Urban <rurban at cpanel.net>
Date: 2014-12-04 (Thu, 04 Dec 2014)
Changed paths:
M src/pmc/fixedpmcarray.pmc
M src/pmc/resizablepmcarray.pmc
Log Message:
-----------
[pmc] rpa: specialize sort+reverse, need offset
also add offset to append
add more notes to fixedpmcarray vtable docs
Commit: 51670590eb81c7b17e8d5f3e2dd3a734940d566c
https://github.com/parrot/parrot/commit/51670590eb81c7b17e8d5f3e2dd3a734940d566c
Author: Reini Urban <rurban at cpanel.net>
Date: 2014-12-04 (Thu, 04 Dec 2014)
Changed paths:
M src/pmc/resizablepmcarray.pmc
Log Message:
-----------
[pmc] rpa: optimize splice shrink fast on offset
if there is enough room at the left to fill in the elements
from from, adjust offset and jump to the fill routine
this optimization is not present in qrpa, and executed e.g.
in data_json.
Commit: 83aa896581447638ae71e510b34ca41f3f474d17
https://github.com/parrot/parrot/commit/83aa896581447638ae71e510b34ca41f3f474d17
Author: Reini Urban <rurban at cpanel.net>
Date: 2014-12-04 (Thu, 04 Dec 2014)
Changed paths:
M src/pmc/resizablepmcarray.pmc
Log Message:
-----------
[pmc] rpa: optimize splice resize a bit
add TRACE_SPLC
Commit: 9fd5d2d1f98abdbcf3f68015cc978735ef5b8371
https://github.com/parrot/parrot/commit/9fd5d2d1f98abdbcf3f68015cc978735ef5b8371
Author: Reini Urban <rurban at cpanel.net>
Date: 2014-12-04 (Thu, 04 Dec 2014)
Changed paths:
M src/pmc/resizablepmcarray.pmc
Log Message:
-----------
[pmc] rpa: fix resize move with offset
before 1,32,8 => only 32. after: 33
Commit: f5aa7fc562570ac8f953be56a9d9613dfa9c8267
https://github.com/parrot/parrot/commit/f5aa7fc562570ac8f953be56a9d9613dfa9c8267
Author: Reini Urban <rurban at cpanel.net>
Date: 2014-12-04 (Thu, 04 Dec 2014)
Changed paths:
M config/gen/makefiles/root.in
M src/events.c
M src/pmc/resizablepmcarray.pmc
M t/pmc/resizablepmcarray.t
Log Message:
-----------
[pmc] rpa: fix splice shrink fast, add tests
test rpa coverage and add all missing tests
shrink fast has a wrong offset, test splice_shrink_fast()
add tests for resize off empty and resize off move, the 2 fast
variants with existing offset.
remove shift slow case, this is invalid, add assertion. this is caught
by size == 0 and we cannot have an offset bigger then the threshold.
remove unnedeed pmc/pmc_arrayiterator.h from src/events.c
Commit: 399356d8c6b09fd8bdac900a60c20f3852d5bf37
https://github.com/parrot/parrot/commit/399356d8c6b09fd8bdac900a60c20f3852d5bf37
Author: Reini Urban <rurban at cpanel.net>
Date: 2014-12-04 (Thu, 04 Dec 2014)
Changed paths:
M src/pmc/fixedpmcarray.pmc
M src/pmc/resizablepmcarray.pmc
Log Message:
-----------
[pmc] rpa: fix visit
we need an offset for visit, we cannot use the fixedpmcarray
method.
Commit: cec80e0a640dd0fc25dd0cea3490d794f228adaf
https://github.com/parrot/parrot/commit/cec80e0a640dd0fc25dd0cea3490d794f228adaf
Author: Reini Urban <rurban at cpanel.net>
Date: 2014-12-04 (Thu, 04 Dec 2014)
Changed paths:
M src/pmc/resizablepmcarray.pmc
M t/pmc/resizablepmcarray.t
Log Message:
-----------
[pmc] rpa: fix resize with offset optimization
we moved the wrong items, and had wrong slack overwrites.
Add testcases.
Commit: 0d998322573947627ce61b0573c4b390be6eb4ef
https://github.com/parrot/parrot/commit/0d998322573947627ce61b0573c4b390be6eb4ef
Author: Reini Urban <rurban at cpanel.net>
Date: 2014-12-04 (Thu, 04 Dec 2014)
Changed paths:
M src/pmc/fixedpmcarray.pmc
M src/pmc/imageiofreeze.pmc
M src/pmc/resizablepmcarray.pmc
M t/pmc/freeze.t
Log Message:
-----------
[pmc] rpa,fpa,imageiofreeze: various minor refactors
* Access attr struct more directly.
* Fix one syntax problem with UNLIKELY with non-std compilers.
* Optimize *1.5 by using integer math.
* Change rpa overallocation to use 1.5, not 2. This is better to handle
free blocks.
* Always fill slack space, as we extend rpa via set. In a better version we
should fill the slack space only when needed: only on set.
* Change push_{non-pmc} to use push_pmc and not set_keyed_int.
push is offset optimized, set not.
Still WIP. object was probably modified after being freed
Commit: 2ef874bccdc00e2ab01a92d12ff97cf4fc55bc04
https://github.com/parrot/parrot/commit/2ef874bccdc00e2ab01a92d12ff97cf4fc55bc04
Author: Reini Urban <rurban at cpanel.net>
Date: 2014-12-04 (Thu, 04 Dec 2014)
Changed paths:
M frontend/parrot/main.c
M include/parrot/interpreter.h
M src/pmc/resizablepmcarray.pmc
M t/pmc/freeze.t
Log Message:
-----------
[pmc] rpa: optimize slack filling with PMCNULL
Only fill the rest with PMCNULL when necessary, i.e. when
we set an index > size, the intermediate indices between size and index-1.
This saves a lot of slack filling code cycles.
Error on delete oob.
Commit: 4a147d3a2d98f4824ecbfe78eff15254743193e2
https://github.com/parrot/parrot/commit/4a147d3a2d98f4824ecbfe78eff15254743193e2
Author: Reini Urban <rurban at cpanel.net>
Date: 2014-12-04 (Thu, 04 Dec 2014)
Changed paths:
M src/pmc/resizablepmcarray.pmc
Log Message:
-----------
[pmc] rpa: optimize delete_keyed_int
on index=0 just bump the offset as with shift,
else memmove en-block, not item by item in a loop.
This passes now most rpa related tests, just reverse has a conflict
with fpa. with reverse renamed to nreverse make test and benchmarking
is possible.
Commit: 8b16d352090bc5a1eb069bd5cf29666c078e0a76
https://github.com/parrot/parrot/commit/8b16d352090bc5a1eb069bd5cf29666c078e0a76
Author: Reini Urban <rurban at cpanel.net>
Date: 2014-12-04 (Thu, 04 Dec 2014)
Changed paths:
M ext/nqp-rx/src/stage0/nqp-setting.nqp
M frontend/parrot/main.c
M include/parrot/interpreter.h
M src/hll.c
Log Message:
-----------
[ext] fix the remaining rpa reverse problem
nqp ResizablePMCArray provided its own reverse method, which is now
not needed anymore. We use the better pir method instead.
Also found a syntax problem in parrot_old
Remaining todos:
t/op/lexicals.t (Wstat: 256 Tests: 54 Failed: 1)
Failed test: 27
t/compilers/pge/p5regex/p5rx.t (Wstat: 0 Tests: 960 Failed: 7)
Failed tests: 172, 420-421, 442-443, 869-870
t/src/extend_vtable.t (Wstat: 512 Tests: 134 Failed: 2)
Failed tests: 34, 37
Commit: 5f23d873595572d28d74a577daa2af15af91168c
https://github.com/parrot/parrot/commit/5f23d873595572d28d74a577daa2af15af91168c
Author: Reini Urban <rurban at cpanel.net>
Date: 2014-12-04 (Thu, 04 Dec 2014)
Changed paths:
M frontend/parrot/main.c
M frontend/parrot2/main.c
M include/parrot/interpreter.h
M src/pmc/resizablepmcarray.pmc
Log Message:
-----------
[core] apify -t20 as PARROT_TRACE_ARRAY_STATE_FLAG
Only available without --optimize, i.e. #ifndef NDEBUG
Commit: 9bca8bb9d2cfb1ceef3033b7121f05bc8f5c3d61
https://github.com/parrot/parrot/commit/9bca8bb9d2cfb1ceef3033b7121f05bc8f5c3d61
Author: Reini Urban <rurban at cpanel.net>
Date: 2014-12-04 (Thu, 04 Dec 2014)
Changed paths:
M src/pmc/resizablepmcarray.pmc
Log Message:
-----------
[pmc] rpa: fix a resize edgecase with size=0
avoid negative offsets.
repro:
valgrind ./parrot_old -t20 parrot-nqp.pbc --target=pir compilers/data_json/JSON.nqp
Commit: d642a3ce31be2564230c712371ac13d4a101a2a6
https://github.com/parrot/parrot/commit/d642a3ce31be2564230c712371ac13d4a101a2a6
Author: Reini Urban <rurban at cpanel.net>
Date: 2014-12-04 (Thu, 04 Dec 2014)
Changed paths:
M src/pmc/resizablepmcarray.pmc
Log Message:
-----------
[pmc] rpa: fix invalid read in delete_keyed_int, off by one
with (1,9,10) and key=1 we read one too far.
repro:
valgrind ./parrot_old -t20 t/compilers/pge/p5regex/p5rx.t
Commit: e439b764821f320796cbf1cee30cf0dc8d344b0f
https://github.com/parrot/parrot/commit/e439b764821f320796cbf1cee30cf0dc8d344b0f
Author: Reini Urban <rurban at cpanel.net>
Date: 2014-12-04 (Thu, 04 Dec 2014)
Changed paths:
M src/pmc/resizablepmcarray.pmc
Log Message:
-----------
[pmc] rpa: shift optim, use data struct directly
do not use seperate SELF and temp values for the attrs.
2.40% faster on my mac, %ebp addressing for data.
Commit: eb71e05f6eaf9f95eab4bdf178127f5772b10774
https://github.com/parrot/parrot/commit/eb71e05f6eaf9f95eab4bdf178127f5772b10774
Author: Reini Urban <rurban at cpanel.net>
Date: 2014-12-04 (Thu, 04 Dec 2014)
Changed paths:
M src/pmc/resizablepmcarray.pmc
Log Message:
-----------
[pmc] rpa: internal rename trace macros
add TRACE_RPAdata
Commit: 67d528010301d78eb223d3b81d6b0368a0ff12b0
https://github.com/parrot/parrot/commit/67d528010301d78eb223d3b81d6b0368a0ff12b0
Author: Reini Urban <rurban at cpanel.net>
Date: 2014-12-04 (Thu, 04 Dec 2014)
Changed paths:
M src/pmc/resizablepmcarray.pmc
M t/pmc/resizablepmcarray.t
Log Message:
-----------
[pmc] rpa refactor delete_keyed_int, add tests
also prepare do_unshift optimization, add slack offset if slow
Commit: 152430183197bc64e4ad9b0cb14299d8d2622561
https://github.com/parrot/parrot/commit/152430183197bc64e4ad9b0cb14299d8d2622561
Author: Reini Urban <rurban at cpanel.net>
Date: 2014-12-04 (Thu, 04 Dec 2014)
Changed paths:
M lib/Parrot/Test.pm
M t/src/extend_vtable.t
Log Message:
-----------
[test] fix extend_vtable.t for changed rpa delete API
delete throws now out of bounds.
Also enable TEST_VERBOSE=2 for c_output tests
Commit: 0004a834bf9459f7364d2c99fba3425f3764de8f
https://github.com/parrot/parrot/commit/0004a834bf9459f7364d2c99fba3425f3764de8f
Author: Reini Urban <rurban at cpanel.net>
Date: 2014-12-04 (Thu, 04 Dec 2014)
Changed paths:
M src/pmc/resizablepmcarray.pmc
Log Message:
-----------
[pmc] rpa: just aesthetics
Commit: d045ccd7d79b8e5c91df88e541d669d0b27126e5
https://github.com/parrot/parrot/commit/d045ccd7d79b8e5c91df88e541d669d0b27126e5
Author: Reini Urban <rurban at cpanel.net>
Date: 2014-12-04 (Thu, 04 Dec 2014)
Changed paths:
M src/pmc/resizablepmcarray.pmc
Log Message:
-----------
[pmc] rpa.delete warn on illegal delete[0] of empty array
it skipped the memmove, so did no harm. But PGE still uses that, so keep the warning
for one deprecation cycle. Closes GH #1153
Commit: e4abc302a3ce51e4655530b00db650fd6ccf150b
https://github.com/parrot/parrot/commit/e4abc302a3ce51e4655530b00db650fd6ccf150b
Author: Reini Urban <rurban at cpanel.net>
Date: 2014-12-04 (Thu, 04 Dec 2014)
Changed paths:
M src/pmc/resizablepmcarray.pmc
M t/src/extend_vtable.t
Log Message:
-----------
[pmc] rpa.delete: skip memmove when not needed
also adjust changed out of bounds error message in one test
Commit: 514ef74657e75faf9c70bf429d14f6ceaac06cfc
https://github.com/parrot/parrot/commit/514ef74657e75faf9c70bf429d14f6ceaac06cfc
Author: Reini Urban <rurban at cpanel.net>
Date: 2014-12-04 (Thu, 04 Dec 2014)
Changed paths:
M compilers/pge/PGE/Exp.pir
Log Message:
-----------
[PGE] fix delete oob in Match scope
Makes the matcher a bit slower. Fixes #1154
Commit: e07a4008ae6aef16d2cb2bfa2b1e06dbe10ecaed
https://github.com/parrot/parrot/commit/e07a4008ae6aef16d2cb2bfa2b1e06dbe10ecaed
Author: Reini Urban <rurban at cpanel.net>
Date: 2014-12-04 (Thu, 04 Dec 2014)
Changed paths:
M src/pmc/resizablepmcarray.pmc
Log Message:
-----------
[pmc] rpa: fix one more resize edge-case
when we have a big enough offset, move the elements to the left,
but not too many. cap the diff.
Not almost all tests pass, just op/lexicals.t 27 fails
Commit: d2ed2b1bc1fe51eaf001a2299a683e39e9b07367
https://github.com/parrot/parrot/commit/d2ed2b1bc1fe51eaf001a2299a683e39e9b07367
Author: Reini Urban <rurban at cpanel.net>
Date: 2014-12-04 (Thu, 04 Dec 2014)
Changed paths:
M docs/pmc/array.pod
M src/pmc/resizablepmcarray.pmc
Log Message:
-----------
[docs] fix Array pmc docs
total overhaul.
Commit: 559bb17de9d3d02d042bac42e4e566da018d18c2
https://github.com/parrot/parrot/commit/559bb17de9d3d02d042bac42e4e566da018d18c2
Author: Reini Urban <rurban at cpanel.net>
Date: 2014-12-04 (Thu, 04 Dec 2014)
Changed paths:
M src/pmc/fixedpmcarray.pmc
M src/pmc/resizablepmcarray.pmc
Log Message:
-----------
[pmc] rpa gc safety vs performance. 2.3% slower but safe
need the write barriers at destructive methods
Commit: ce1eb71e939828c6757b1255466b611b41bf2be3
https://github.com/parrot/parrot/commit/ce1eb71e939828c6757b1255466b611b41bf2be3
Author: Reini Urban <rurban at cpanel.net>
Date: 2014-12-05 (Fri, 05 Dec 2014)
Changed paths:
M src/pmc/resizablepmcarray.pmc
M src/runcore/trace.c
Log Message:
-----------
[pmc] rpa: fixed clone with offsets
This is now the last known rpa bug, all tests pass.
Need to check still if we can skip some WBs now.
Commit: 6cbd12d96dd62076421443ef4ef23f23c527070a
https://github.com/parrot/parrot/commit/6cbd12d96dd62076421443ef4ef23f23c527070a
Author: Reini Urban <rurban at cpanel.net>
Date: 2014-12-05 (Fri, 05 Dec 2014)
Changed paths:
M ChangeLog
M api.yaml
M src/pmc/resizablepmcarray.pmc
M t/pmc/resizablepmcarray.t
Log Message:
-----------
[pmc] finalize rewrite, add clone tests, fix WBs
add WBs for all writes and changes.
add ChangeLog for all the changes in the smoke-me/rpa-offset-gh1152 branch.
Closes #1152, #1153, #1154.
Performance win with parrot-bench:
22.8% on linux 64bit, the fastest parrot since 2.8.0
15.5% on darwin
Commit: a64c4ed674baf12b6326a6a39fd1cd1145cf7d13
https://github.com/parrot/parrot/commit/a64c4ed674baf12b6326a6a39fd1cd1145cf7d13
Author: Reini Urban <rurban at cpanel.net>
Date: 2014-12-05 (Fri, 05 Dec 2014)
Changed paths:
M .travis.yml
Log Message:
-----------
[travis] add apt-get update, remove llvm-dev gcc-multilib
Commit: 055a1d65147e50e0c801a1da038b5550bd83ce23
https://github.com/parrot/parrot/commit/055a1d65147e50e0c801a1da038b5550bd83ce23
Author: Reini Urban <rurban at cpanel.net>
Date: 2014-12-05 (Fri, 05 Dec 2014)
Changed paths:
M src/pmc/resizablepmcarray.pmc
Log Message:
-----------
[cage] fix rpa type warning (0L for %ld) on debugging
Commit: 1f0aa35b7a30d06667196ce7fa47c98bf57dd2f4
https://github.com/parrot/parrot/commit/1f0aa35b7a30d06667196ce7fa47c98bf57dd2f4
Author: Reini Urban <rurban at cpanel.net>
Date: 2014-12-05 (Fri, 05 Dec 2014)
Changed paths:
M .travis.yml
M ChangeLog
M api.yaml
M compilers/pge/PGE/Exp.pir
M config/gen/makefiles/root.in
M docs/pmc/array.pod
M ext/nqp-rx/src/stage0/nqp-setting.nqp
M frontend/parrot/main.c
M frontend/parrot2/main.c
M include/parrot/interpreter.h
M lib/Parrot/Test.pm
M src/events.c
M src/hll.c
M src/pmc/class.pmc
M src/pmc/fixedpmcarray.pmc
M src/pmc/imageiofreeze.pmc
M src/pmc/resizablepmcarray.pmc
M src/runcore/trace.c
M t/pmc/freeze.t
M t/pmc/resizablepmcarray.t
M t/src/extend_vtable.t
Log Message:
-----------
Merge branch 'smoke-me/rpa-offset-gh1152'
Compare: https://github.com/parrot/parrot/compare/570e6c1c42cc...1f0aa35b7a30
More information about the parrot-commits
mailing list