Parrot 6.4.0 "Double-eyed Fig Parrot" | parrot.org/ | Log: irclog.perlgeek.de/parrot | #parrotsketch meeting Tuesday 19:30 UTC
Set by moderator on 25 May 2014.
01:10 FROGGS__ joined 04:41 sorear joined 06:50 FROGGS__ joined 07:11 basiliscos joined 07:34 maelus joined 08:28 basiliscos joined 09:47 Psyche^ joined 11:46 FROGGS joined 11:58 Tene joined 12:23 basiliscos joined 12:36 basiliscos1 joined 13:17 rurban joined
rurban_ 6.5 release today 13:24
13:42 bluescreen joined 13:55 particle joined
Coke .tell kid51 Pending parrot-nyc-users request that I can't do anything with. it's been pinging me for a few days 14:13
dalek website: rurban++ | Parrot 6.5.0 "Black-winged Lovebird" Released 15:18
website: www.parrot.org/news/2014/Parrot-6.5.0
rrot: fed40d8 | rurban++ | / (6 files):
Release 6.5.0 - Black-winged Lovebird

Also update PLATFORMS, CREDITS, glossary (for Write Barriers)
15:21
rrot: a83dace | rurban++ | tools/release/templates.json:
[release] improve wording of crow template

and harmonize text with html: "Our next scheduled release is at"
moderator Parrot 6.5.0 "Black-winged Lovebird" | parrot.org/ | Log: irclog.perlgeek.de/parrot | #parrotsketch meeting Tuesday 19:30 UTC 15:21
15:55 travis-ci joined
travis-ci [travis-ci] parrot/parrot#1049 (master - a83dace : Reini Urban): The build passed. 15:55
[travis-ci] Change view : github.com/parrot/parrot/compare/4...3dace6f677
[travis-ci] Build details : travis-ci.org/parrot/parrot/builds/27783813
15:55 travis-ci left
rurban_ Chirag: I added the 2nd task: github.com/parrot/parrot/issues/1080 16:11
16:18 FROGGS joined 16:46 Chirag joined
Chirag rurban: Hey! yes.. I saw the new task last night itself but sorry I wasn't at home .. 16:48
rurban_ No prob. I doubt that we will gain that much, but we will see. I am doing more rakudo profiling later. 16:52
This is easily testable by jusy expanding some generated C files manually
Chirag hmm.. 16:55
u mentioned that you are trying to figure out the main bottlenecks.. do you have any candidates? 16:56
rurban_ fill_params the first behind the GC, with 2.1% and 2nd is Parrot_pcc_build_sig_object_from_op 17:09
Chirag ok.. 17:11
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:13
rurban_ Tonight 17:14
so you got 3 hrs for feedback
but I hope I'll catch some time online in the wilderness
I'll be online again on Sunday 17:15
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.
Then look at pmc2c where to change the Parrot_pcc_fill_params_from_c_args logic to emit the code you created manually 17:18
Should be less work than the WBs but a bit trickier 17:19
Could be even done in a day or two :)
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 :)
just one file
That's why it's easier
Chirag ah
let me try :) 17:23
rurban_ but it's perl5 and c code
But it's easier to get the C code right first, test that and encode that knowledge then into pmc2c 17:24
Only for PCCMETHODs
Chirag is the name pcc-gh1080 fine for a branch? 17:30
rurban_ sure
I'm still busy with rakudo benchmarking, so I cannot profile rakudo hotspots right now 17:31
17:31 basiliscos joined
Chirag alright.. 17:31
umm.. I can't find the body for the function Parrot_pcc_fill_params_from_c_args 17:54
rurban_ src/call/args.c 17:55
git grep bla
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
rurban_ and grep src/pmc/*.c for it and see the different sigs
Pi and PiP the most common I guess. The easiest to test would be Pi 17:57
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
acos is easy, only self as arg 17:59
and no return value
sorry, it actually does return a P 18:00
Chirag so do I change set_call_from_c_args as well? 18:02
I mean now.. 18:03
while testing
rurban_ yes, you can. But I would prefer tiny steps. First the input args, then the return arg 18:04
Chirag sure 18:05
rurban_ The Parrot_pcc_set_call_from_c_args is is either P S or I 18:06
Never an N so far
filehandle has one "II" though
grep -A1 Parrot_pcc_set_call_from_c_args src/pmc/*.c|grep '"' 18:07
not to forget src/dynpmc/*.c also
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
loop over the sig types and generate the conversion code 18:10
one char by one. you just have to lookup the various sig converters. fairly easy
Chirag yes .. or maybe switch cases
rurban_ P for PMC, i for SELF, I for INTVAL, S for STRING, N for number, ... 18:11
perl5 has no switch
Chirag oh
will figure a way out :)
rurban_ just come up with a prototype. I'll improve it then
I told you. It's a bit of perl5 involved also 18:12
18:14 rurban joined 18:23 rurban joined
Chirag is 'make test' after a make clean, the best way to test? 18:40
no
it will overwrite the c file
rurban_ no make clean. just make and prove t/pmc/float.t 18:44
Chirag yeah 18:46
rurban_ I do something like alias ms='make -s -j4' and ms 18:47
split(//,$sig) splits a string in an array of chars. for (split(//,$sig)) {print $_ } iterates over the sig chars 19:12
Chirag thanks! that will help :) 19:18
Util #ps time 19:35
Chirag rurban: There will not be any variable arguments for fill_params_from_c_args .. as well right?? 19:57
rurban_ you mean now or later? 19:59
now it calls a varargs function (which is overhead) and later not.
Chirag later as well
rurban_ no
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
"P" => *accessor->pmc(interp, arg_info, param_index) = 20:01
VTABLE_get_pmc_keyed_int(interp, call_object, arg_index);
only one line I think
all the other overhead is not needed at compile-time 20:02
Chirag wait.. this is for which method? 20:03
rurban_ this is the code for P 20:04
see fill_params() in args.c
And the *accessor->pmc() overhead is also not needed 20:06
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
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?
rurban_ Parrot_pcc_fill_params_from_c_args -> Parrot_pcc_fill_params_from_varargs -> fill_params 20:11
lot of varargs madness 20:12
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)
no.. that goes through .. va_start in .c creates a problem 20:21
rurban_ m -s parrot_old && ./parrot_old t/pmc/float.t
something like this: gist.github.com/rurban/08084967f8ea5762d6de 20:22
but I guess the indices are wrong
so just set the indices in the call object 20:24
you can check the CallContext PMC which arrays to set 20:26
Chirag in ur gist the first one should be get instead of set? 20:34
rurban_ no, self must be assigned to the 0th or 1th index in the CallContext 20:36
haven't checked. you can debug through the old version which codepath is followed.
the return value also just sets an index in CallContext I guess 20:37
so compile with -g3 and gdb into it
Chirag ok.. 20:38
rurban_ .gdbinit: set breakpoint pending on
b Parrot_Float_nci_acos
best in two versions: old and new. in 2 different dirs. and 2 different gdb sessions
then you can compare the _call_object 20:39
or just check the old one
Chirag sure!
20:40 davidfetter joined
rurban_ param_count=1 20:43
oops, you were right. 20:47
_self = VTABLE_get_pmc_keyed_int(interp, _call_object, 0); it is
updated gist.github.com/rurban/08084967f8ea5762d6de 20:48
works good
Also looks much better than the old code. A method is actually readable now 20:49
I'll have to leave now. bye and have fun :) 20:50
You can also ask Util about perl5 tricks
Chirag Yeah thanks! You have a great vacation :)
Sure!