Index

Show enters and exits. Hide enters and exits.

00:00:01slavathe dispatch is eliminated in foo above because it knows the indices are fixnums, and pi is a float
00:00:08evanif i don't retain all the Floats
00:00:12evanbut still create them
00:00:19slavait still boxes the final result, and does a gc ceheck on every iteration
00:00:26evanit's at 1.3s
00:00:36slavahmm
00:00:39evanso the vast, vast majority of time is GC.
00:00:42slavayep
00:01:15slava Number Total Mean Median Min Max
00:01:15slavaCopying from nursery 77 117,837 µs 1,530 µs 1,993 µs 11 µs 2,452 µs
00:01:18slavaCopying from aging 31 367,265 µs 11,847 µs 10,167 µs 3,065 µs 16,065 µs
00:01:21slavaCopying to tenured 1 10,937 µs 10,937 µs 10,937 µs 10,937 µs 10,937 µs
00:01:35slavaare you seeing a similar number of GC passes I wonder?
00:02:51evanhm, i should add a GC summary to -Xgc.show
00:03:39evan165 young
00:03:47evan19 old
00:03:53evanwell, 19 full
00:03:56evancollections.
00:04:02slavahow long is each one?
00:04:21evanthe last young is 62ms
00:04:38evanthe last full was 52ms
00:04:44slavawhoa, weird
00:04:47evaner wait
00:04:49evanwrong side
00:04:51slavafull is faster tha nyoung?
00:04:53evanlast full was 222ms
00:05:12slavaok
00:05:35slavahow much live data?
00:05:50evanif i use a seperate remember set that has address-of-slot rather than address-of-object for Tuples
00:05:55evani think it will speed up.
00:06:12slavahow much data do you manage to scan in 222ms?
00:06:22evanlets see.
00:06:51evan345M
00:07:01slavaimpressive
00:07:51slavamy mark/sweep takes 200ms to collect a heap with 47mb live
00:08:03slavadoes your full gc not scan every object or something?
00:08:05slavais it incremental?
00:08:10evanit scans them all
00:08:18evanactually wait.
00:08:30evani grabed the total heap number
00:08:36evan[Full GC 203238kB => 175556kB 216ms]
00:08:48evanso that was 216ms to scan 200M
00:09:33slavawith compaction, 380ms to do a full gc on the same data, 47mb data + 7mb code
00:09:43slavaseems a lot slower than yours
00:09:50evanthats not doing compaction
00:09:56evanbut even if it were
00:09:59slavaare your objects mostly pointers or mostly empty space / binary data?
00:10:02evanthe compaction is folded into the next mark phase
00:10:07evanthats the beauty of immix.
00:10:31slavais the mark phase pretty conventional, with a mark stack and iteration over all slots?
00:10:37evanyep.
00:10:57slavasee my GC spends most of its time in the mark phase
00:11:18evanmy mark phase uses virtual methods even.
00:11:31slavaheh
00:11:53evanbecause it lets the object (type) control it's own layout
00:11:54slavawhat's your secret sauce
00:12:26evanwell, lets see, it's pretty basic.
00:12:37evanthe mark stack is a std::vector<> still
00:12:41slavasame
00:12:55evanare you pushing/poping from the back?
00:13:08slavaI iterate over slots in a somewhat generic way
00:13:20slavaI bet you just have a visitor method for each type that does something with every slot?
00:13:24slavawithout the loop?
00:13:50evanbasically, yes
00:13:55evanthe visitor is dispatched as a virtual method.
00:14:16evanand it's passed an ObjectMark& object
00:14:34evanand the method uses mark.call() to perform the actual marking
00:14:42evanso the marking is abstracted from the visitor
00:15:48slavawow
00:20:33mahargis rubinius' standard build procedure actually using llvm-clang to compile now?
00:20:51evanno
00:20:52evannever has.
00:21:08boyscoutFix JIT code unloading - fd84366 - Evan Phoenix
00:21:15mahargoh I see
00:21:24mahargthe build step that was confusing me was building llvm itself
00:22:50evanyou shouldn't have to do that either
00:22:56evanunless there is no prebuilt for your platform.
00:23:14mahargapparently there wasn't, I just did ./configure && rake
00:23:36mahargosx 10.5.7 (I'm a little behind on this laptop)
00:23:41evanwhat platform are you on?
00:23:42evanhm
00:23:46evanthere is one for 10.5
00:23:58evanrun ./rakelib/config.guess
00:24:00evanwhat is the output?
00:24:30mahargi686-apple-darwin9.7.0
00:25:43evanhm, 9.8.0 is whats up there
00:25:46evanlet me link it
00:25:47evanand you can try it.
00:26:10evanok, cancel that and do
00:26:15evanrm -rf vm/external_libs/llvm
00:26:17evan./configure
00:28:04mahargused a binary package, is currently building rubinius
00:28:08evank
00:28:11boyscoutFix docs a little - 8eb566a - Evan Phoenix
00:29:19boyscoutCI: rubinius: fd84366 successful: 3024 files, 11752 examples, 35958 expectations, 0 failures, 0 errors
00:36:17mahargtests seem to be running fine
00:37:37evanmaharg: cool.
00:39:49maharg0 fail 0 errors
00:42:53evanwell thats good!
00:47:46mahargincidentally, what's the current state of threading within the VM? Last time I was paying attention it was still all green-threaded I think. With big plans, but still for a 1.9-style BGL iirc?
00:48:38evanwell now
00:48:46evanyou haven't been around for the last 1+ year i'm assume
00:48:49evanit's totally different.
00:49:10evanit's using native threads with a GIL right now
00:49:20evanwe're starting to lay the ground work for removing the GIL
00:49:25evanbut that probably won't happen before 1.0
00:50:46mahargcool
00:51:09maharghuh. jruby moved from sun to engineyard? That's surprising
00:51:32evana while ago, yeah
01:00:11jaribevan: how will that work with C extensions?
01:00:24evanwe haven't worked it out yet.
01:01:06jaribgotcha
01:01:36jaribisn't that the reason YARV still has it?
01:01:44evanno
01:01:49evanwell, not entirely
01:02:09evanMRI (and thusly YARV) use the same API internally as the C extensions do
01:02:25evanthey'd have to add locks and basically make MRI's core thread-safe
01:02:34evanthey've done some of that legwork already
01:02:34jaribah, makes sense
01:02:49evanbut the shear amount of C code to fix is the issue.
01:03:40mahargIn broad strokes, I would have extensions advise as to their thread safety and put locks around their calls if they don't claim to be threadsafe. And have a switch to force all extensions to go through that lock in case you run into a liar.
01:03:57evanthat requires changes to all extensions
01:04:04evansome that probably won't fly very well.
01:04:19evanwe insulate extensions from the VM already
01:04:21evanbehind handles
01:04:41evanso it's likely we can use the handles to provide at least some thread safety
01:05:35evancertainly using a global lock around all extension calls is one solution
01:06:12mahargwell, I would assume any ext that can't claim to be threadsafe isn't. With cooperation with the MRI guys, that should be possible
01:06:35mahargeven if it took them a lot longer to get there
01:07:26evanmaharg: i'd like to think they'd want to help, but that hasn't proved to be true thus far.
01:07:40evanthey're priorities doen't line up with ours often.
01:07:45evantheir, rather.
01:10:13evanbut again, who knows.
01:10:19mahargI like the new C++ code. Very clean. And you guys didn't reinvent a bunch of perfectly good wheels (like vector, for example)
01:10:33evan1.9 has started to push on this idea because of MVM
01:10:35mahargas is quite common in projects transitioning from C
01:10:41evanyeah, ew.
01:10:45evanthats one reason we switched
01:10:57evannot having to maintain or own basic datastructures.
01:11:09evans/or/our/
01:14:04Zoxcdoesn't like the C++ STL datastructures :(
01:16:06boyscoutFix format cases with % u and %+u. Fixies #162 - eb97899 - Ivan Samsonov
01:16:06boyscoutAdd String#to_inum support for soft bases. Fixes #163. - 398d64d - Evan Phoenix
01:16:16mahargthey're cleaner, better performing, more predictable, and better speced than the vast majority of roll-your-own equivalents.
01:16:22evanyeah
01:16:26evanthey're battle hardened.
01:16:29evanfor sure.
01:16:58evanhaving C++ classes that mirror the ruby classes also has simplified the code base
01:17:18evanand a little meta-magic to attach a C++ method to a ruby method, and things are easily up and running.
01:18:51mahargspeaking of MVM, is there a reference to the rubinius implementation somewhere? I see mentions of it all over google, but nothing very specific
01:19:19mahargheh I don't think docs/virtual_machine.txt has changed since I last looked
01:20:07boyscoutCI: rubinius: 398d64d successful: 3024 files, 11753 examples, 35960 expectations, 0 failures, 0 errors
01:20:27evanmaharg: reference to what?
01:20:42maharghow to use it and/or how it works
01:21:06evanno, not really
01:21:12evanwe haven't had time to write much up.
01:21:19evanthe code is the best source of that.
01:21:24evanand i can answer questions if you have them
01:49:27boyscoutImplement String#partition. Fixies #165 - 98813f7 - Ivan Samsonov
01:49:27boyscoutCleanup the style and comment String#partition - b8cc7ee - Evan Phoenix
01:50:23rueI suppose the old MVM mechanism still applies in general. Some notable parts like Channel would be different
01:52:09evannah
01:52:14evanChannel is entirely unrelated.
01:52:34evanwe could wire it in via Channel if we wanted
01:52:38evanbut thats not how it was before.
01:52:57rueNo? Thought Channels were used for communication
01:53:05evanintra-VM
01:53:08evannot inter-VM
01:53:27boyscoutCI: rubinius: b8cc7ee successful: 3024 files, 11758 examples, 35968 expectations, 0 failures, 0 errors
01:53:27evaninter-VM was handled via a simple shared mailbox
01:59:51rueHmm
02:06:21maharghm. Doesn't look like it actually works anymore? spawn_prim isn't hooked into anything
02:07:10rueHeh: http://www.wired.com/autopia/2010/01/nasa-puffin/ - I am not sure about the head-first approach
02:08:02rueSurely they could make it a J-shape cockpit and turn it in relation to the rotors
02:10:59evanmaharg: yeah, it's completely busted
02:11:05evanit didn't make the C++ transition yet.
02:14:22maharggotcha
04:36:03evankronos_vano: you still around?
04:36:14evanwhen profiling, be sure to use -Xint right now
07:36:44mahargheh. Cute, if a little evil, how you have Object::symbol_p and the like testing bitfields on this, which may not actually be a valid pointer
07:42:38evanyeah, thats the same technique MRI uses.
07:47:58mahargoh yeah, I know the basic technique. But I mean the fact that you're doing it from in a C++ method to `this`.
07:48:04evanah
07:48:05evan:)
07:48:06evanyeah.
07:48:37evanbasically the methods on Object just have to be careful to use reference_p() and such to guard code that access klass and things
07:48:43evanit's turned out to be pretty easy to get right.
08:14:04slavayeah its a nice trick
09:41:36mahargit still uses a compacting collector, right? How does the VM code deal with moving Object* pointers between collects? Actually, even if it doesn't compact anymore, I can see that it still moves the pointer when promoting.
09:42:02mahargI see it storing Object*s in, for example, the lookuptables, but I don't see it doing anything special with them before doing so
09:44:54slavacompaction relies on the gc knowing precisely which values are pointers
09:45:27slavaI'm not familiar with the specifics of the rbx gc but typically you use a classical visitor pattern to identify pointers.
09:46:22mahargnot really the angle I'm looking for. More an implementation detail of how rubinius deals with mutating pointers post-compaction. I understand the theory of GC in general :)
09:46:54slavasorry not sure what your level is :)
09:47:18slavaI don't think it does compaction, and pointers that are promoted are updated in the mark phase
09:47:24slavaalong with pushing on the mark stack
10:28:53khaasemorning
10:29:21khaaseI have issues with rspec: http://gist.github.com/286729
10:29:48khaaseno, it is not an rspec issue
10:29:55khaasesame happens with mspec
10:31:13khaaseok, it's my code
10:31:17khaasefor some reason
10:33:34kronos_vanohm, common problem... I forget how to fix it... May be try to delete old *.rbc files. Or reinstall rspec...
10:34:03dbussinkkhaase: errors like that always point at stale rbc files
10:34:22dbussinkkhaase: probably some rbc that still refers verify_metaclass which has been removed long since
10:34:41khaasethought so, too
10:34:50khaasebut i removed like anything
10:35:02khaaserecompiled, installed all the stuff again.
10:35:53khaasei even removed all folders including anything, so the *.rbc files, too.
10:37:28khaasemy fault
10:48:09khaaseok, next question: does rubinius use $RUBYOPT?
10:48:16khaaseit seems to ignore it
11:00:16dbussinkkhaase: afaik it does
11:00:26dbussinkkhaase: it should pick up everything that is used in libraries etc. including this
11:00:40dbussinkwe've had reports of stuff breaking with complex rubyopt settings
11:07:34khaasei have a very simple RUBYOPT=rubygems
11:07:53khaasehowever, i still have to require "rubygems"
15:47:25ruemaharg: ObjectFlags.Forwarded
17:04:30evanmaharg: whats your question about compaction?
17:23:42kronos_vanoevan, morning! -Xint What is it?
17:23:51evanit disables the JIT
17:23:58evanthe JIT causes some strange profiling output right now
17:24:01evani'm going to be working on that today
17:24:02kronos_vanoah, ok
17:24:13evanso for now, -Xint gets you the most accurate profiling output
17:29:21kronos_vanoevan, Some methods writed in C++ (for example parsing number from string), some in ruby (Array#pack). Is there any criteria for that?
17:29:36lypanovdbussink: hey, around?
17:29:44evankronos_vano: they should be in ruby unless they must be in C++.
17:29:52evanin the case of string parsing for a number
17:30:10evanwe decided that it was of critical performance wise to make it C++
17:30:53kronos_vanook.
18:47:31boyscoutFix and expand the Module#include specs - 7091887 - Evan Phoenix
18:47:31boyscoutFix Module#include. Fixes #170. - 91b7863 - Evan Phoenix
18:51:29boyscoutCI: rubinius: 91b7863 successful: 3024 files, 11761 examples, 35984 expectations, 0 failures, 0 errors
19:10:15evanzoinks
19:10:21evanthere was no Module#include spec for cache effects.
19:13:04boyscoutAdd Module#include spec for cache effects - ea07e91 - Evan Phoenix
19:13:04boyscoutClear the method cache on Module#include - bb511f8 - Evan Phoenix
19:17:00boyscoutCI: rubinius: bb511f8 successful: 3024 files, 11762 examples, 35986 expectations, 0 failures, 0 errors
19:27:49rueAh, method cache effects
19:47:42boyscoutFix Module#module_function eval interactions - 60bb90e - Evan Phoenix
19:51:42boyscoutCI: rubinius: 60bb90e successful: 3024 files, 11764 examples, 35988 expectations, 0 failures, 0 errors
19:54:34evanFUUUKC.
19:54:58evanwtf specs.
19:58:37evanug.
19:58:47evanthese autoload specs have some fucked up errors.
19:58:51evanthat mask what's going on.
20:05:40boyscoutFix spec bug in autoload. Autoload uses require internally. - 2275c01 - Evan Phoenix
20:05:40boyscoutRemove Module#autoload tags - b730d3f - Evan Phoenix
20:21:08boyscoutCI: Commit b730d3f failed. http://github.com/evanphx/rubinius/commit/b730d3ffb38117077ffdd4f03b5d375cbba28f0d
21:16:58boyscoutAdd missing file - 8eaeb08 - Evan Phoenix
21:20:57boyscoutCI: rubinius: 8eaeb08 successful: 3024 files, 11766 examples, 35992 expectations, 0 failures, 0 errors
21:25:29evandanku boyscout
22:23:19rueMan, I admire his effort level, but I am going to have to start filtering out Pack's -core messages
23:42:10evanhuh.
23:42:20evanBignum doesn't have it's own < method
23:42:22evanit uses comparable.
23:42:23evanweird.
23:44:31BrianRice-workwhat does comparable's default method do?
23:44:36evancall <=>
23:44:49evanand return true if <=> returned 0
23:45:29evanit's not unreasonable
23:45:44evanjust an extra level of indirection I didn't expect on something as performance critical as Bignum
23:45:51BrianRice-workoh, I see, the base method is <=> which is sensible. maybe not the best performance but not bad
23:45:57evanrighto
23:46:06BrianRice-workwell, how often does bignum performance come up?
23:46:54BrianRice-workwe noticed that our 64-bit images don't need bignums in any normal code
23:49:07evanyeah
23:49:11evannot as often as they used to
23:49:20evanthats why i suspect it delegates to Comparable.
23:49:26BrianRice-workok