Perl 6 - the future is here, just unevenly distributed

IRC log for #parrot, 2014-06-17

Parrot | source cross referenced

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

All times shown according to UTC.

Time Nick Message
01:10 FROGGS__ joined #parrot
04:41 sorear joined #parrot
06:50 FROGGS__ joined #parrot
07:11 basiliscos joined #parrot
07:34 maelus joined #parrot
08:28 basiliscos joined #parrot
09:47 Psyche^ joined #parrot
11:46 FROGGS joined #parrot
11:58 Tene joined #parrot
12:23 basiliscos joined #parrot
12:36 basiliscos1 joined #parrot
13:17 rurban joined #parrot
13:24 rurban_ 6.5 release today
13:42 bluescreen joined #parrot
13:55 particle joined #parrot
14:13 Coke .tell kid51 Pending parrot-nyc-users request that I can't do anything with. it's been pinging me for a few days
15:18 dalek website: rurban++ | Parrot 6.5.0 "Black-winged Lovebird" Released
15:18 dalek website: http://www.parrot.org/news/2014/Parrot-6.5.0
15:21 dalek parrot: fed40d8 | rurban++ | / (6 files):
15:21 dalek parrot: Release 6.5.0 - Black-winged Lovebird
15:21 dalek parrot:
15:21 dalek parrot: Also update PLATFORMS, CREDITS, glossary (for Write Barriers)
15:21 dalek parrot: review: https://github.com/parrot/parrot/commit/fed40d8394
15:21 dalek parrot: a83dace | rurban++ | tools/release/templates.json:
15:21 dalek parrot: [release] improve wording of crow template
15:21 dalek parrot:
15:21 dalek parrot: and harmonize text with html: "Our next scheduled release is at"
15:21 dalek parrot: review: https://github.com/parrot/parrot/commit/a83dace6f6
15:21 Topic for #parrot is now Parrot 6.5.0 "Black-winged Lovebird" | http://parrot.org/ | Log: http://irclog.perlgeek.de/parrot | #parrotsketch meeting Tuesday 19:30 UTC
15:55 travis-ci joined #parrot
15:55 travis-ci [travis-ci] parrot/parrot#1049 (master - a83dace : Reini Urban): The build passed.
15:55 travis-ci [travis-ci] Change view : https://github.com/parrot/parrot/c​ompare/40fd53ae0949...a83dace6f677
15:55 travis-ci [travis-ci] Build details : http://travis-ci.org/parrot/parrot/builds/27783813
15:55 travis-ci left #parrot
16:11 rurban_ Chirag: I added the 2nd task: https://github.com/parrot/parrot/issues/1080
16:18 FROGGS joined #parrot
16:46 Chirag joined #parrot
16:48 Chirag rurban: Hey! yes.. I saw the new task last night itself but sorry I wasn't at home ..
16:52 rurban_ No prob. I doubt that we will gain that much, but we will see. I am doing more rakudo profiling later.
16:52 rurban_ This is easily testable by jusy expanding some generated C files manually
16:55 Chirag hmm..
16:56 Chirag u mentioned that you are trying to figure out the main bottlenecks.. do you have any candidates?
17:09 rurban_ fill_params the first behind the GC, with 2.1% and 2nd is Parrot_pcc_build_sig_object_from_op
17:11 Chirag ok..
17:13 Chirag when r u leaving for your vacation? I think it would be nice if I can set myself and start... that way I will be trouble-free during that week
17:14 rurban_ Tonight
17:14 rurban_ so you got 3 hrs for feedback
17:14 rurban_ but I hope I'll catch some time online in the wilderness
17:15 rurban_ I'll be online again on Sunday
17:17 Chirag oh
17:17 rurban_ How I would start. Take one method with e.g. and easy short one as sig (PiP or I) and manually edit the c file and check if it works.
17:18 rurban_ Then look at pmc2c where to change the Parrot_pcc_fill_params_from_c_args logic to emit the code you created manually
17:19 rurban_ Should be less work than the WBs but a bit trickier
17:19 rurban_ Could be even done in a day or two :)
17:22 Chirag okay.. thats encouraging .. but I have to make changes to all the 95 files, right?
17:22 rurban_ Nope. just the compiler this time :)
17:22 rurban_ just one file
17:22 rurban_ That's why it's easier
17:22 Chirag ah
17:23 Chirag let me try :)
17:23 rurban_ but it's perl5 and c code
17:24 rurban_ But it's easier to get the C code right first, test that and encode that knowledge then into pmc2c
17:24 rurban_ Only for PCCMETHODs
17:30 Chirag is the name pcc-gh1080 fine for a branch?
17:30 rurban_ sure
17:31 rurban_ I'm still busy with rakudo benchmarking, so I cannot profile rakudo hotspots right now
17:31 basiliscos joined #parrot
17:31 Chirag alright..
17:54 Chirag umm.. I can't find the body for the function  Parrot_pcc_fill_params_from_c_args
17:55 rurban_ src/call/args.c
17:55 rurban_ git grep bla
17:56 rurban_ git grep Parrot_pcc_fill_params_from_c_args will also show you the 2 places in pmc2c
17:56 Chirag oops .. overlooked args.c with the pmcs
17:56 rurban_ and grep src/pmc/*.c for it and see the different sigs
17:57 rurban_ Pi and PiP the most common I guess. The easiest to test would be Pi
17:58 Chirag yes I am testing with Float.c :: Parrot_Float_nci_acos
17:58 rurban_ but maybe start with a complicated case, with mult. args: PiPP or PiSPoIp
17:59 rurban_ acos is easy, only self as arg
17:59 rurban_ and no return value
18:00 rurban_ sorry, it actually does return a P
18:02 Chirag so do I change set_call_from_c_args  as well?
18:03 Chirag I mean now..
18:03 Chirag while testing
18:04 rurban_ yes, you can. But I would prefer tiny steps. First the input args, then the return arg
18:05 Chirag sure
18:06 rurban_ The Parrot_pcc_set_call_from_c_args is is either P S or I
18:06 rurban_ Never an N so far
18:06 rurban_ filehandle has one "II" though
18:07 rurban_ grep -A1 Parrot_pcc_set_call_from_c_args src/pmc/*.c|grep '"'
18:07 rurban_ not to forget src/dynpmc/*.c also
18:09 Chirag hmm.. so basically that one substitution of code in PCCMETHOD.pm should generate correct .c code for all these c files ..
18:09 rurban_ yes
18:10 rurban_ loop over the sig types and generate the conversion code
18:10 rurban_ one char by one. you just have to lookup the various sig converters. fairly easy
18:10 Chirag yes .. or maybe switch cases
18:11 rurban_ P for PMC, i for SELF, I for INTVAL, S for STRING, N for number, ...
18:11 rurban_ perl5 has no switch
18:11 Chirag oh
18:11 Chirag will figure a way out :)
18:11 rurban_ just come up with a prototype. I'll improve it then
18:12 rurban_ I told you. It's a bit of perl5 involved also
18:14 rurban joined #parrot
18:23 rurban joined #parrot
18:40 Chirag is 'make test' after a make clean, the best way to test?
18:40 Chirag no
18:40 Chirag it will overwrite the c file
18:44 rurban_ no make clean. just make and prove t/pmc/float.t
18:46 Chirag yeah
18:47 rurban_ I do something like alias ms='make -s -j4' and ms
19:12 rurban_ split(//,$sig) splits a string in an array of chars. for (split(//,$sig)) {print $_ } iterates over the sig chars
19:18 Chirag thanks! that will help :)
19:35 Util #ps time
19:57 Chirag rurban: There will not be any variable arguments for fill_params_from_c_args .. as well right??
19:59 rurban_ you mean now or later?
19:59 rurban_ now it calls a varargs function (which is overhead) and later not.
19:59 Chirag later as well
19:59 rurban_ no
20:00 Chirag because va_start and va_end give an error since only fixed variables allowed
20:00 rurban_ Just the need parts in fill_params should be inlined into the generated C code
20:01 rurban_ "P" =>                 *accessor->pmc(interp, arg_info, param_index) =
20:01 rurban_ VTABLE_get_pmc_keyed_int(interp, call_object, arg_index);
20:01 rurban_ only one line I think
20:02 rurban_ all the other overhead is not needed at compile-time
20:03 Chirag wait.. this is for which method?
20:04 rurban_ this is the code for P
20:04 rurban_ see fill_params() in args.c
20:06 rurban_ And the *accessor->pmc() overhead is also not needed
20:08 Chirag I was only worrying about Parrot_pcc_fill_params_from_c_args()
20:08 rurban_ well, Parrot_pcc_fill_params_from_c_args just calls fill_params which is the real overhead. Esp. if only 1-2 lines are needed from there
20:10 rurban_ fill_params is right after the GC the major bottleneck, and if you look at it you'll see why
20:10 Chirag how does it call .. there is no explicit statement?
20:11 rurban_ Parrot_pcc_fill_params_from_c_args -> Parrot_pcc_fill_params_from_varargs -> fill_params
20:12 rurban_ lot of varargs madness
20:13 rurban_ parse_signature_string is also not needed at all for our METHOD call madness
20:13 Chirag I commented that because I was getting an error that variable arguments not allowed... (for float::acos)
20:21 Chirag no.. that goes through .. va_start in .c creates a problem
20:21 rurban_ m -s parrot_old && ./parrot_old t/pmc/float.t
20:22 rurban_ something like this: https://gist.github.com/ru​rban/08084967f8ea5762d6de
20:22 rurban_ but I guess the indices are wrong
20:24 rurban_ so just set the indices in the call object
20:26 rurban_ you can check the CallContext PMC which arrays to set
20:34 Chirag in ur gist the first one should be get instead of set?
20:36 rurban_ no, self must be assigned to the 0th or 1th index in the CallContext
20:36 rurban_ haven't checked. you can debug through the old version which codepath is followed.
20:37 rurban_ the return value also just sets an index in CallContext I guess
20:37 rurban_ so compile with -g3 and gdb into it
20:38 Chirag ok..
20:38 rurban_ .gdbinit: set breakpoint pending on
20:38 rurban_ b Parrot_Float_nci_acos
20:38 rurban_ best in two versions: old and new. in 2 different dirs. and 2 different gdb sessions
20:39 rurban_ then you can compare the _call_object
20:39 rurban_ or just check the old one
20:39 Chirag sure!
20:40 davidfetter joined #parrot
20:43 rurban_ param_count=1
20:47 rurban_ oops, you were right.
20:47 rurban_ _self = VTABLE_get_pmc_keyed_int(interp, _call_object, 0); it is
20:48 rurban_ updated https://gist.github.com/ru​rban/08084967f8ea5762d6de
20:48 rurban_ works good
20:49 rurban_ Also looks much better than the old code. A method is actually readable now
20:50 rurban_ I'll have to leave now. bye and have fun :)
20:50 rurban_ You can also ask Util about perl5 tricks
20:50 Chirag Yeah thanks! You have a great vacation :)
20:50 Chirag Sure!

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

Parrot | source cross referenced