cfbolz changed the topic of #pypy to: PyPy, the flexible snake (IRC logs: https://botbot.me/freenode/pypy/ ) | use cffi for calling C | the secret reason for us trying to get PyPy users: to test the JIT well enough that we're somewhat confident about it
<antocuni>
on the resulting graph, you can see minor collections, major collections and memory usage; you can click on each series on the legend to toggle visibility
<antocuni>
and you can zoom by using the right button of the mouse
<antocuni>
one interesting thing it shows is that near the end of a major collection, there is always one step which is very slow, up to 60 ms
<antocuni>
also, another weird behavior, is that after each collection the memory drops from ~1.2GB to ~200MB, then it quickly jumps to ~700MB. Not sure what triggers such behavior, I'd expect a more slow and steady growth
<tos9>
hmmmmmm... I think I've seen something like that before, and also didn't really know what was happening :)
<tos9>
antocuni: can you tell me how you collected that, would be interested in doing the same for my thing
dan- has quit [Ping timeout: 240 seconds]
<antocuni>
tos9: PYPYLOG=gc:foo.log pypy myapp.py
<tos9>
Cool, will give that a shot, and have a look at your tool
<antocuni>
tos9: note that my pypylog viewer shows also JIT activity if you log that as well
<tos9>
hmmmmm probably interesting, I haven't been able to get vmprof to work in awhile so maybe would want to see both
<antocuni>
and you can tweak pypytools/pypylog/view.py if you need more customization
<tos9>
antocuni: is that PYPYLOG=gc:gc.log,jit:jit.log ?
<antocuni>
no, PYPYLOG=gc,jit:foo.log
* tos9
can probably read docs
<tos9>
ah, k
<antocuni>
or even: PYPYLOG=:foo.log to get everything
<antocuni>
note that this produces huge logs
<antocuni>
another option is to use: PYPYLOG=foo.log (without the colon)
<tos9>
what kind of performance hit should I expect on that
<antocuni>
this produces a log which contains only the timestamps, not the log itself; it still works in my viewer, but you loos the 'gc-minor memory' plot
<antocuni>
in my experience it costs very little, but I have never done any precise measurement
<tos9>
k, long as it isn't 2x it's probably fine for me
<antocuni>
for my precise use case, the long GC pauses are a problem. I am thinking of starting a branch in which you can completely disable major collections, so that you can manually run them when you are not in a critical code path
<antocuni>
tos9: it's definitely much less than 2x
marky1991 has quit [Ping timeout: 240 seconds]
<antocuni>
tos9: PR to improve my viewer are welcome of course :)
* tos9
nods
<tos9>
Cool, lemme see what hte output looks like
* antocuni
afk
dan- has joined #pypy
dan- has joined #pypy
dan- has quit [Changing host]
inad924 has joined #pypy
illume has joined #pypy
mcyprian has left #pypy [#pypy]
lritter has joined #pypy
marky1991 has joined #pypy
tayfun26 has quit [Quit: tayfun26]
jacob22__ is now known as jacob22
asmeurer has quit [Quit: asmeurer]
antocuni has quit [Ping timeout: 255 seconds]
marky1991 has quit [Ping timeout: 240 seconds]
antocuni has joined #pypy
* arigato
look at issue #2826
mcyprian has joined #pypy
mcyprian has quit [Ping timeout: 256 seconds]
mcyprian has joined #pypy
marr has quit [Remote host closed the connection]
<arigato>
oops
<arigato>
it's a merge erro from default
<arigato>
error
ronan has quit [Ping timeout: 256 seconds]
inad924 has quit [Ping timeout: 240 seconds]
antocuni has quit [Ping timeout: 250 seconds]
marr has joined #pypy
user24 has joined #pypy
<kenaan>
arigo py3.5 bf0a8b696526 /pypy/objspace/std/test/test_specialisedtupleobject.py: Add a failing test from issue #2826. Add also a hypothesis test that finds the problem if run a few times
<mjacob_>
wleslie: i just saw for python binding for libfirm. are you using it for any open-source projects?
<wleslie>
I've started writing a pypy backend using it
<mjacob_>
wleslie: let's see if it turns out to be more used than my llvm backend :)
<wleslie>
you wrote a new llvm backend?
<wleslie>
after I started writing, I disappeared for about a year. moved my girlfriend over, married her, set up our house, got a new job; so yeah, just getting back to free software development.
<mjacob_>
wleslie: it's in the llvm-translation-backend branch
<wleslie>
cool; on my to-do list (:
<mjacob_>
(i didn't merge in default for a long time, but last time i tried everything worked except for one problem with threads)
<wleslie>
as for python-firm; I've been using development of the tutorial to figure out what's missing from the library, once that is done I guess I'll get back to making my backend work
<wleslie>
right now I am playing with some app-level stuff. I had to do it anyway but I think getting my app-level proof of concept working will encourage me to continue with my research (which the firm backend is a small part of).
<mjacob_>
cool, do you have a bigger research agenda?
mjacob_ is now known as mjacob
<wleslie>
I want to apply region and effect discipline to a broader range of optimisations. removing the need for garbage collection, easy parallelism of almost functional code, lazy computation of fields etc.
<mjacob>
in the context of imperative programming languages?
<wleslie>
yes, I especially wanted to deal with languages with first-class side effects.
<mjacob>
what do you mean by "first-class side effects"?
<wleslie>
you don't need anything special to write to or read from a field; only access to the object, which may be reachable from other threads..
<wleslie>
and also 'external' effects, such as calls into C libraries or non-local control flow..
illume has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<wleslie>
it's just excluding the languages with strongly-typed algebraic effects and declared exceptions
<wleslie>
*checked exceptions
Hasimir has quit [Ping timeout: 240 seconds]
<mjacob>
i'm not sure i understand -- do you say that you want to have the advantages of, say, strongly-typed algebraic effects in languages that don't have it?
Hasimir has joined #pypy
<wleslie>
I want to have some of the advantages that an optimising compiler would have when dealing with functional languages or languages with strongly-typed algebraic effects
<mjacob>
ok, i think i can see where libfirm comes into play ;)
<mjacob>
btw, are you familiar with the value state dependence graph?
<wleslie>
it was a neat find. I wasn't looking for another compiler to a target language, but armin and fijal pushed me in that direction when I was doing some offline development (saving flowgraphs to disk and analysing them)