cfbolz changed the topic of #pypy to: PyPy, the flexible snake (IRC logs: https://botbot.me/freenode/pypy/ ) | use cffi for calling C | mac OS and Fedora are not Windows
igitoor has quit [Ping timeout: 250 seconds]
igitoor_ has joined #pypy
igitoor_ has quit [Changing host]
igitoor_ has joined #pypy
igitoor_ is now known as igitoor
adamholmberg has joined #pypy
adamholmberg has quit [Ping timeout: 240 seconds]
abrown has joined #pypy
marky1991 has joined #pypy
marky1991 has quit [Read error: Connection reset by peer]
abrown_ has joined #pypy
jcea has quit [Quit: jcea]
abrown has quit [Quit: Leaving]
abrown_ has quit [Ping timeout: 244 seconds]
dddddd has quit [Remote host closed the connection]
Wulf4 has joined #pypy
Wulf has quit [Ping timeout: 272 seconds]
Wulf4 is now known as Wulf
forgottenone has joined #pypy
jamesaxl has joined #pypy
tayfun26 has joined #pypy
lritter has joined #pypy
antocuni has joined #pypy
tayfun26 has quit [Remote host closed the connection]
tayfun26 has joined #pypy
jacob22__ has quit [Remote host closed the connection]
jacob22__ has joined #pypy
7ITAAF58W has quit [Write error: Broken pipe]
mcepl[m] has quit [Remote host closed the connection]
infinite has quit [Ping timeout: 246 seconds]
danieljabailey has quit [Ping timeout: 246 seconds]
danieljabailey has joined #pypy
infinite has joined #pypy
bendlas[m] has joined #pypy
lritter has quit [Ping timeout: 244 seconds]
jdeuce has quit [Ping timeout: 245 seconds]
jdeuce has joined #pypy
mcepl[m] has joined #pypy
antocuni has quit [Ping timeout: 250 seconds]
dddddd has joined #pypy
marky1991 has joined #pypy
marky1991 has quit [Remote host closed the connection]
marky1991 has joined #pypy
marky1991 has quit [Remote host closed the connection]
marky1991 has joined #pypy
forgottenone has quit [Quit: Konversation terminated!]
tayfun26 has quit [Quit: tayfun26]
jcea has joined #pypy
marky1991 has quit [Remote host closed the connection]
marky1991 has joined #pypy
marky1991 has quit [Remote host closed the connection]
smvv has joined #pypy
marky1991 has joined #pypy
marky1991 has quit [Remote host closed the connection]
marky1991 has joined #pypy
<smvv> is it possible to see how often a pypy trace is hit? I'm trying to correlate vmprof's profiler output with the traces. I'm seeing multiple traces of the same code (which is expected) but I'm not sure how I can see *if* a trace is used and how long it is used. It could be that the trace is compiled, ran only once and pypy proceeds with running in the interpreter
<smvv> in ionmonkey (optimizing jit of spidermonkey), they use a single inc instruction on x64 per basic block to have an idea of how often code is actually executed. It allocates some memory next to the generated code where they store the counters for each basic block. When pretty printing the basic blocks (after the code has run), the hit counters are read and dumped as well
<smvv> (the inc instruction uses an absolute address to find the right hit counter)
<smvv> I was thinking of jit-backend-counts but I'm not sure how to read that section
ebarrett has joined #pypy
Rhy0lite has joined #pypy
tayfun26 has joined #pypy
adamholmberg has joined #pypy
<cfbolz> smvv: yes, it's that section
<cfbolz> it gives you the id of the trace, and an entry count/loop count
<cfbolz> the id of the trace is usually written as a hex number in the rest of the log, so it's annoying to correlate :-(
tayfun26 has quit [Quit: tayfun26]
tayfun26 has joined #pypy
Zaab1t has joined #pypy
mcepl[m] has quit [Changing host]
mcepl[m] has joined #pypy
antocuni has joined #pypy
tayfun26 has quit [Quit: tayfun26]
<ronan> smvv: backend counts are a bit dodgy, especially with counter decay on, and I'm not sure what they mean exactly
<ronan> smvv: the profile does record which traces it hits, but that information isn't shown in the web app
<fijal> ronan: it does count how many times it hit the loop. It *might* be a clash if something else occupies the same place
abrown has joined #pypy
<ronan> fijal: yes, but when you have multiple counters in the same trace, they don't always seem consistent with each other
<fijal> oyu have exits
<ronan> yes, but not all exits are recorded
marky1991 has quit [Ping timeout: 272 seconds]
Hasimir has quit [Ping timeout: 272 seconds]
abrown has quit [Quit: Leaving]
<fijal> no
abrown has joined #pypy
abrown_ has joined #pypy
<abrown> Can I ask an RPython question?
<abrown> I have an interpreter with Python-native functions; I want to be able to call 0-arg, 1-arg, etc. versions of these functions but RPython only allows me to have one of these--at least the way I am doing it
<abrown> Here is an example: https://pastebin.com/7kFPCBY4
<abrown> I'm trying to use virtual method dispatch to determine which way to call the native functions; I've had no luck with *args.
<antocuni> abrown: you can't use the same field name, function, for all the NativeFunction subclasses
<antocuni> because each subclass needs to have a function with a different type
<Alex_Gaynor> well, you can use the same field name, but it just can't be a field on the base class
<abrown> so if I did this without a base class all would be well
<antocuni> Alex_Gaynor: oh, can you nowadays? I remember there was a time in which RPython tried to move it to the base class anyway
<antocuni> abrown: you still need the base class, else you don't know how to call "call()"
<Alex_Gaynor> antocuni: using `_attrs_` to make sure it never moves to the base class works; maybe it fails without that
<antocuni> but you need distinct __init__ for each of them
<antocuni> Alex_Gaynor: right, I remember now :)
<Alex_Gaynor> antocuni: classic RPython: everything works, and it's sort of nice, but extremely obscure
<antocuni> :)
<abrown> cool; so why is this the case? why is the type of `function` getting pulled in to the base class?
<antocuni> abrown: because you are setting it in NativeFunction.__init__
<antocuni> where else should it go?
<abrown> yeah... makes sense
<antocuni> think like in Java
<antocuni> if you write in Java, you have to declare the field inside NativeFunction: what type do you assign?
<abrown> yeah... so `function` is a field of the base class and the sub-classes don't re-type that field
<antocuni> (modulo the fact that in java you can't have functions as fields)
<antocuni> yes, they try to "unify" it
<abrown> thanks
<antocuni> you're welcome
Hasimir has joined #pypy
antocuni has quit [Ping timeout: 268 seconds]
adamholmberg has quit [Read error: Connection reset by peer]
adamholmberg has joined #pypy
<fijal> abrown: generally speaking the answer to "can I ask an RPython question" is always yes :-)
Rhy0lite has quit [Quit: Leaving]
Zaab1t has quit [Quit: bye bye friends]
carljm_ has quit [Quit: leaving]
carljm has joined #pypy
atomizer_ is now known as atomizer
abrown_ has quit [Quit: Page closed]
adamholmberg has quit [Remote host closed the connection]
adamholmberg has joined #pypy
antocuni has joined #pypy
[Arfrever] has quit [Ping timeout: 264 seconds]
Kipras_ has quit [Read error: Connection reset by peer]
adamholmberg has quit [Remote host closed the connection]
adamholmberg has joined #pypy
kipras has joined #pypy
adamholmberg has quit [Ping timeout: 246 seconds]
demonimin has quit [Ping timeout: 250 seconds]
demonimin has joined #pypy