Skip to content

Conversation

rudi-c
Copy link
Contributor

@rudi-c rudi-c commented Sep 2, 2015

Enable the code that does the moving by changing MOVING_GC in gc.h

@rudi-c
Copy link
Contributor Author

rudi-c commented Sep 2, 2015

Comparing to '['baseline']'
running ['python', '../pyston-perf/benchmarking/benchmark_suite/fannkuch_med.py']
1.02236390114
              pyston (calibration)                      :   1.02s baseline: 1.02 (  0.3%)
running ['../pyston-perf/benchmarking/../../pyston/./pyston_release', '../pyston-perf/benchmarking/benchmark_suite/django_template3.py']
4.47141909599
running ['../pyston-perf/benchmarking/../../pyston/./pyston_release', '../pyston-perf/benchmarking/benchmark_suite/django_template3.py']
2.54235577583
running ['../pyston-perf/benchmarking/../../pyston/./pyston_release', '../pyston-perf/benchmarking/benchmark_suite/django_template3.py']
2.48113799095
running ['../pyston-perf/benchmarking/../../pyston/./pyston_release', '../pyston-perf/benchmarking/benchmark_suite/django_template3.py']
2.48555588722
              pyston django_template3.py                :   2.48s baseline: 2.47 (  0.6%)
running ['../pyston-perf/benchmarking/../../pyston/./pyston_release', '../pyston-perf/benchmarking/benchmark_suite/pyxl_bench.py']
3.12222790718
running ['../pyston-perf/benchmarking/../../pyston/./pyston_release', '../pyston-perf/benchmarking/benchmark_suite/pyxl_bench.py']
2.07312107086
running ['../pyston-perf/benchmarking/../../pyston/./pyston_release', '../pyston-perf/benchmarking/benchmark_suite/pyxl_bench.py']
2.07812714577
running ['../pyston-perf/benchmarking/../../pyston/./pyston_release', '../pyston-perf/benchmarking/benchmark_suite/pyxl_bench.py']
2.08546209335
              pyston pyxl_bench.py                      :   2.07s baseline: 2.03 (  1.9%)
running ['../pyston-perf/benchmarking/../../pyston/./pyston_release', '../pyston-perf/benchmarking/benchmark_suite/sqlalchemy_imperative2.py']
3.40318512917
running ['../pyston-perf/benchmarking/../../pyston/./pyston_release', '../pyston-perf/benchmarking/benchmark_suite/sqlalchemy_imperative2.py']
2.40841388702
running ['../pyston-perf/benchmarking/../../pyston/./pyston_release', '../pyston-perf/benchmarking/benchmark_suite/sqlalchemy_imperative2.py']
2.39970088005
running ['../pyston-perf/benchmarking/../../pyston/./pyston_release', '../pyston-perf/benchmarking/benchmark_suite/sqlalchemy_imperative2.py']
2.39458608627
              pyston sqlalchemy_imperative2.py          :   2.39s baseline: 2.39 (  0.1%)
running ['../pyston-perf/benchmarking/../../pyston/./pyston_release', '../pyston-perf/benchmarking/benchmark_suite/django_template3_10x.py']
16.1354420185
running ['../pyston-perf/benchmarking/../../pyston/./pyston_release', '../pyston-perf/benchmarking/benchmark_suite/django_template3_10x.py']
14.9046261311
running ['../pyston-perf/benchmarking/../../pyston/./pyston_release', '../pyston-perf/benchmarking/benchmark_suite/django_template3_10x.py']
14.950658083
running ['../pyston-perf/benchmarking/../../pyston/./pyston_release', '../pyston-perf/benchmarking/benchmark_suite/django_template3_10x.py']
13.9293601513
              pyston django_template3_10x.py            :  13.93s baseline: 13.86 (  0.5%)
running ['../pyston-perf/benchmarking/../../pyston/./pyston_release', '../pyston-perf/benchmarking/benchmark_suite/pyxl_bench_10x.py']
17.3995110989
running ['../pyston-perf/benchmarking/../../pyston/./pyston_release', '../pyston-perf/benchmarking/benchmark_suite/pyxl_bench_10x.py']
15.6270000935
running ['../pyston-perf/benchmarking/../../pyston/./pyston_release', '../pyston-perf/benchmarking/benchmark_suite/pyxl_bench_10x.py']
16.2708098888
running ['../pyston-perf/benchmarking/../../pyston/./pyston_release', '../pyston-perf/benchmarking/benchmark_suite/pyxl_bench_10x.py']
15.919672966
              pyston pyxl_bench_10x.py                  :  15.63s baseline: 15.71 ( -0.5%)
running ['../pyston-perf/benchmarking/../../pyston/./pyston_release', '../pyston-perf/benchmarking/benchmark_suite/sqlalchemy_imperative2_10x.py']
20.0542840958
running ['../pyston-perf/benchmarking/../../pyston/./pyston_release', '../pyston-perf/benchmarking/benchmark_suite/sqlalchemy_imperative2_10x.py']
18.2473220825
running ['../pyston-perf/benchmarking/../../pyston/./pyston_release', '../pyston-perf/benchmarking/benchmark_suite/sqlalchemy_imperative2_10x.py']
18.2868349552
running ['../pyston-perf/benchmarking/../../pyston/./pyston_release', '../pyston-perf/benchmarking/benchmark_suite/sqlalchemy_imperative2_10x.py']
18.1258690357
              pyston sqlalchemy_imperative2_10x.py      :  18.13s baseline: 18.06 (  0.4%)
              pyston (geomean-2ec9)                     :   2.31s baseline: 2.29 (  0.9%)
Deleting report 'last'
Saving results to 'last'

@rudi-c
Copy link
Contributor Author

rudi-c commented Sep 3, 2015

Ok I think I addressed everything except making ChunkedStack global.

@rudi-c
Copy link
Contributor Author

rudi-c commented Sep 3, 2015

(Those new commits will be squashed with the other ones by the way).

I was afraid using templates for visit would blow up the assembly size and have much worse cache performance, but it doesn't seem to be making a difference.

              pyston (calibration)                      :   1.00s baseline: 1.04 ( -3.6%)
running ['../pyston-perf/benchmarking/../../pyston/./pyston_release', '../pyston-perf/benchmarking/benchmark_suite/django_template3.py']
4.5465760231
running ['../pyston-perf/benchmarking/../../pyston/./pyston_release', '../pyston-perf/benchmarking/benchmark_suite/django_template3.py']
2.50280284882
running ['../pyston-perf/benchmarking/../../pyston/./pyston_release', '../pyston-perf/benchmarking/benchmark_suite/django_template3.py']
2.48815512657
running ['../pyston-perf/benchmarking/../../pyston/./pyston_release', '../pyston-perf/benchmarking/benchmark_suite/django_template3.py']
2.49233698845
              pyston django_template3.py                :   2.49s baseline: 2.47 (  0.7%)
running ['../pyston-perf/benchmarking/../../pyston/./pyston_release', '../pyston-perf/benchmarking/benchmark_suite/pyxl_bench.py']
3.23393201828
running ['../pyston-perf/benchmarking/../../pyston/./pyston_release', '../pyston-perf/benchmarking/benchmark_suite/pyxl_bench.py']
2.1131169796
running ['../pyston-perf/benchmarking/../../pyston/./pyston_release', '../pyston-perf/benchmarking/benchmark_suite/pyxl_bench.py']
2.16362810135
running ['../pyston-perf/benchmarking/../../pyston/./pyston_release', '../pyston-perf/benchmarking/benchmark_suite/pyxl_bench.py']
2.09890007973
              pyston pyxl_bench.py                      :   2.10s baseline: 2.10 (  0.2%)
running ['../pyston-perf/benchmarking/../../pyston/./pyston_release', '../pyston-perf/benchmarking/benchmark_suite/sqlalchemy_imperative2.py']
3.43012881279
running ['../pyston-perf/benchmarking/../../pyston/./pyston_release', '../pyston-perf/benchmarking/benchmark_suite/sqlalchemy_imperative2.py']
2.41221284866
running ['../pyston-perf/benchmarking/../../pyston/./pyston_release', '../pyston-perf/benchmarking/benchmark_suite/sqlalchemy_imperative2.py']
2.39683914185
running ['../pyston-perf/benchmarking/../../pyston/./pyston_release', '../pyston-perf/benchmarking/benchmark_suite/sqlalchemy_imperative2.py']
2.40976786613
              pyston sqlalchemy_imperative2.py          :   2.40s baseline: 2.39 (  0.3%)
running ['../pyston-perf/benchmarking/../../pyston/./pyston_release', '../pyston-perf/benchmarking/benchmark_suite/django_template3_10x.py']
16.209197998
running ['../pyston-perf/benchmarking/../../pyston/./pyston_release', '../pyston-perf/benchmarking/benchmark_suite/django_template3_10x.py']
15.245402813
running ['../pyston-perf/benchmarking/../../pyston/./pyston_release', '../pyston-perf/benchmarking/benchmark_suite/django_template3_10x.py']
14.7917859554
running ['../pyston-perf/benchmarking/../../pyston/./pyston_release', '../pyston-perf/benchmarking/benchmark_suite/django_template3_10x.py']
13.9085569382
              pyston django_template3_10x.py            :  13.91s baseline: 13.94 ( -0.2%)
running ['../pyston-perf/benchmarking/../../pyston/./pyston_release', '../pyston-perf/benchmarking/benchmark_suite/pyxl_bench_10x.py']
18.1933579445
running ['../pyston-perf/benchmarking/../../pyston/./pyston_release', '../pyston-perf/benchmarking/benchmark_suite/pyxl_bench_10x.py']
16.824805975
running ['../pyston-perf/benchmarking/../../pyston/./pyston_release', '../pyston-perf/benchmarking/benchmark_suite/pyxl_bench_10x.py']
16.5577259064
running ['../pyston-perf/benchmarking/../../pyston/./pyston_release', '../pyston-perf/benchmarking/benchmark_suite/pyxl_bench_10x.py']
16.8260030746
              pyston pyxl_bench_10x.py                  :  16.56s baseline: 16.36 (  1.2%)
running ['../pyston-perf/benchmarking/../../pyston/./pyston_release', '../pyston-perf/benchmarking/benchmark_suite/sqlalchemy_imperative2_10x.py']
20.2457559109
running ['../pyston-perf/benchmarking/../../pyston/./pyston_release', '../pyston-perf/benchmarking/benchmark_suite/sqlalchemy_imperative2_10x.py']
18.4282920361
running ['../pyston-perf/benchmarking/../../pyston/./pyston_release', '../pyston-perf/benchmarking/benchmark_suite/sqlalchemy_imperative2_10x.py']
18.2297830582
running ['../pyston-perf/benchmarking/../../pyston/./pyston_release', '../pyston-perf/benchmarking/benchmark_suite/sqlalchemy_imperative2_10x.py']
18.1202139854
              pyston sqlalchemy_imperative2_10x.py      :  18.12s baseline: 18.19 ( -0.4%)
              pyston (geomean-2ec9)                     :   2.32s baseline: 2.31 (  0.4%)

@kmod
Copy link
Collaborator

kmod commented Sep 3, 2015

If the callers can see the casting-template, I think they'll end up inlining it and we'll generate the exact same code.

@rudi-c rudi-c force-pushed the movingmerge branch 4 times, most recently from 925e2bf to 2d1c177 Compare September 4, 2015 22:07
They tends to time out or just make the test suite run for longer. They definitely times out
when running a prototype moving gc.
It's easier to tell the two constants apart if they are different.
Moving gcs will need this to update pointers. There should not be any
extra dereference, it will just happen on the other side of the
function.

Use templates to avoid direct (void**) casts -- make sure we're always
passing an pointer of the form T**.
- Refactor the stack logic into a separate data structure ChunkedStack,
  keep the push function that deals with marking as functionality specific
  to a subclass of ChunkedStack (no virtual, just reuse code).
- Add an additional (disabled) phase that maps out the reference graph
  reachable objects after the sweep phase. Prepare moving all objects in
  the small heap.

Also, rename TraceStack to TraversalWorklist because the fact
that we're using a stack is an implementation detail.
This will reallocate all objects in the small heap and update
all references that were pointing to this object.

This is not functional yet, there are still references that we are not
tracking at other points in the program, so it's still gated behind the
MOVING_GC flag.
kmod added a commit that referenced this pull request Sep 4, 2015
Optionally move objects around in memory to prepare Pyston for a moving collector.
@kmod kmod merged commit 7b84d99 into pyston:master Sep 4, 2015
@kmod
Copy link
Collaborator

kmod commented Sep 4, 2015

Just under the wire :)

Thanks for all your work this summer rudi!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants