These are chat archives for dropbox/pyston

18th
May 2015
Kevin Modzelewski
@kmod
May 18 2015 02:36
when I try running Pyston in Dropbox's development environment
LLVM ERROR: ran out of registers during register allocation
This message was deleted
This message was deleted
:(
Chris Toshok
@toshok
May 18 2015 02:46
“you had one job"
Kevin Modzelewski
@kmod
May 18 2015 03:17
and it's also having some sort of unwinding issue
and when I tried to run gdb on it, gdb crashed
(couldn't even get to the point that it would tell me what version of gdb I was trying to run)
so much for a "nice and easy weekend investigation" :(
Travis Hance
@tjhance
May 18 2015 07:15
I’m getting No such file or directory: '/home/tjhance/pyston-build-dbg/test/test_extension/build/lib.linux-x86_64-2.7’ when I run make check
Kevin Modzelewski
@kmod
May 18 2015 10:18
shoot, yeah I was running into that too
I'll check in a fix, but for now I think you can do ninja -C ~/pyston-build-dbg ext_cpython
Chris Toshok
@toshok
May 18 2015 17:20
what is the hash we use for our object cache?
ah found it
Marius Wachtler
@undingen
May 18 2015 17:35
SHA256 over the generated llvm module bitcode
Chris Toshok
@toshok
May 18 2015 17:37
i’m guessing sha256 is overkill for computing local shapes of types
essentially shapes are like hidden classes, but instead of a single attribute name being used to label an edge from parent to child (like in hclses), the hash of all attribute names is used
i don’t really want to use the entire sha256 hash for the key either :)
Marius Wachtler
@undingen
May 18 2015 17:39
oh sorry I think I missunderstood you: I thought you were asking about the JIT object code cache
Chris Toshok
@toshok
May 18 2015 17:40
i was. just was wondering if i could reuse the hash function
s/function/code
i could, it’s just slightly overkill :)
especially given that right now the label on the edge is a 64bit int, not 256bit :)
Marius Wachtler
@undingen
May 18 2015 17:41
:-D
Whats the advantage of the hash instead of hcls approach?
Chris Toshok
@toshok
May 18 2015 17:45
regardless of what function I use I’m going to need more than 64bits.. might as well use sha256. the create-shape operation should be done far less
the idea for the shape stuff is that we can which class in the mro to look the property up on
for all classes that share a shape, regardless of how they arrived at that shape, we know which class in the mro holds the property (if any do), and also the HCAttr offset for that property’s value
using hcls’s would result two types having the same shape more often
like: class Foo: attr1 = 5 class Bar: attr2 = 10; attr3 = 15 would have the same shape as class Foo: attr1 = 5 class Bar: attr2 = 10; class Baz: attr3 = 15 if we used hidden classes
Marius Wachtler
@undingen
May 18 2015 17:47
would it internally still use the hidden classes or does it replace this approach?
Chris Toshok
@toshok
May 18 2015 17:48
yeah, hidden classes still get used for general attribute lookups
this is just to make typeLookup less class specific
Marius Wachtler
@undingen
May 18 2015 17:50
thanks for the explanation, I think I understood it now. Should help the django TranslatedParser (or what was the name) class?
Chris Toshok
@toshok
May 18 2015 18:08
yep, exactly
all TranslatedParser subclasses will have the same shape, and all typeLookups should hit
there are other megamorphic ics involved there - lots of runtimeCalls/callattrs/etc, that all contribute as well, but typeLookup is the first step
Chris Toshok
@toshok
May 18 2015 18:19
i hope they have decent wifi in the jury duty waiting room :/
Marius Wachtler
@undingen
May 18 2015 18:22
:-D
Michael Arntzenius
@rntz
May 18 2015 19:25
is there a good way to grab a Python traceback from inside of gdb?
Marius Wachtler
@undingen
May 18 2015 19:55
maybe: signal SIGUSR1
Chris Toshok
@toshok
May 18 2015 19:57
does print showBacktrace() work?
unwinding through the frame gdb pushes might screw things up
Kevin Modzelewski
@kmod
May 18 2015 20:18
I think gdb's print uses an alternate stack, so print showBacktrace() doesn't give anything useful
Michael Arntzenius
@rntz
May 18 2015 21:28
yeah, print showBacktrace does not help
Rudi Chen
@rudi-c
May 18 2015 21:32
Done with the slicing stuff :D (I think)
Chris Toshok
@toshok
May 18 2015 21:48
hurray :)
Marius Wachtler
@undingen
May 18 2015 22:04
@rntz but depending on if you stop at a point where gdb can continue pyston for a short time and you don't mind that you will continue to run pyston - the gdb signal SIGUSR1 should give you a backtrace.
@rudi-c thanks for working on the getslice stuff :+1:
Rudi Chen
@rudi-c
May 18 2015 22:41
You're welcome! It was fun, learned a bunch about C and JITing along the way.
Chris Toshok
@toshok
May 18 2015 23:19
well that was frustrating, but jury duty obligation dispensed for another year