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
adamholmberg has joined #pypy
adamholmberg has quit [Remote host closed the connection]
adamholmberg has joined #pypy
adamholmberg has quit [Remote host closed the connection]
<mattip> antocuni: we wanted to move build_cffi_imports to somewhere under lib_pypy anyway
<mattip> created: it comes from rpython/rlib/rvmprof/rvmprof.py, as part of a decorator
<created> mattip - ah. Is there an easy way to get that code to be executed without translating again? So I could print-debug and what not?
<created> It doesn't seem to be executed if I run pyinterpreter directly, even if I try 'import _vmprof' in pyinterpreter
<created> (Although, perhaps it is supposed to work and it doesn't work due to the same issue as I'm trying to figure out on windows?)
<mattip> the _vmprof module is disabled for windows in pypy/config/pypyoption.py, since it does not work there
<created> Oh, thanks!
<mattip> which problem are you trying to solve?
<created> Trying to get it to work on windows
<mattip> maybe not an easy task, if you are looking for low-hanging fruit
<created> I am not
<mattip> this is what is done on cpython
<created> I think you already have most of the support
<created> But maybe something's missing
<mattip> do the tests actually run on windows: python2 pytest.py rpython\rlib\rvprof\test
<mattip> or are they skipped?
<created> They seem skipped unless I specify a file to run from the test directory explicitly
<created> Not sure by what
<created> I'll also note that pypy2 does support _vmprof (not sure how well), which is why I think you already have most of the logic inside, and just got it disabled/broken
<created> E.g. _vmprof's test_direct passes with pypy2
<mattip> sure, because I think it doesn't actually profile anything
<created> Oh, they're ignored by pytest_ignore_collect - the tests
<mattip> so you will need to unskip the tests and get them passing, and then get jit/backend/x86/test/test_rvmprof.py passing
<created> Didn't check it in pypy2, but the profiling code definitely exists, just might not be fully working or complete
<mattip> it might do something, but not profile jitted code or be subtly broken in some other way
<mattip> are you sure the pypy/module/_vmprof tests are all being run?
<created> They don't succeed yet, no
<created> Never said they did
<created> But I changed it so that they run, at least
<created> Currently, there's some invalid runtime parameter error
<created> Oh, I noticed you gave me a third test directory to look at
<created> Or rather I was looking at a different test directory
<mattip> looking at the test output from the buildbot, it seems the pypy/module/_vmprof tests fail to even pass the collection stage
<mattip> something about faulthandler.c not compiling (search that page for "faulthandler.c")
<mattip> so a long and winding road to get this going
<created> rpython\jit\backend\x86\test\test_rvmprof.py seems to pass
<created> I'm assuming it's not a direct test as I didn't successfully translate yet
jcea has joined #pypy
<created> The rlib/rvmprof/test tests are skipped because my machine is AMD64 and not x86
<created> That doesn't sound healthy - is that intentional? Are they skipped on unix x64 machines too?
<mattip> yes, it is intentional, the tests are meant to be skipped on win32
<mattip> you can compare to a wsl vm, there machine is "x86_64"
<created> Bizarre
<created> I would've expected platform.machine to be OS-independent, but that's neither here nor there
<mattip> all of the tests in pypy and rpython are meant to be run untranslated
<mattip> the ones in pypy and extra_tests are run after translation
<created> you said pypy twice, did you mean something else?
<created> python?
<created> *py?
<mattip> nope, those are run by both translated and untranslated, but with some extra skipping where needed
<mattip> you can see in the buildbot stdio logs what runs where
<created> I am starting to see bigger issues, yeah
<created> Pypy no longer seems to expose thread ids for one
<created> Or rather, it indeed never did
<created> So I guess it never worked
trinityhex has joined #pypy
<created> Or maybe it is supported
<created> But not in tests
<mattip> what is the error you get in the untranslated test (paste to a pastebin, not here), there are some tricks to get thread ids untranslated
<mattip> in rpython
<created> Basically, thread_ident doesn't exist during untranslated tests at all
<mattip> created: see rpython/rlib/rthread.py, where it does ThreadLocalField(...)
<mattip> that is the code that builds up the structure one field at a time
<created> Yeah, I found it, but I don't see why it wouldn't be included in the tests
<created> Other fields defined there are included
<created> (rpy_errno and alt_errno are included, while thread_ident and I think p_errno aren't)
<mattip> that is the beauty of untranslated tests. You can add a "import pdb;pdb.set_trace()" in rthread.py, and run the test
<mattip> it should stop and let you poke around
<created> Hmm, I could give it a try
<mattip> uhh, are you sure it doesn't exist?
<mattip> When running test_rthread.py tests, I see it in the %TEMP%/usession-something/testing_1/structdef.h file
<created> mattip - weird - it exists when you test rthread, but not when you test rvmprof
trinityhex has quit [Ping timeout: 240 seconds]
<created> It seems like compute_result_annotation is not reached with this particular fieldname when testing rvmprof, but I don't understand why
<created> I don't see where the annotation is, I assume it's some kinda magic
<mattip> is the entire struct empty - or just missing some fields?
<created> No, just missing that field
<created> It has all the others other than p_errno
<mattip> maybe try putting a call to rthread.get_ident() somewhere, like in test/test_translation
<created> Doesn't seem to help
<created> I do see a comment in vmprof_win.c saying that if thread_ident doesn't exist, suspending the threads may be unsafe (dunno if it is, but if so - it may be a good idea to instead just make sure it compiles in this case by ading an extra #ifdef)
<created> I'll take a break for a while
<created> The actual thing doesn't really work either
<mattip> gnite
<created> Night
<created> It seems to collect things into a file but then the file gets corrupted by something
<created> (Possibly doesn't stop profiling correctly)
<mattip> yeah, not the easiest place to get going with pypy
Arfrever has quit [Quit: 御出で]
trinityhex has joined #pypy
trinityhex has quit [Ping timeout: 240 seconds]
dddddd has quit [Remote host closed the connection]
jcea has quit [Remote host closed the connection]
trinityhex has joined #pypy
camelCaser has quit [Read error: Connection reset by peer]
camelCaser has joined #pypy
_whitelogger has joined #pypy
trinityhex has quit [Ping timeout: 258 seconds]
_whitelogger has joined #pypy
jcea has joined #pypy
jcea has quit [Client Quit]
i9zO5AP has quit [Quit: WeeChat 2.5]
jvesely has joined #pypy
altendky has quit [Quit: Connection closed for inactivity]
xcm has quit [Remote host closed the connection]
xcm has joined #pypy
_whitelogger has joined #pypy
jvesely has quit [Quit: jvesely]
<mattip> antocuni: something is missing on -A cpyext tests on py3.6
<mattip> TypeError: w_import_module() got an unexpected keyword argument 'use_imp'
tsaka__ has quit [Ping timeout: 260 seconds]
tsaka__ has joined #pypy
tsaka__ has quit [Ping timeout: 240 seconds]
tsaka__ has joined #pypy
jacob22 has quit [Read error: Connection reset by peer]
jacob22 has joined #pypy
tsaka__ has quit [Ping timeout: 268 seconds]
tsaka__ has joined #pypy
_whitelogger has joined #pypy
_whitelogger has joined #pypy
tsaka__ has quit [Ping timeout: 240 seconds]
trinityhex has joined #pypy
dddddd has joined #pypy
trinityhex has quit [Ping timeout: 258 seconds]
<kenaan> mattip winconsoleio a5da068662dd /: merge py3.6 into branch
<kenaan> mattip winconsoleio d199a8198079 /: add a test, but it hangs trying to read from stdio, even after copying cpython
trinityhex has joined #pypy
trinityhex has quit [Ping timeout: 265 seconds]
tsaka__ has joined #pypy
altendky has joined #pypy
<tos9> Hm, hadn't seen https://github.com/getsentry/milksnake before
_whitelogger has joined #pypy
CrazyPython has joined #pypy
CrazyPython has quit []
CrazyPython has joined #pypy
ronan has quit [Remote host closed the connection]
ronan has joined #pypy
ronan has quit [Remote host closed the connection]
ronan has joined #pypy
CrazyPython has quit [Read error: Connection reset by peer]
Ai9zO5AP has joined #pypy
the_rat has quit [Quit: ZNC - http://znc.in]
the_rat has joined #pypy
jcea has joined #pypy
CrazyPython has joined #pypy
jcea has quit [Quit: jcea]
<kenaan> mattip py3.6 86b879736f67 /pypy/module/cpyext/test/test_cpyext.py: add missing kwarg to runappdirect tests
CrazyPython has quit [Read error: Connection reset by peer]
kipras has joined #pypy
__pv has quit [Remote host closed the connection]
kipras has quit [Read error: Connection reset by peer]
dddddd has quit [Ping timeout: 258 seconds]
dddddd has joined #pypy
_whitelogger has joined #pypy
CrazyPython has joined #pypy
trinityhex has joined #pypy
CrazyPython has quit [Read error: Connection reset by peer]
jvesely has joined #pypy
CrazyPython has joined #pypy
trinityhex has quit [Ping timeout: 240 seconds]