Carl Friedrich Bolz-Tereick pushed to branch branch/default at PyPy / pypy
Commits: f17e5a60 by Carl Friedrich Bolz-Tereick at 2022-05-03T12:23:30+02:00 remove repeated live instructions --HG-- branch : liveness-as-instruction - - - - - fef49dd2 by Carl Friedrich Bolz-Tereick at 2022-05-03T21:34:22+02:00 switch the way that liveness is representend in the jitcodes. so far it is done as a dict mapping pc to a shared triple of shared strings. Those dicts take up a lot of static space, lookups in them show up in profiles of the jit. instead, represent liveness as an instruction. the instruction is skipped when tracing and blackholing, but is read when producing and consuming resume data. The instruction's argument is an offset into a single global big string, that compactly encodes the sets of live registers. intermediate checkin --HG-- branch : liveness-as-instruction - - - - - e725e0f8 by Carl Friedrich Bolz-Tereick at 2022-05-05T19:33:22+02:00 fix vmprof --HG-- branch : liveness-as-instruction - - - - - d569179d by Carl Friedrich Bolz-Tereick at 2022-05-06T10:34:24+02:00 fix codewriter tests --HG-- branch : liveness-as-instruction - - - - - ac241c2c by Carl Friedrich Bolz-Tereick at 2022-05-06T12:23:29+02:00 fix tests --HG-- branch : liveness-as-instruction - - - - - 6bdc7cc5 by Carl Friedrich Bolz-Tereick at 2022-05-06T12:38:07+02:00 more fixes --HG-- branch : liveness-as-instruction - - - - - 8c5b8a45 by Carl Friedrich Bolz-Tereick at 2022-05-08T20:54:47+02:00 remove debugging attributes --HG-- branch : liveness-as-instruction - - - - - a12d2f1a by Carl Friedrich Bolz-Tereick at 2022-05-08T21:50:15+02:00 two byte offsets are big enough (the pypy liveness string is 9650 bytes, so plenty of margin to 65536) --HG-- branch : liveness-as-instruction - - - - - 302adc8b by Carl Friedrich Bolz-Tereick at 2022-05-09T21:46:24+02:00 merge liveness-as-instructions: instead of encoding the liveness of local registers in each jitcode as a dict mapping pc to a (shared) instance of a class with three strings, do the following: add a live instruction in the jitcode that that has as its argument an offset into a string that compactly encodes liveness. This makes the pypy binary about 7MB smaller, which is ~9% of its size: there are about 15000 jitcodes, and 15k dicts take a lot of memory. - - - - - 15 changed files: - rpython/jit/codewriter/assembler.py - rpython/jit/codewriter/codewriter.py - rpython/jit/codewriter/jitcode.py - rpython/jit/codewriter/liveness.py - rpython/jit/codewriter/test/test_assembler.py - rpython/jit/codewriter/test/test_codewriter.py - rpython/jit/codewriter/test/test_flatten.py - rpython/jit/codewriter/test/test_jitcode.py - rpython/jit/codewriter/test/test_liveness.py - rpython/jit/metainterp/blackhole.py - rpython/jit/metainterp/opencoder.py - rpython/jit/metainterp/pyjitpl.py - rpython/jit/metainterp/resume.py - rpython/jit/metainterp/test/test_opencoder.py - rpython/jit/metainterp/test/test_resume.py View it on Heptapod: https://foss.heptapod.net/pypy/pypy/-/compare/4a5867375f87780a8e82285c1119214c947830dd...302adc8b4d1a8d9c085612d384cb273100e0c59c -- View it on Heptapod: https://foss.heptapod.net/pypy/pypy/-/compare/4a5867375f87780a8e82285c1119214c947830dd...302adc8b4d1a8d9c085612d384cb273100e0c59c You're receiving this email because of your account on foss.heptapod.net.
_______________________________________________ pypy-commit mailing list -- pypy-commit@python.org To unsubscribe send an email to pypy-commit-le...@python.org https://mail.python.org/mailman3/lists/pypy-commit.python.org/ Member address: arch...@mail-archive.com