slav0nic has quit [Remote host closed the connection]
fotis has quit [Ping timeout: 272 seconds]
fotis has joined #pypy
_whitelogger has joined #pypy
fotis has quit [Ping timeout: 265 seconds]
fotis has joined #pypy
Joannah has joined #pypy
<Joannah>
Hi all is it possible to disable GC to be added to a VM when translating it with rpython? Like how the JIT is optional. I want to isolate GC time but its hard for other RPython-based VMs like Pycket.
stkrdknmibalz has quit [Quit: WeeChat 3.0.1]
fotis has quit [Ping timeout: 255 seconds]
stkrdknmibalz has joined #pypy
fotis has joined #pypy
fotis has quit [Ping timeout: 245 seconds]
fotis has joined #pypy
Dejan has joined #pypy
greedom has joined #pypy
<antocuni>
Joannah: I'm not sure to understand the question, but RPython has support to disable the GC, see rlib.rgc.disable
greedom has quit [Remote host closed the connection]
<antocuni>
but you need to be super careful with it, else your used memory grows very quickly
<Joannah>
ok thanks. I thought we would use an option like gc=None or equivallent -NOGC when translating using e.g like pypy pypy/bin/rpython -Ojit <disable-gc-option>
<antocuni>
ah yes, I think there is also an option like that
<antocuni>
but it's probably useless, because your program will run out of memory very quickly
fotis has joined #pypy
<antocuni>
rpython --gc=none
<antocuni>
(look at rpython --help for all the possible options)
<Joannah>
I see, There are no GC hooks like gc.disable at language for other VMc like Pycket ot PySOM so I thought, disabling the GC at translation time will be the equivalent but I may be wrong I guess.
<Joannah>
*language level
<Joannah>
*VMs
fotis has quit [Ping timeout: 258 seconds]
<antocuni>
no, it's completely different
<antocuni>
because the choice of the GC changes also the way memory is allocated
<antocuni>
I think that basically the question "how much time I spend in the GC" is ill-formed
<antocuni>
e.g., does it include or not the time spent in allocating the memory?
<Joannah>
Depends on how to define GC, sometimes I define it as just time taken to collect dead objects. Isolating allocation time and mutator time is what may be harder. But measuring exact GC time can also be ill-informed even by this.
<Joannah>
I wonder also if its possible for us to implement language independent GC hooks, like what pypy has but in a general way for RPython-based interpreters? I mean things like gc.disable.
<antocuni>
that's my point: in PyPy/RPython, the GC does more than just "collecting dead objects"
<antocuni>
there are already rpython-level hooks, but then each VM has to expose them in its own way
<smarr>
if you point me at what PyPy does for gc.disable, I am happy to add that to PySOM
<Joannah>
smarr: I guess it means understanding what antocuni means by "each VM has to expose them in its own way" which am not familiar with.
<antocuni>
smarr: pypy's gc.disable is basically a thin wrapper around rgc.disable, see pypy/module/gc/interp_gc.py
greedom has quit [Remote host closed the connection]
greedom has joined #pypy
<smarr>
ok, I guess it's just calling the function.
<smarr>
Joannah: any particular way how you'd prefer this to be exposed?
<smarr>
Joannah: perhaps a command-line option to PySOM? I suppose this really just prevents the collector from running though.
<Joannah>
smarr: That works, but for PyPy we do something like "import gc gc.disable()" There can be a smalltalk-equivalent
<smarr>
Joannah: hm, a command-line option seems simpler, since it doesn't require changes to the smalltalk core library.
Dejan has quit [Quit: Leaving]
<Joannah>
smarr: Great thanks, BTW am happy to help or follow up on this. I do GC research for PyPy and some experiments on RPython-based Interpreters make sense to me. Since its one GC we write and we reuse for these VMs.
<smarr>
will look into it later tonight, but need to go now
<Joannah>
smarr: np, thanks for looking.
<smarr>
wrt to whether these experiments make sense, well, I tent to agree with what Jan said at ICOOOLPS. You might get more useful insights by taking some large Python workloads an run them on PyPy
<smarr>
PySOM is a toy, after all :)
<Joannah>
Ok, noted.
fotis has joined #pypy
marvin_ has quit [Remote host closed the connection]
marvin has joined #pypy
greedom has quit [Remote host closed the connection]
lazka has quit [Quit: bye]
lazka has joined #pypy
greedom has joined #pypy
greedom has quit [Remote host closed the connection]
greedom has joined #pypy
lazka has quit [Remote host closed the connection]
lazka has joined #pypy
lazka has quit [Client Quit]
lazka has joined #pypy
lazka has quit [Client Quit]
lazka has joined #pypy
lazka has quit [Quit: bye]
lazka has joined #pypy
fotis has quit [Ping timeout: 265 seconds]
greedom has quit [Remote host closed the connection]
fotis has joined #pypy
Atque has quit [Quit: ...]
fotis has quit [Ping timeout: 258 seconds]
fotis has joined #pypy
fotis has quit [Ping timeout: 240 seconds]
fotis has joined #pypy
fotis has quit [Ping timeout: 265 seconds]
fotis has joined #pypy
fotis has quit [Ping timeout: 240 seconds]
fotis has joined #pypy
greedom has joined #pypy
<smarr>
antocuni: hm, what does `gc.disable()` disable? I don't seem to actually disable all gc with it?
greedom has quit [Remote host closed the connection]
greedom has joined #pypy
slav0nic has joined #pypy
greedom has quit [Remote host closed the connection]
<smarr>
ok, no it works
greedom has joined #pypy
mattip has quit [Ping timeout: 258 seconds]
fotis has quit [Ping timeout: 258 seconds]
mattip has joined #pypy
fotis has joined #pypy
<arigato>
note that I remember that "rpython --gc=none" gives a result that is not only quickly dying because it runs of memory, but also it's much slower than normal to even reach that point, because of bad RAM locality
<arigato>
in other words if you try to use that to measure "the time spent in the GC", then you'll get the answer "a large negative number"
fotis has quit [Ping timeout: 268 seconds]
fotis has joined #pypy
fotis has quit [Ping timeout: 256 seconds]
fotis has joined #pypy
fotis has quit [Ping timeout: 276 seconds]
jstoker has quit [Remote host closed the connection]
jstoker has joined #pypy
fotis has joined #pypy
greedom has quit [Remote host closed the connection]
slav0nic has quit [Ping timeout: 276 seconds]
fotis has quit [Ping timeout: 255 seconds]
fotis has joined #pypy
fotis has quit [Ping timeout: 258 seconds]
stkrdknmibalz has quit [Quit: WeeChat 3.0.1]
fotis has joined #pypy
isidentical has quit [Remote host closed the connection]