Camelia, the Perl 6 bug

IRC log for #moarvm, 2013-08-05

| Channels | #moarvm index | Today | | Search | Google Search | Plain-Text | summary

All times shown according to UTC.

Time Nick Message
00:01 diakopter jnthn: well, they compiled without error...
00:01 diakopter good sign I guess
00:01 jnthn o.O
00:01 jnthn wow :)
00:03 jnthn So we get an nqp.moarvm out? :)
00:05 jnthn 'night
00:08 diakopter no
00:08 diakopter well
00:21 diakopter No registered operation handler for 'freshcoderef'
00:21 diakopter :)
00:21 diakopter bbiab
00:27 benabik joined #moarvm
01:37 JimmyZ Good morning
01:47 colomon joined #moarvm
01:49 benabik o/ JimmyZ
01:49 benabik And good evening.  :-)
01:56 diakopter hi :)
01:56 diakopter time to figure out what freshcoderef does
01:58 diakopter hm, can't copy the jvm implementation because it .. clones the staticref
01:58 diakopter but we can't do that in moarvm
01:58 JimmyZ diakopter: thanks for fixing nqp:splice, but compared pir code, there is a retrogress
01:59 * JimmyZ hopes that is a step debugger for nqp
02:00 diakopter compared to pir code?
02:00 diakopter what regression
02:00 diakopter JimmyZ: ^
02:00 JimmyZ diakopter: 00096   splice       loc_0_obj, loc_2_obj, loc_6_int, loc_8_int
02:00 JimmyZ 00097   set          loc_0_obj, loc_2_obj
02:01 JimmyZ generated pir code is not set op
02:01 JimmyZ I still think it lost $*WANT somewhere
02:02 JimmyZ s/not/no/
02:02 diakopter hm, I'm not sure why it's setting 2 to 0
02:02 diakopter that seems wrong
02:02 diakopter but really I'd ignore it for now
02:03 ggoebel joined #moarvm
02:03 JimmyZ yeah, I'm looking for a nqp step debuger
02:03 JimmyZ :P
02:06 * diakopter wonders if TimToady would use Eclipse if there was awesome p6 tooling
02:06 JimmyZ or padre
02:09 JimmyZ diakopter: are you trying added some cool tools to Eclipse?
02:09 diakopter no
02:09 diakopter just musing.
02:10 JimmyZ :P
02:52 Alpha64 joined #moarvm
04:07 harrow joined #moarvm
04:35 harrow joined #moarvm
04:49 birdwindupbird joined #moarvm
04:58 crab2313 joined #moarvm
05:05 JimmyZ diakopter: I found why, but I don't know how to fix it :(
05:08 JimmyZ diakopter: In nqp on parrot ,the compile_all_the_stmts methods gives a :want('v'), where in MoarVM, it doesn't
06:27 FROGGS joined #moarvm
06:37 FROGGS JimmyZ: can you create an issue so that we don't forget about the real problem behind splice?
06:39 JimmyZ yes, maybe after moving back to NQP/src/vm/MoarVM
06:40 FROGGS yeah right, doesn't sound to happen far in the future from what I read in the backlog...
06:41 JimmyZ hehe
07:31 jnthn good moarning o
07:31 jnthn o/
07:32 JimmyZ good morning, jnthn
07:46 japhb o/
07:47 jnthn japhb! \o/
07:47 jnthn Long time no see :)
07:47 japhb Long time no chat.  :-)
07:47 jnthn How goes?
07:47 japhb How have you been?
07:47 jnthn Not bad. Had some nice vacation last week :)
07:47 japhb Jinx.  :-)
07:47 jnthn hah
07:47 japhb Where did you go?
07:48 jnthn Switzerland
07:48 japhb Alps hiking?
07:48 jnthn Some hiking, some just looking on in awe :)
07:49 jnthn Managed to make it to a place where you could get some really good views of the aletsch glacier.
07:50 japhb Cool.  I've always wanted to go glacier watching, but just haven't gotten around to it somehow.  :-/
07:51 japhb So from reading planetsix, it sounds like Rakudo-JVM is doing pretty damn well.
07:51 japhb How are things going in MoarVM land?
07:52 jnthn They're going, mostly thanks to the efforts of folks other than me. Didn't get NQP bootstrapped yet, but closing in on it...
07:52 jnthn Your bigint stuff was merged.
07:52 japhb \o/
07:53 jnthn bbi10
07:53 japhb I assume then that you did whatever you needed to in the lower layers to unblock the remaining bigint work?
07:53 * japhb has forgotten the details of that.  :-(
07:56 japhb Time to get some shut-eye.
07:56 japhb bbitm &
08:02 diakopter FROGGS: the real problem?
08:04 diakopter FROGGS: I don't understand how my solution wouldn't also work
08:04 FROGGS diakopter: the real problem is that $*WANT should be defined and zero, but it is undef for some reason... if it would be zero it wouldnt try to box it to an obj
08:04 diakopter jnthn: ping
08:05 FROGGS diakopter: it works, like that worked what JimmyZ++ reverted (the commit I showed you), but it just hides the "real problem", no?
08:07 diakopter well it covers all the same cases, but whatevs, I'll push the other fix
08:09 diakopter jnthn: I need to ask you about some of these unimplemented coderef ops
08:09 diakopter some of them assume that staticframeinfo is a 6model object
08:09 diakopter (which it is on jvm)
08:10 diakopter so should it become that on moarvm? or do u have some other way of storing a distinct mvmcode object on each staticframeinfo
08:10 diakopter ...
08:10 diakopter or... am I misunderstanding greatly
08:12 diakopter FROGGS: actually, I suspect it needs both fixes
08:13 FROGGS yeah, that sounds about right
08:17 jnthn diakopter: staticframeinfo isn't a 6model object on the JVM, but it is a plain old JVM object and will get GC'd at the appropriate point
08:18 jnthn I agree we need to do something more interesting on Moar. When I was last doing GC bits, I did start considering if compunit and staticframe should be collectable things.
08:19 jnthn For one because we then can just put them under the generational scheme and never have to consider them in nursery scans in the common case.
08:20 jnthn I guess the other question, though, is exactly what freshcoderef wants to have unique to itself...
08:21 diakopter right
08:21 diakopter (was what I was pondering)
08:22 diakopter er
08:22 diakopter staticcodeinfo is a 6model object on the jvm
08:23 diakopter did sorear make it one without you noticing?
08:24 jnthn public class StaticCodeInfo implements Cloneable {
08:24 jnthn ...don't see it inheriting from SixModelObject ?
08:24 diakopter oh hm.
08:24 diakopter how in the world..
08:24 diakopter (..did I think that?)
08:25 diakopter anyway, ok
08:25 diakopter yes, we'll leak memory with throwaway evals
08:26 diakopter without GC'ing those... *and* their bytecode
08:26 JimmyZ diakopter: FROGGS the real problem is http://irclog.perlgeek.de/m​oarvm/2013-08-05#i_7410591
08:26 diakopter compilation units
08:26 diakopter yes yes I fixed it
08:26 diakopter will push it with the rest of these
08:26 JimmyZ ah, diakopter++
08:28 diakopter jnthn: actually, the compilation unit also needs collectable too..
08:28 jnthn aye
08:29 diakopter jnthn: we can make them p6opaque if you want... just with structs to cast them to also. ;)
08:29 diakopter well, they're pretty complex and large, nm
08:29 diakopter :D
08:59 crab2313 joined #moarvm
09:02 JimmyZ jnthn: please take a look at readlineintfh2 branch when you have time :P
10:43 flussence_ joined #moarvm
10:46 japhb_ joined #moarvm
11:07 crab2313 joined #moarvm
11:55 colomon joined #moarvm
12:27 JimmyZ Good evening
12:27 FROGGS hi JimmyZ
12:30 hoelzro joined #moarvm
12:33 JimmyZ hi FROGGS
12:34 FROGGS gah, it is 2:30pm and I'm almost falling asleep
12:35 tadzik I've had this since 9 :/
12:35 FROGGS :/
12:45 crab2313 joined #moarvm
12:49 crab2313_ joined #moarvm
14:43 bronco_creek joined #moarvm
15:12 Alpha64 joined #moarvm
15:29 diakopter jnthn: howdy
15:30 jnthn o/ diakopter
15:31 diakopter jnthn: fell asleep while coding last night..
15:32 jnthn diakopter: Did you dream about the code?
15:32 diakopter it dreamt about me
15:32 jnthn :P
15:33 * FROGGS imagines diakopter only covered by code snippets
15:34 diakopter O_O
15:35 diakopter opaque code snippets, I hope. hahaha.
15:35 FROGGS *g*
15:36 * jnthn doesn't say anything about the opacity of diakopter's code :P
16:09 FROGGS joined #moarvm
16:17 FROGGS ahhh, home sweet home
16:23 diakopter jnthn: lololol
16:40 diakopter jnthn: so... what's the verdict on repr-ifying staticinfo and compunit
16:40 diakopter I'm glad to do it; I know what's needed
16:41 diakopter (it's holding up me implementing these 4 related ops)
16:42 diakopter personally I don't know why a staticinfo needs to hold onto a code object.. if there's already a mvmcode that's holding another mvmcode and marked static
16:42 jnthn diakopter: I had at least the compunit bit of it on my todo list for a while, but never got there. :)
16:43 jnthn diakopter: I think it makes sense to go that way with staticinfo too
16:43 jnthn diakopter: Especially after noting how having to walk them all every nursery collect gets painful once you end up with a lot of stuff loaded.
16:45 diakopter k
16:48 diakopter well, that's the easy answer to my last question I guess :)
16:48 diakopter (just copy how jvm does it)
16:49 diakopter (I don't mean to detract from easy answers, btw)
16:51 jnthn The main thing I want to avoid is having every single frame contribute to GC overhead, which is why those are ref-counted.
16:51 jnthn The frame pool means we avoid allocating at all in steady state.
16:51 jnthn Making comp units and static code info GC-able doesn't hurt here, and could indeed help by making us consider them less.
16:52 diakopter could, yeah, hrm
16:53 diakopter jnthn: thanks for your answers.  on another note, could you write out (in a gh issue perhaps?) the things remaining with the GC so ... more than 1 person remembers them :)
16:53 diakopter I think there were 2 medium-sized issues
16:53 Alpha64 left #moarvm
16:53 diakopter I feel prepared to tackle GC debugging/fleshing at some point this week
16:54 diakopter gh=github, not greenhopper. ;)
16:54 jnthn diakopter: Well, my main problem was not quite knowing what was wrong.
16:54 jnthn diakopter: I can dig up my test case that hit issues for others to do some debugging on though. :)
16:55 diakopter oh, that one
16:55 diakopter I was thinking of the permgen links to nursery things
16:56 jnthn Oh, I already spent some time on that :)
16:58 diakopter I know; I just wanted to know where you left off and what was left
16:59 jnthn I *thought* I'd dealt with those problems already.
17:00 diakopter ohhh
17:00 diakopter didn't realize
17:00 diakopter I thought that was still outstanding
17:05 diakopter jnthn++
17:05 diakopter jnthn*=jnthn
17:16 diakopter jnthn: one of the threads tests still hangs for me on windows
17:16 diakopter does it for you?
17:17 FROGGS it fails on linux sometimes
17:19 jnthn diakopter: It's inconsistent.
17:19 jnthn It tends to apss at the moment
17:19 jnthn But I did see it fail occasionally in the past
17:22 diakopter FROGGS: which test
17:22 diakopter on linux
17:23 diakopter test 5 hangs for me on windows
17:23 FROGGS diakopter: nqp-cc/t/moar/threads.t
17:23 diakopter which test in there
17:23 FROGGS hmmm, no idea
17:23 diakopter can you run it?
17:24 diakopter nqp file
17:25 FROGGS I'm currently recompiling to do that, yes
17:32 FROGGS diakopter: it doesnt output anything except "Can't free STables in gen2 GC yet"
17:33 diakopter which doesn't output anything?
17:33 diakopter test 1?
17:33 diakopter it doesn't even say 1..6 ?
17:53 FROGGS diakopter: here https://gist.github.com/FR​OGGS/3db2bca4a188a2c1b592
17:53 FROGGS test number 6 fails
17:54 diakopter k
17:54 yoleaux 17:37Z <nsh> diakopter: WATCH OUT RIGHT ANGLES ARE VENTING SODOM
17:54 yoleaux 17:37Z <dpk> diakopter: 6.2 i think
17:55 diakopter wat.
17:55 FROGGS ?
18:17 diakopter jnthn: can I store the mast types in the hllconfig?
18:18 diakopter jnthn: or just make separate getter/setter ops
18:33 diakopter jnthn: hm, this increases the places that need MVMROOT... :/
18:34 crab2313 joined #moarvm
18:36 benabik joined #moarvm
18:37 diakopter jnthn:  .... dramatically]
18:37 diakopter ah well..
18:39 jnthn diakopter: No, the types should be passed in a hash to the eval op, I think.
18:39 diakopter hm, ok
18:40 jnthn nqp::mvmcompile($tree, nqp::hash('lexical', MAST::Lexical, ... ))
18:41 diakopter jnthn: that returns a compilation unit?
18:42 diakopter or a code of the entry point?
18:43 jnthn Probably a compilation unit...on JVM I had two ops, one to produce an in-memory thing like eval, one that spat the bytecode out to disk
18:43 diakopter k
18:43 diakopter .. adding a BOOTStaticFrame and BOOTCompUnit ..
18:48 diakopter .. that was far easier since I macroized those...
19:27 diakopter jnthn: and a jillion more MVM_ASSIGN_REFs
19:28 jnthn diakopter: yes, we may be missing some of those :)
19:28 jnthn diakopter: Where are you needing more? :)
19:28 diakopter lolol
19:28 diakopter all over... tons of places in bytecode.c and frame.c
19:29 diakopter (because of promoting, I mean demoting, staticframe and compunit to collectables)
19:30 jnthn ah :)
19:30 jnthn yeah
19:30 diakopter I'm trying to be rigorous and careful
19:30 diakopter I'm sure I'll miss some
19:30 jnthn One day, I'll have time to do a code review of all the things :)
19:30 FROGGS ALL TEH THINGS
19:30 diakopter haha
19:32 masak demoting them to collectables? you mean like Pokemon? :P
19:33 diakopter get back in your ball
19:33 jnthn And the GC is having a peek-at-you? :P
19:33 diakopter wow.
19:36 diakopter jnthn: ok, tougher question.. make STables GC'able? (yes, they can be circular!) also.  SerializationContexts?
19:37 diakopter oh wait, SCs already are... duh.
19:38 diakopter jnthn: so... STables? :D
19:40 diakopter btw, I suggested to rurban he implement man_or_boy in potion for p2... b/c with its JIT I don't think it's possible
19:42 arnsholt Why wouldn't it be possible?
19:42 masak jnthn: in Soviet Russia, the GC is having a peek at you.
19:42 diakopter arnsholt: b/c it's really luajit underneath, which uses the cpu stack for the callstack
19:43 arnsholt Ah, right
19:43 diakopter and man_or_boy gets hundreds of thousands of ... yeah
19:43 diakopter er
19:43 diakopter it's not luajit.
19:43 diakopter <- forgot
19:43 diakopter it's another jit.. but works similarly
19:44 jnthn diakopter: STables already are
19:45 jnthn diakopter: They're not MVMObject, but they're MVMCollectable
19:45 diakopter yeah.. I guess I meant, .. ok.
19:45 diakopter nm
19:45 diakopter <- especially stupid today
19:45 jnthn ;)
19:51 diakopter well, that's a large diff
19:55 FROGGS does `git status` tell you you did a >80% rewrite of MoarVM?
19:58 diakopter hee
19:59 diakopter 30 files modified
19:59 diakopter so far
20:00 diakopter jnthn: the self-replacing stubs in the regex engine are interesting
20:00 diakopter reminds me of the speedup I did for moose that cut startup time dramatically.. but a patch they haven't yet accepted
20:23 diakopter jnthn: I just realized the current atomic counter isn't sufficient for tracking static frames' frame pool caches on each threadcontext, since we'll now be freeing them.. so we'll need a freelist also
20:24 diakopter er, instead
20:24 diakopter .. which is fine
20:26 jnthn hm, yes
20:26 jnthn Though, maybe we don't care to cache such dynamic frames
20:26 jnthn Hm, or we do. I dunno, I'd have to dig a bit and I'm already digging a bunch of other things :)
20:26 diakopter I dunno. std, for instance, uses enormous amounts of eval
20:27 jnthn ah, I see
20:27 jnthn Yeah...you're right
20:27 cognominal joined #moarvm
20:30 diakopter jnthn: you know... we could still cache MVMFrames of the same sizes as long as we allocated them in 2gen first.. eliminating the GC pressure just as much as currently
20:31 diakopter er, GC overhead, as you said
20:31 diakopter .. and pressure
20:34 FROGGS I think there are no other non-latin chars left
20:35 FROGGS ww
20:36 colomon joined #moarvm
20:38 diakopter jnthn: what do I do with teh head_compunit list on instance? :S
20:38 diakopter put a lock on it and make it doubly-linked?
20:42 jnthn diakopter: Well, additions can go at the HEAD and be CAS'd
20:42 diakopter oh, I guess removals are via the gc, so naturally locked
20:42 jnthn Removals...I guess those are when it's GC'd and we dknow we're in "stop the world" situation there.
20:43 diakopter <- wins
20:43 jnthn yeah, but you're not refactoring Rakudo module loading to try and load Java libs at the same time :P
20:44 diakopter sigh
20:56 diakopter jnthn: MVM_ASSIGN_REF(tc, sc, ((MVMSerializationContext *)sc)->body->handle, handle);
20:56 diakopter body.handle?
20:57 diakopter yes, surely
20:58 jnthn diakopter: No, it's held at a level of indirection.
20:58 jnthn diakopter: The SCs are stored in a kind of "weak hash" arrangement.
20:58 diakopter struct _MVMString *handle
20:59 jnthn The -> is about body, not handle.
20:59 diakopter ->body->handle
20:59 jnthn Right.
20:59 diakopter but body's not a pointer.. oh, or is it?
20:59 jnthn Serialization contexts hold their "body" a level of indirection off
20:59 diakopter oh, it is.
20:59 jnthn Unlike other things.
20:59 diakopter heh, oh.
20:59 diakopter that's wee-uhd
21:00 jnthn I know.
21:00 * jnthn can hack too :P
21:00 diakopter :D
21:03 Alpha64 joined #moarvm
21:18 diakopter jnthn: actually..
21:19 diakopter I can't use MVM_ASSIGN_REF when assigning a static frame to a member of MVMFrame... so now what
21:19 jnthn diakopter: It's just a normal C assignment.
21:19 jnthn The active frames we have always need to be walked in a GC run.
21:20 jnthn At the moment we "go hunting" for them, but I've pondered just keeping a per-thread double-linked-list.
21:20 jnthn Given that they are cached per-thread anyway
21:20 diakopter hrm
21:20 jnthn An the GC just traverses that to find roots.
21:20 jnthn *And
21:20 jnthn That would be quite a cleanup.
21:20 diakopter ?
21:20 diakopter what would be a cleanup
21:21 jnthn Cleanup ain't quite the word I wanted
21:21 jnthn Performance win, perhaps, though.
21:21 diakopter what would
21:21 jnthn At the moment, anything that refs a frame has to be considered in ever collection.
21:21 jnthn *every
21:21 jnthn When an object that references an MVMFrame is promoted to gen2, it's also put into the "points to nursery"
21:21 jnthn As it may well do os.
21:21 jnthn *so
21:22 diakopter ok
21:22 jnthn grep for refs_frame, iirc
21:22 diakopter seen it
21:25 diakopter jnthn: you didn't comment on my comment about mvmframe collectable
21:27 jnthn Yeah. The problem is one of lifetime.
21:27 diakopter why?
21:27 jnthn The frame refcounting means we know as soon as a frame dies.
21:27 jnthn Which may be very soon.
21:27 jnthn And can recyle it right away, maybe for an immediate next call.
21:28 jnthn Meaning we may never end up with more than one of them allocated and being re-used.
21:28 jnthn If we do them with the GC, we can't return them to the cache until the next collect.
21:28 jnthn Which could be in quite a while if we have a 2 meg nursery size, for example.
21:29 diakopter yeah, I guess you wouldn't want to refcount *and* gc...
21:30 Alpha64 left #moarvm
21:31 jnthn aye, that's most likely a path to insanity
21:35 diakopter jnthn: hm, seems we need a version of MVM_ASSIGN_REF that does CAS
22:22 diakopter ..or not
22:22 diakopter .. but at least now I know how to do it if we do need it
22:22 jnthn :)
22:23 * diakopter played 5 games of ping pong in the interim
23:03 nwc10 joined #moarvm

| Channels | #moarvm index | Today | | Search | Google Search | Plain-Text | summary