antocuni changed the topic of #pypy to: PyPy, the flexible snake (IRC logs: https://botbot.me/freenode/pypy/ ) | use cffi for calling C | "PyPy: the Gradual Reduction of Magic (tm)"
tbodt has joined #pypy
yuyichao has quit [Ping timeout: 240 seconds]
<kenaan_> rlamy default 9b3b4676e3b7 /extra_tests/test_textio.py: Specify the encoding, for systems where utf-8 isn't the default
yuyichao has joined #pypy
yuyichao has quit [Ping timeout: 240 seconds]
yuyichao has joined #pypy
marr has quit [Ping timeout: 240 seconds]
Nizumzen has joined #pypy
Cromulent|2 has joined #pypy
Cromulent|2 has quit [Client Quit]
Nizumzen has quit [Ping timeout: 255 seconds]
Nizumzen has joined #pypy
<kenaan_> rlamy default e1dbf4f46c45 /pypy/module/_io/interp_textio.py: Extract DecodeBuffer object from W_TextIOWrapper
<kenaan_> rlamy default 1d90f3200c9c /pypy/module/_io/interp_stringio.py: Extract UnicodeIO object from W_StringIO
tbodt has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
jcea has quit [Quit: jcea]
slacky__ has joined #pypy
dpn` has quit [Ping timeout: 240 seconds]
cjwelborn has quit [Ping timeout: 250 seconds]
dpn` has joined #pypy
cjwelborn has joined #pypy
ArneBab has joined #pypy
ArneBab_ has quit [Ping timeout: 240 seconds]
<kenaan_> rlamy default 82244130bf34 /pypy/module/_io/interp_stringio.py: Add readline() and readline_universal() methods to UnicodeIO, and stop sharing the implementation with textio
inhahe_ has quit [Ping timeout: 240 seconds]
inhahe_ has joined #pypy
Nizumzen has quit [Ping timeout: 248 seconds]
Nizumzen has joined #pypy
demonimin has quit [Remote host closed the connection]
demonimin has joined #pypy
jamesaxl has joined #pypy
marr has joined #pypy
antocuni has joined #pypy
oberstet2 has joined #pypy
oberstet2 has quit [Ping timeout: 240 seconds]
antocuni has quit [Ping timeout: 250 seconds]
Nizumzen has quit [Ping timeout: 268 seconds]
LarstiQ has quit [Quit: ZNC - http://znc.in]
jcea has joined #pypy
oberstet2 has joined #pypy
jimbaker_ has quit [Ping timeout: 260 seconds]
jimbaker_ has joined #pypy
LarstiQ has joined #pypy
antocuni has joined #pypy
Nizumzen has joined #pypy
Nizumzen has quit [Client Quit]
Nizumzen has joined #pypy
<arigato> snow, snow!
<antocuni> :)
<antocuni> arigato: FWIW, I'm still debugging the vmprof+stacklet issue. As usual I am confused and I'm not sure to understand what's going on, but I think it's more or less the following:
<antocuni> 1) vmprof sampling is controlled by a C variable signal_handler_ignore: if it's 0, we take samples, if it's >0, we don't
<antocuni> 2) vmprof_stop_sampling does basically signal_handler_ignore++; vmprof_start_sampling does signal_handler_ignore--
<antocuni> 3) signal_hanlder_ignore is statically initialized to 1
<antocuni> 4) in 386b50664e3e, you call stop_sampling inside StackletThread.new: this means that as soon as we create a _continulet, signal_handler_ignore becomes 2 (or more), and so we NEVER take samples
<antocuni> uhm, maybe my theory is wrong, because we call start_sampling before returning the new
<antocuni> as usual, I have a hard time trying to follow the control flow
raynold has quit [Quit: Connection closed for inactivity]
dddddd has joined #pypy
<antocuni> ok, I think that what happens is this:
<antocuni> enter new: stop_sampling(), ignore_signals == 2
<antocuni> enter new_stacklet_callback
<antocuni> exit new: start_sampling(), ignore_signals == 2
<antocuni> enter switch: stop_sampling(), ignore_signals == 3
<antocuni> enter switch: stop_sampling(), ignore_signals == 3
<antocuni> exit switch: start_sampling(), ignore_signals == 2
<antocuni> INSIDE continulet: no sampling :(
<antocuni> exit new_stacklet_callback
dmalcolm has quit [Remote host closed the connection]
<antocuni> exit switch: start_sampling(), ignore_signals == 1
<arigato> ah
<arigato> yes, it's missing in new_stacklet_callback
<arigato> it should do start_sampling() at the beginning, and stop_sampling() at the end
oberstet2 has quit [Ping timeout: 248 seconds]
<arigato> before my change a few days ago, only switch() had the calls, which was clearly wrong because the switch can e.g. return from a dying stacklet
Nizumzen has quit [Quit: KVIrc 4.2.0 Equilibrium http://www.kvirc.net/]
<arigato> we should add try:finally: with start/stop_sampling, either in _stacklet_shadowstack.py or in interp_continuation.py
oberstet2 has joined #pypy
<antocuni> arigato: something like this? http://paste.openstack.org/show/627374/
<antocuni> I think it's probably time to write a proper test to check what's the value of vmprof_ignore_signals at various points
<arigato> yes
<antocuni> ok, thanks
<arigato> I'd put the cintf calls inside _stacklet_shadowstack and _stacklet_asmgcc instead
<arigato> otherwise it's obscure
* antocuni is a bit scared to look inside those files
<antocuni> arigato: ah, another minor issue: after 1cc101a9ee5a, it is no longer possible to run pypy/module/_continuation tests alone
<antocuni> because ll2ctypes cannot find vmprof_{start,stop}_sampling
<arigato> ah, bah
<antocuni> I suppose it's because they are defines instead of proper functions
<arigato> it was fixed though
<antocuni> is it because of some particular reason?
<antocuni> uh
<arigato> by 72001f56a97f, which looks fragile
<antocuni> when?
<antocuni> oh, I had an outdated repo
<arigato> I think this fix is a bit worrying
<antocuni> I'd say "a lot"
<arigato> I think we can give an argument _callable to rffi.llexternal()
<arigato> so that if it's directly called, we run _callable
<arigato> which does nothing
<arigato> or else, just add "if we_are_translated():" around the calls
<arigato> of course it's hard to test this code, because if by mistake nothing occurs, then most of the time it will work anyway
<antocuni> arigato: yes, I'm thinking of making it more testable in general
<antocuni> like, if "not we_are_translated()", to use a fake counter which we can check
<antocuni> and possibly also to introduce some logic which checks that at the end of the test we called start/stop in pairs
mattip has joined #pypy
<mattip> my intention in 72001f56a97f was to allow the use of rvmprof in tests without requiring if we_are_translated() conditionals
<mattip> on platforms where we actually run the tests
yuyichao has quit [Ping timeout: 258 seconds]
<antocuni> mattip: I'm thinking of putting we_are_translated() inside {start,stop}_sampling
<mattip> ok, but that would not solve the need for 72001f56a97f
<antocuni> something like this: http://paste.openstack.org/show/627380/
<antocuni> doesn't it?
<mattip> no, it is from module/_continuation/interp_continuation.py:47 eventually calling cintf.save_rvmprof_stack(), which calls vmprof_stop_sampling()
<antocuni> yes, exactly
<antocuni> in my idea, cintf.save_rvmprof_stack would call the "stop_sampling" I linked above
<mattip> ahh then it would work.
<antocuni> yes, and most importantly it would also allow us to write deeper tests and check that vmprof is actually enabled when we want
<mattip> couldn't we do that without the we_are_translated hack by looking at the log? But yes, I see where it might be easier
<antocuni> which log?
<antocuni> but apart from that, a simulated {start,stop}_sampling has other advantages: e.g. we can easily reset it to a known value when the test start
tbodt has joined #pypy
<mattip> ok, will require some refactoring of save_rmvprof_stack, restore_rvmprof_stack in cintf.py
<antocuni> yes, likely
<antocuni> I'd say that cintf.py should NEVER be used directly outside of rvmprof/
raynold has joined #pypy
<mattip> +1
<mattip> that completes the picture for me and then 72001f56a97f could be reverted
<kenaan_> mattip buildbot a64690c374cf /bot2/pypybuildbot/builds.py: cleanup, add ensurepip step for TranslatedTests (downloading only) builders (ARM) builders that translate call e...
<mattip> hopefully that is the last buildbot change needed to support the extra tests under a virtualenv,
<mattip> but win32 still needs this virtualenv bug fix https://github.com/pypa/virtualenv/pull/1103
bbot2 has quit [Quit: buildmaster reconfigured: bot disconnecting]
bbot2 has joined #pypy
the_drow has quit [Ping timeout: 248 seconds]
antocuni has quit [Ping timeout: 268 seconds]
mattip has left #pypy ["bye"]
the_drow has joined #pypy
jamesaxl has quit [Read error: Connection reset by peer]
jamesaxl has joined #pypy
oberstet2 has quit [Ping timeout: 248 seconds]
oberstet2 has joined #pypy
cjwelborn has quit [Remote host closed the connection]
yuyichao has joined #pypy
oberstet2 has quit [Ping timeout: 248 seconds]
oberstet2 has joined #pypy
slacky__ has quit [Ping timeout: 240 seconds]
akash47_ has quit [Quit: leaving]
akash47 has joined #pypy
jamesaxl has quit [Quit: WeeChat 1.9.1]
cjwelborn has joined #pypy
tbodt has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
slacky__ has joined #pypy
slacky__ has quit [Ping timeout: 248 seconds]
slacky__ has joined #pypy
slacky__ has quit [Ping timeout: 248 seconds]
tav` has joined #pypy
tav has quit [Ping timeout: 240 seconds]
tav` is now known as tav