cfbolz changed the topic of #pypy to: PyPy, the flexible snake (IRC logs: https://quodlibet.duckdns.org/irc/pypy/latest.log.html#irc-end ) | use cffi for calling C | if a pep adds a mere 25-30 [C-API] functions or so, it's a drop in the ocean (cough) - Armin
xcm has quit [Remote host closed the connection]
xcm has joined #pypy
tsaka__ has joined #pypy
dddddd has quit [Remote host closed the connection]
tsaka__ has quit [Ping timeout: 265 seconds]
jcea has quit [Ping timeout: 244 seconds]
jcea has joined #pypy
jcea has quit [Quit: jcea]
xcm is now known as Guest19431
Guest19431 has quit [Killed (tolkien.freenode.net (Nickname regained by services))]
<arigo>
antocuni: wheels for cffi: they are built with azure pipelines, yes
infernix has quit [Ping timeout: 272 seconds]
infernix has joined #pypy
infernix has quit [Changing host]
infernix has joined #pypy
<arigo>
antocuni: I'm not too surprized you don't get a speed-up by putting "return -1" in case of exception for functions returning pointers
<arigo>
because I think many functions don't return pointers
<arigo>
to get a better idea you might want to add the next easy hack, for functions that officially return void
<cfbolz>
arigo: for things returning ints, we could still use -1 as a special value that means "check the global exception holder"
<arigo>
doing that starts to have very unclear benefits, but maybe
<cfbolz>
because you need two checks
<arigo>
and a branch, and more code than before
<cfbolz>
right
<arigo>
it might be easy to play again with the "r15" hack (there is a branch name with "r15" in the name), this time to reserve the register r15 to replace exc_data.value
<cfbolz>
instead of? the top-of-nursery pointer?
<arigo>
if this register contains normally always zero, on the normal path we just need to check "r15!=0" instead of "exc_data.value!=0"
<arigo>
the previous branch is trying to use r15 for shadowstack pointers, but that's not what I'm talking about here
<cfbolz>
ah, right
<cfbolz>
(was just trying to remember what the previous branch did)
<mattip>
tumbleweed: do you know why stock python on Ubuntu has "-g" in the value of sysconfig.get_config_vars('CFLAGS')?
<mattip>
(which queries the Makefile used to build python)
<tumbleweed>
generally speaking things in Debian/Ubuntu are built with debug symbols enabled, and then they are stripped out into a separate binary package
<tumbleweed>
(so they're available if you want to run gdb, later)
<tumbleweed>
urgh, that's the migration to the current implementation
<tumbleweed>
but basically, the standard packaging tooling does almost all of the work to generate these separate packages
<tumbleweed>
and they go into a separate archive, because they're huge
<mattip>
so if people naively build a c-extension module and use the sysconfig.get_config_vars('CFLAGS') values, they should strip before shipping
<mattip>
YannickJadoul: ^^^ do you do this in cibuildwheel?
<YannickJadoul>
mattip: No, never encountered that
<YannickJadoul>
But we use the manylinux images, and not Ubuntu
<YannickJadoul>
Let me check if I find debug symbols in my wheels
<tumbleweed>
I know fedora has debuginfo packages too, but I don't know the mechanism they build them with
<tumbleweed>
one would assume they have to be buliding with -g, unless all packages were perfectly reproduceable, or they wouldn't get useful debug symbols
<mattip>
multibuild tries to append "-Wl,-strip-all" to wheel building, but numpy was overriding that by mistake
<mattip>
so theoretically in a 3.8+ world, we could co-opt ABI tag 'd' to mean '-O0 -g" build with debug symbols'
<tumbleweed>
maybe, yeah
YannickJadoul has quit [Quit: Leaving]
andi- has quit [Ping timeout: 240 seconds]
andi- has joined #pypy
dddddd has quit [Quit: dddddd]
<antocuni>
OTOH, people have downloaded/installed numpy wheels with debug symbol without noticing and/or complaining about the code size until now, so why remove them?
<antocuni>
they are useful e.g. in gdb and with vmprof
<antocuni>
I have always been surprised to see numpy function names inside vmprof profiles (on CPython) because I always assumed that wheels were shipped without, but I never investigated the "issue"