Index

Show enters and exits. Hide enters and exits.

00:59:41rueslava: I hear swine flu spreads through bindings..
02:27:28evananyone who commits a primitive without a body is going to get a slap in the face
03:47:44rueAwesome
03:54:02slavaevan: so I made some more progress on PICs, there are performance gains
03:54:23slavaevan: for some reason the compiler is the main beneficiary - I guess there's a lot of polymorphism when traversing IRs etc
03:55:10brixenthat would be true for us
03:55:37brixena bunch of classes that have eg #bytecode method
03:57:56slavaevan: a bootstrap takes 3 minutes, down from 4
03:58:04slavathat's the biggest single gain I'v seen so far (25%)
03:58:07evannice
03:58:20slavaalso it looks like 1/10 MIC call sites become PICs
03:58:23slavaso perhaps PICs are worth it
03:59:31evanvery cool
06:33:51slavaevan: ping
07:27:33evanslava: sup?
07:49:23slavaevan: how does rubinius determine the class of an instance for dispatch purposes?
07:49:55evanit's in the object's header
07:50:07slavabut an oop might be a fixnum right?
07:50:22evanoh
07:50:24evangotcha
07:50:29evanso
07:50:31slavagiven an oop, what is its direct class
07:50:37evanit uses a table
07:50:51evanwell, a branch and a table
07:50:52evanfor fixnum
07:50:56slavawhat's the table?
07:51:04evanthe other side of the branch pulls the class out of the oop
07:51:12slavathe table maps tags to classes for immediate data?
07:51:14evanthe table is the unique bit patterns
07:51:20slavagotcha
07:51:32evanit's the lowest like 6 bits or something
07:51:32slavaso here's the deal
07:51:39slava6 bits? that's a lot
07:51:40evanso to find the class of an immediate
07:51:50evanyou mask the oop to find the index
07:51:52slavaall heap objects are aligned on 2^6 byte boundaries?
07:51:53evanit might not be 6
07:51:56evani don't recall
07:52:20slavaanyway, if you make it so that fixnum is the only special tag, and it has tag 0, and everything else gets the class pointer from the oop's header, its possible to do this branchlessly
07:52:25slavain 5 instructions or so
07:53:13slavathis could speed up dispatch a lot because its a piece of code that's executed on each method call
07:53:29slavawhether or not it is cached in an IC, you have to check if the class matches the cached class
07:53:42evanyep
07:53:48slavasuppose you have 1 bit tags
07:53:49evani've tweaked it so, not a lot
07:53:55evani don't
07:53:58slavatag 0 means fixnum, tag 1 means its an oop and the class is in the header
07:54:02evanthere are a number of tags
07:54:07slava"suppose" :)
07:54:32slavain this magical world with 1 bit tags and unicorns, you have a sequence of asm instructions:
07:54:40evanheh
07:54:42slavasuppose your tagged oop is in eax
07:54:49evank
07:54:50slavatest eax,$1
07:55:13slavamov ecx,global_variable_holding_fixnum_class_oop
07:55:29slavacmovnz ecx,eax
07:55:46slavamov edx,(ecx)
07:55:54slavaand now your class is in edx
07:56:03slavaevan: multi-bit tags are not a win
07:56:21evanso
07:56:26slavathat's 4 instructions, followed by a cmp and je
07:56:28slavaand that's your MIC
07:56:28evanword on the street is that cmovnz is slower than a branch
07:56:39evanbecause it's an internal branch that the microcode can't see
07:56:42evanand thus can't predict on
07:56:53slavathe thing that gets predicted here is the je at the end of the inline cache
07:56:56evancmov in general
07:57:04slavathe code leading up to it is irrelevant, as long as it has no branches itself
07:57:31slavait will start executing the IC target before it finishes computing the class pointer anyway :)
07:57:37evani'd be interested if the cmov is faster or if a branch is
07:57:44evani was just reading that cmov takes more cycles
07:57:53evanand can't be predicted on
07:58:34slavabut the thing is, you're going to load a value from memory in any case
07:59:08slavascalar integer ops are virtually free these days
07:59:19slavaso removing a conditional branch seems like a win to me :)
07:59:22evanso why do you care about the branch then
07:59:24slavabut I'll implement this approach and benchmark it
07:59:26evanif it's the memory move that takes all the time
07:59:45slavabut if its an object that gets dispatched on it will be in cache
08:00:04slavaalso the cmove is a win if the branch is not well predicted
08:00:08slavasuppose you have a PIC
08:00:12slavawith two classes in it
08:00:16slavaone of them is the fixnum class
08:00:23slavathen the conditional will not be well predicted
08:00:36slavabut it will still be cheaper than the indirect jump for a general method dispatch
08:00:40evanso you're saying that because cmov can't be predicted, it's better?
08:00:47slavaespecially if getting the class pointer is cheaper because of the cmov
08:02:37slavaevan: I think the main benfit of conditional move these days is that it lets the CPU continue prefetching and decoding instructions
08:02:45slavaevan: and for branches that can't be predicted well
08:03:07evani guess thats true
08:03:55slavahave you looked at the assembly that gcc generates for your dispatch code?
08:04:03evanyeah
08:04:06evanon and off
08:04:17slavaI toyed with the idea of doing method dispatch with C code, for about two days this week
08:06:06slavaI ended up redoing part of it in assembly
08:06:50slavaevan: so inline caching in general doesn't help at as many call sites as I'd like
08:07:11slavaI didn't realize it would be important to make the slow path fast too :)
08:07:18evan:D
17:39:54brixenevan: you mentioned removing Visibility, what was your idea for that?
17:43:57evanI did?
17:44:17brixenhmm I thought you did
17:44:54evanyou mean Visibility the object that tracks public/private of a method?
17:45:06brixenyes
17:45:11evanwell
17:45:29evani have considered making MethodTable a standalone class, not a subclass
17:45:39brixenok
17:45:45evanand then it's bucket could have the visibility embedded in it
17:45:51evanand typed specificly to Executable
17:45:58brixenhere's the issue I'm trying to work out..
17:46:10brixensee kernel/common/module.rb : 393
17:46:22brixenit puts a Vis instance in with a nil @method attr
17:46:32brixenthat messes up undef_method
17:46:46brixenstill working out builder + rake issues
17:47:07evanah
17:47:08brixenso rake includes FileUtils, then builder tries to undef them all in BlankSlate
17:47:30brixenundef_method hits the Vis instance with a nil method and thinks there is no method
17:47:42brixenit's all a big nest of nonsense to me :)
17:47:58evanheh
17:48:04evanwell, undef_method could be smarter
17:48:15brixenseems there has to be a better way to track visibility
17:48:27brixenyeah, I can fix undef_method
17:48:36evanbut I think the real solution is to fix MethodTable to have the bucket be [name, executable, vis]
17:48:38brixenbut looking at it all was a big ugh reaction
17:48:43brixenok
17:49:15evanwhen we do that
17:49:24evanwe can redo MethodTable to use a cuckoo hash algo
17:49:36evanwhich is exactly the rigth algo for this
17:49:45brixencool
17:49:46evansince the read/write ratio is almost infinite
17:49:58brixenso for now, I should just fix undef_method?
17:50:51evanyeah
17:50:58brixenk
17:50:58evanput a note near your fix
17:51:04evanthat we need to change the MethodTable protocol
17:51:16brixenwill do
17:51:52evani'm working on fixing up some of our IO
17:51:57evanshould have it in shortly
17:51:58brixenahh, it is instance_method that is broken
17:52:03brixencool
17:53:37evani somehow broke IO in the process
17:53:40evanso I have to backout the fix
17:53:46evanand reintroduce it to find the breakage
17:53:48evanit's really weird.
17:53:54evanit's like IO#close isn't working
17:53:56evanbut it is.
17:54:04brixenweird
17:54:13brixenI'll add MethodTable to the roadmap
17:54:25evank
17:54:31evanwe should probably change MethodTable soon
17:54:37brixenyeah
17:54:54slavaevan: with the tagging scheme I described earlier you can do a full dispatch (not ICs) in about 19 instructions
17:55:12slavaand of course if you have ICs its even better in the common case
17:55:44evanslava: using cmov?
17:55:56slavayeah, that thing we talked about
17:56:13slavayou can make your method dispatch much faster
17:56:22slavaright now you're probably doing 10x more work
17:56:38evanprobably a good call
17:56:45evanafter this IO fix is
17:56:49evani'll check out the assembly
17:57:15evanwhat was your code again?
17:57:27evanie, what was the condition being used?
17:57:29evanthe tag value?
17:59:59slavayou check if the tag is 0 branchlessly
18:00:10slavaif its any other tag you load the class pointer from the header
18:52:22tilmanevan: http://f7b9300c6aadaae3.paste.se/ ?
18:54:24evanthats fine
18:55:13tilmancool
19:00:17brixenI was thinking, I should get the gprof graph output added to our profiler
19:00:32brixenbecause it will give you the methods that call heavily used methods
19:00:49brixeneg, something that calls String#[] a bunch may be able to use a better algo
19:01:02brixeneven if String#[] can't be optimized further
19:01:34brixenit's not easy to determine this from the flat output
19:01:36tilmanbrixen: you mean, teach the profiler to generate call graphs?
19:01:44brixenit already has the info
19:01:50evanbrixen: sure, that would be swell.
19:01:53brixenjust need to do the output
19:02:14brixentilman: see this page under How to read the call graph
19:02:16brixenhttp://www.cs.utah.edu/dept/old/texinfo/as/gprof.html
19:02:57tilmanbrixen: i know what a call graph is, just wasn't sure if i understand your proposal correctly :)
19:03:08brixentilman: swell
19:03:26brixenalso, someone already did this for the sampling profile, so could probably adapt that code
19:03:29tilmanis gprof the profiler of choice in osx, btw?
19:03:45brixennot that I know of
19:03:47evanno
19:03:48evanShark is
19:04:02brixenMRI uses the gprof flat output, that's why we copied it
19:04:03tilmanah, i think i've heard about that one
19:04:07evanit's a sampler
19:04:15evanand thus a little less acrurate than gprof
19:04:19evanbut sooooo much easier to read
20:09:21boyscoutSymbolTable::lookup now works with char pointers instead of std::strings. - f78d000 - Tilman Sauerbeck
20:09:21boyscoutAdded String::hash_str() variant that works on NUL-terminated strings. - 040b5f2 - Tilman Sauerbeck
20:14:24boyscoutCI: Build 040b5f2 failed. http://ci.rubini.us/rubinius/builds/040b5f26fd9c9d435a0071b10a3dc261610049b0
20:14:48brixenheh tilman! :P
20:14:56brixenfinally someone else breaks the build :)
20:15:23evantilman: did you run the tests?
20:15:32tilmanwah
20:15:47tilmanugh ugh ugh
20:15:49tilmansorry :(
20:17:19evantilman: are you commiting a fix now?
20:17:24tilmanyes
20:17:27tilman5s
20:20:10boyscoutRemoved two VM tests for methods that were removed in the previous commit. - ee07298 - Tilman Sauerbeck
20:24:52boyscoutCI: ee07298 success. 2647 files, 10140 examples, 32380 expectations, 0 failures, 0 errors
20:27:52boyscoutReport the name of a DelegatedMethod is being used as - 8161d46 - Evan Phoenix
20:27:52boyscoutFix Kernel#caller to skip kernel/ frames - ec1a67a - Evan Phoenix
20:27:52boyscoutA couple hacks to make throw/catch interact properly - 9a3f572 - Evan Phoenix
20:27:52boyscoutFix a number of IO/Signal interaction issues - e6bb96a - Evan Phoenix
20:27:53boyscoutFix Kernel#caller to honor exclude_kernel properly - 13432e3 - Evan Phoenix
20:36:11boyscoutCI: 13432e3 success. 2647 files, 10140 examples, 32380 expectations, 0 failures, 0 errors
21:50:58evantherealadam: poke poke poke
21:51:10therealadamgiggle
21:51:17evansee my twitter DM
21:51:24evanwhich imax section did you get?
21:51:40therealadamA3
21:51:41therealadamI think
21:51:46evancheck check check!
21:51:49evani wanna buy my ticket
21:51:53therealadamI think their just adult, senior and child prices
21:51:58evanoh
21:52:06evanwhy don't they just say so..
21:52:17therealadamI'm just speculating
21:52:23therealadamI went with adult, 'cuz that's what rich got
21:52:37therealadambut, on principle, I usually go senior
21:53:41evanok
21:53:42evangot it!
21:54:50therealadamword.
21:55:18evanwe shall watch cute kirk defeat the pythonista threat!
21:55:33evanseriously, Eric Bana looks snakish
21:55:42therealadamdo you know if the LV books have for the over/under on Greg Borenstein and I getting an LLVM/AVR backend working next week? Because I'd like to vote for "no".
21:56:16evanoooh
21:56:21evando ya need some help?
21:56:27therealadammight
21:56:33therealadamI've been boning up
21:56:38therealadamneed to read a few more docs
21:56:41evanwww.awkwardboners.com
21:56:44therealadamand then really look at the backend
21:56:49therealadamcodes
21:56:59therealadamI am hoping for good things from that link
21:57:21therealadamalso, I am hoping for no auto-play song "this guy's surfing for boners!"
21:59:49evanhah
21:59:51evanno, no song
21:59:53evanit's pretty funny though.
22:00:08evantherealadam: i've been through a lot of LLVM code
22:00:15evanso i'm more than happy to assist
22:00:18evani want to play with AVR soon
22:01:08therealadamcool. I'd also like to find something I can help out with on Rubinius. You know; when I'm not hacking backends for 8-bit processors.
22:01:21therealadamperhaps we can scratch each other's back, as they say
22:01:53evanif we get a 3rd person, it's easier to do it all at the same time
22:01:59evanotherwise we'll end up making out
22:02:51therealadamoh, is the common turn-of-phrase "scratch each other's boner"? I always get these things wrong.
22:03:30evanmaybe in vegas it is.
22:03:33evanwouldn't surprise me.
22:03:41therealadamoh, Vegas rules. my bad.
22:04:29evanoh btw
22:04:33evanyou'll love this.
22:04:33evanhttp://www.youtube.com/watch?v=WPkMUU9tUqk&feature=dir
22:06:58therealadamcome and get some of this shit.
22:06:59therealadamlove it
22:07:12therealadamall that european stuff
22:07:13therealadamclassic
22:07:37therealadamhey, does LLVM have a pass for optimal deliciousness?
22:08:22therealadamoh lord, thankyou
22:22:54headiushttp://www.youtube.com/watch?v=N0gb9v4LI4o
22:28:51evanthose are awesome
23:08:59drbrainhttp://www.thedailyshow.com/video/index.jhtml?videoId=225921&title=large-hadron-collider
23:37:31rueThose bastards cut off most of .eu countries
23:41:06drbrainrue: :(
23:42:47ruePossibly not .de, though, so I am setting up Squid on my server now...
23:45:33bennyyeah I can load it... I'm in .de
23:45:40tilmanevan: i need to use mp_init_set_long (defined in bignum.cpp) in marshal.cpp. can i move it to libtommath/?
23:45:59rueI almost started looking for public proxies before I caught the stupid
23:46:27bennywhere are you from rue?