altendky has quit [Quit: Connection closed for inactivity]
Tsundere_cloud has quit [Quit: Connection closed for inactivity]
kanaka has joined #pypy
kanaka has quit [Changing host]
kanaka has joined #pypy
<mattip>
buildbots should not be trying to build vmprof-python
<kenaan>
mattip default bc4cf55dc154 /requirements.txt: require binary vmprof since building from source requires libunwind on linux
<kenaan>
mattip py3.6 018e437e5061 /: merge default into branch
forgottenone has quit [Ping timeout: 245 seconds]
nunatak has joined #pypy
nunatak has quit [Quit: Leaving]
<mjacob>
arigato: so if a branch has one open head and a closed one, you want to add a new changeset on top of the open one that pretends to have the closed one as a parent?
<mjacob>
arigato: i can't think of another way to do this
<kenaan>
cfbolz default e19e79b1385f /pypy/objspace/std/: fix bug: when a newdict(instance=True) was switching its strategy, it lost its content
<cfbolz>
fijal: fixed
<antocuni>
wow, it's impressive that nobody noticed this earlier
<antocuni>
I suppose it means that users became more well-behaved and don't put hundreds of attributes on instances?
<Alex_Gaynor>
or people just don't have tests so they don't know their program is broken
<cfbolz>
no no
<cfbolz>
this is specifically about __pypy__.newdict(instance=True)
<cfbolz>
if you actually make an instance and use its dict, you are fine
<antocuni>
ah, why is it different?
<cfbolz>
complicated reasons
<cfbolz>
by default, instances don't even have a dict, of course
<cfbolz>
and if you request it, you get a MapDict, which is just a reference to the object. the object gets a reference to the dict too, so that identity is preserved
<cfbolz>
in the __pypy__.newdict(instance=True) we internally make an instance and use that as the backing storage for the dict we return
<cfbolz>
but we forgot to add the reference from the object to the dict
<cfbolz>
and then more or less random stuff happens
<antocuni>
yeah, I can imagine
<antocuni>
the usual fun stuff
<cfbolz>
anyway, it's not like __pypy__.newdict(instance=True) is used that often
<cfbolz>
and it seems people are really not adding hundreds of attributes to functions (which are also using such a dict)
marky1991 has quit [Remote host closed the connection]
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
jcea has joined #pypy
marky1991_2 has joined #pypy
marky1991 has quit [Ping timeout: 258 seconds]
marky1991_2 has quit [Remote host closed the connection]
marky1991_2 has joined #pypy
antocuni has joined #pypy
nunatak has joined #pypy
nunatak has quit [Quit: Leaving]
<antocuni>
what happened to vmprof? I have read on github that 0.4.13 is available only as a .tar.gz, but why?
altendky has joined #pypy
marky1991_2 has quit [Ping timeout: 268 seconds]
dayton has joined #pypy
<krono>
I ran a rpython vm wiht PYPYLOG=....:jit-backend-counts:.. but in the resulting log, the backend count region is empty. what could be the reason? any translation flags?
<dayton>
Hi all
<dayton>
Is there a special way to declare variadic functions in cffi?
<dayton>
When I write the declaration like I would in a c header file. The wrapper builds fine but at import time in python, it throws an error about missing symbols for the variadic function
lritter has joined #pypy
mattip has quit [Ping timeout: 248 seconds]
mattip has joined #pypy
Taggnostr has quit [Remote host closed the connection]
Lightsword has quit [Read error: Connection reset by peer]
antocuni has quit [Ping timeout: 272 seconds]
<ronan>
rindolf: I think the issue is that you crashed vmprof by raising BaseException and corrupted the log
<rindolf>
ronan: ah
mvantellingen has quit [Ping timeout: 252 seconds]
<rindolf>
ronan: thanks! it works better now
<rindolf>
ronan: if i dont raise an exc i mean
Lightsword has joined #pypy
<ronan>
rindolf: I think the way vmprof behaves when the user code raises is a bit weird
tsaka__ has quit [Ping timeout: 268 seconds]
jcea has quit [Remote host closed the connection]
jcea has joined #pypy
<rindolf>
ronan: ah, ok
mvantellingen has joined #pypy
mvantellingen has quit [Ping timeout: 252 seconds]
<cfbolz>
ronan: sounds like we should fix that?
tsaka__ has joined #pypy
<ronan>
cfbolz: yes, but I'm not sure how
<cfbolz>
ronan: we should write the profile even if Base Exception is raised, imo
<cfbolz>
Or did you mean profile?
<ronan>
cfbolz: well, there's 3 things that should probably happen after an exception is raised: cleaning up resources (includes actually writing the profile), showing some output, and displaying the original traceback
<ronan>
but I'm not sure about the order
<ronan>
also, we currently swallow KeyboardInterrupt and SystemExit, and I don't know if that's right
mvantellingen has joined #pypy
xcm has quit [Read error: Connection reset by peer]
<dayton>
Hey, where can I get help with cffi?
xcm has joined #pypy
<ronan>
dayton: this is the place
<cfbolz>
dayton: here is ok, usually. But I didn't have anything constructive to answer about the varargs question, sorry :-(
<mattip>
dayton: can you share a concise reproducer, and what OS/python?
<dayton>
This is the code I'm using to create the wrapper and at the bottom is the particular function that it's throwing the no symbols defined error for
<dayton>
Error occurs at import time
<dayton>
If I remove the functions with varargs from the cdef then the wrapper works fine
marvin_ has quit [Remote host closed the connection]
<dayton>
Yeah, I read the docs and it suggests that the way I did it is correct. Guess I'll have to keep digging
<dayton>
Thanks
<cfbolz>
dayton: which library is that?
<dayton>
It's JitBuilder from the Eclipse omr project
<mattip>
the example https://pastebin.com/bHfpt0QE is very incomplete. Are you using extern "C"? Are you using any compiler flags?
<cfbolz>
dayton: right, so it *is* C++
<dayton>
mattip oh my bad, I just posted a snippet since the cdef section is quite long
<dayton>
cfbolz: yeah, just a C wrapped C++ library
<mattip>
can you wrap the cdef in a extern "C" block : cdef = 'extern "C" {' + f.read() + '}'
<mattip>
or so
<mattip>
or does jitbuilder_cdef.h already do that?
<mattip>
I forget the rules, I think if JitBuilder.h does not include function declarations from jitbuilder_cdef.h with extern "C" then you need to decorate each function there too
<dayton>
The declarations in JitBuilder.h are already extern "C"
<dayton>
JitBuilder.h also includes some some other headers
<dayton>
The Jitbuilder.cdef.h is just all of these declarations in a single file to pass to ffi.cdef
<mattip>
hmmm. If they all are extern "C", why is the name being mangled?
<ronan>
mattip: cffi does the mangling
<dayton>
When I tried adding extern "C" to jitbuilder.cdef.h I get a cdeferror cannot parse extern C
<dayton>
Yeah I think it's from the cffi side. The names aren't being mangled in the static library I'm linking against