Index

Show enters and exits. Hide enters and exits.

01:17:29brixenok, exception on -rprofile -e is because we've got a block env with a nil name somewhere
01:17:50evanok
01:17:50brixenand we need something more sophisticated than return nil unless @locations
01:17:55evanmaybe a for look
01:17:56evanloop
01:17:58evanor someting
01:18:03evanthe name on a block env is pretty useless
01:18:16brixensince that gets e.backtrace.show -> no method show on nil
01:18:32evanhm. ok.
01:18:38brixenI've got a check in the profiler results so nil BE names don't cause an exception
01:18:51brixenit's Object#<nil> {}
01:18:59brixenso, top level block env?
01:19:01evanwell
01:19:07evanthat name shouldn't be used
01:19:12brixenk
01:19:17brixenwhat should I use?
01:19:20evanwhere are you checking?
01:19:22evani wanna see
01:19:26evanso we're talkinga bout the same thing
01:19:31brixensec..
01:20:21brixenvm/instruments/profiler.cpp:71 is where it was hitting the nil name
01:20:39brixenblockenvironment.cpp:71 was were it was calling the profiler
01:21:07brixenbuiltin/block_environment.cpp
01:21:15brixenwell 79
01:21:53evanyeah
01:21:59brixenI'm inserting the "<nil>" for the method name
01:22:00evanthe name of method_ is meaningless
01:22:03evanyou shouldn't use it.
01:22:10brixenwhat should it be?
01:22:19evanit should be the name of the method that created the block
01:22:51evanwhich would be
01:22:55evantop_scope_->method()
01:22:58evanin there
01:23:00rueShould really just set stuff in the constructors and worry about optimising it later
01:23:01brixenk
01:23:04evantop_scope_->method()->name()
01:23:28brixenevan: in all the BE::call_xx to profiler?
01:23:37rueAnd probably change method_ to defined_in_ if that is the case (defined, not called from, right?)
01:24:15evanbrixen: likely, yes.
01:24:23evanrue: no
01:24:25evanit's method_
01:24:49evanjust happens that BE uses it to know what method it was defined in
01:29:01rueI am not sure I follow that explanation
01:33:53brixenevan: why is frame->name set to name_ in those BE calls?
01:34:08evanfor completeness
01:34:15evancould be just nil
01:34:16brixenk
01:34:50brixenwell, I'm confused about it
01:35:00brixensince changing this gives mostly the same results
01:35:06brixenexcept for that one block
01:35:14brixenwhich had a nil name
01:35:54evanright
01:35:56evanthats what you should get
01:36:01evani don't know what your asking.
01:36:50brixenit was using name_ before, so why was name_ mostly the same as top_scope_->method()->name()?
01:37:20evani guess the compiler was setting the name field of CompiledMethods for blocks correctly
01:37:25evanbut something is missing one
01:37:39evancorrectly == the name of the method the block as defined in
01:37:43brixenok
01:37:46brixenshould it be fixed?
01:37:49evanyes.
01:38:07evani actually want to refactor CompiledMethod into CodeBlock or something
01:38:10evanthat doesn't have an ame
01:38:12evana name
01:38:15brixenok
01:38:24evanand blocks will reference CodeBlocks instead of CompiledMethods
01:38:50evanbut the long and short is that the name field on a CompiledMethod used for a block is useless.
01:39:45brixenok, this is where I'm confused
01:39:54brixenI was using the name_ field on a BE
01:40:05brixennot the method_
01:40:37evanok
01:40:40evanwell
01:40:44evancheck how be->name is set
01:40:52evanit's set to call_frame->name
01:41:30evanwhy do we have a name_ on BE anyway...
01:41:36brixenheh
01:41:42evanthere is no reason to
01:41:43brixenthat's what I'm wondering
01:41:50evanget rid of it.
01:41:59brixenk
01:56:58brixenevan: could you help me track this down?
01:56:59brixenhttp://gist.github.com/95524
01:57:14brixentop_scope_->method()->name() is nil
01:57:31evanhrm.
01:58:00brixenso, I'm looking at fileutils.rb 1533
01:58:04evanadd that same assert to under_call_frame
01:58:12brixenk
01:58:17evanthen it will blow up creating the Be
01:58:21evanrather than calling
01:58:28evanthen you can figure out where it's at
01:58:48brixenok
02:05:33brixenwell, appears to be the block at fileutils.rb 1534
02:05:49brixeninside class << self
02:06:45brixenso that should be __metaclass_init__ right?
02:06:54evanhrm
02:07:06evani'll bet we aren't setting the name
02:07:09evanyeah
02:07:13evanthats a fine name.
02:19:22brixenhow the hell does __metaclass_init__ get into the call_frame->name if it's not in the CM
02:19:29brixenI need diagrams :/
02:22:54evanif whats not a CM?
02:23:21brixensec..
02:24:07brixenhttp://pastie.org/446845
02:25:13brixenprevious frame is __module_init__
02:25:18evanoh
02:25:19evanhehe
02:25:22evanthats the name it's called AS
02:25:36evanit just doesn't know what to call itself
02:25:51evancall_frame->name is supposed to be the name it was called as
02:25:59evanthats how we show aliased methods
02:26:04brixenok
02:26:07evanwhen call_frame->name is different than method->name
02:26:15brixenso I'm looking at SClass#bytecode
02:26:42evanso
02:26:49evanon line 566
02:26:54evando
02:26:56evanmeth.name = name
02:27:37brixenk
02:27:48brixenI finally got a profile from a spec run
02:28:04brixenit's really long
02:28:34brixenall the mocks
02:29:00evancool!
07:01:48evanbrixen: you around?
07:02:00brixenyep
07:02:24evanbrixen: ever seen ruby_strtod crash?
07:02:31evani'm trying to get some new jit code patched in
07:02:34evanand it's not running yet
07:02:46evanbut suddenly ruby_strtod is crashing
07:02:52evanand I can't figure out why
07:02:59brixenhm, I haven't seen it crash
07:03:11brixenwhat's the ruby code look like?
07:03:37evanone sec
07:04:02evanhttp://gist.github.com/95640
07:05:11brixenhrm that is odd
07:05:56evani've been trying to step through it
07:05:59evanfigure out what happened
07:06:02evanno luck so far
07:07:12brixenI wonder if it is bstring and not strtod
07:07:34brixenI would trust strtod more
07:08:26evanhm.
07:08:27evanwell
07:08:32evanthe string input seems fine
07:08:39evanit's null terminated.
07:09:04evanthe only other argument is a char** rest
07:52:38brixenthe top part of a profile run of the specs, sorted by self seconds, calls
07:52:39brixenhttp://gist.github.com/95653
07:56:55evanwowzers
07:56:56evanthats awesome!
07:57:10evanlets us know EXACTLY where to spend time
07:58:07evanthats pretty crazy
07:58:11evanhow much time Array#each takes up
07:58:22brixenyeah
07:58:40brixenover 8sec in sydney_rewriter too
07:58:45brixenI'll be glad to gut that
07:59:00evanwas that a cold run?
07:59:01brixenhow's that Hash#[] for ya :)
07:59:03brixenyeah
07:59:06brixencompiling
07:59:11evando a compiled run
07:59:16evanto compare and contrast
07:59:18evanoh oh
07:59:20brixenyeah
07:59:22evanI completely forgot to tell ya!
07:59:27evani wrote a cuckoo hash impl
07:59:30evanin both ruby and C++
07:59:32evanfor us to use
07:59:35brixencool!
08:00:15evanwhats Buffer#fill?
08:00:20evanoh, thats IO::Buffer#fill
08:00:27evanreading all the files
08:00:29evanto compile them
08:00:34brixenyeah
08:00:43evanlooks like the name of that class is wrong
08:00:45evanneed to fix that
08:01:09evanwow, the stack depth calculator took 6s
08:01:13evanthats crazytown
08:01:17brixenyeah
08:01:26brixengreat idea on sorting btw
08:01:31evanyeah
08:01:35evanthis is some AWESOME info
08:01:42evanit's a fucking gold mine
08:01:47evannow as i'm working on the JIT
08:01:53brixencool
08:01:55evani know what methods to make fast first!
08:02:04brixenit profiles capi and ffi calls too
08:02:27evanwho's the man?
08:02:30evanpoints to brixen
08:02:31evan:D
08:02:32evanbrb
08:02:33brixenhah you are
08:06:01brixenevan: btw, that profile run was with a debug build
08:12:40boyscoutAdded :sort option to profiler. - e763463 - Brian Ford
08:12:40boyscoutAdded custom --profile option for mspec. - d9c3af1 - Brian Ford
08:12:40boyscoutAdded with_profiler guard for specs. - a1c57bc - Brian Ford
08:12:40boyscoutPass the correct name to enter_block. - bea4cdc - Brian Ford
08:12:40boyscoutEnsure a CompiledMethod has a name. - 32d67fd - Brian Ford
08:15:38evanbrixen: ah, ok.
08:19:37brixenhttp://gist.github.com/95665
08:19:43brixennormal build
08:19:50brixencompiling at the top
08:21:27boyscoutCI: 32d67fd success. 1502 files, 7234 examples, 23646 expectations, 0 failures, 0 errors
08:21:37brixenfinally
08:21:46brixenneed to feed boyscout some wheaties
08:22:27brixensleeps
08:22:49evannite
08:23:28brixennite
09:14:56rueMorning
15:33:34helozjiskyevan: ever tried systemtap with rubinius ?
17:16:54evanmorning.
17:17:02evanbrixen: i figured out the crash
17:17:05evanit's pretty darn weird.
17:23:21rueHi
17:23:44evanhello
17:25:05helozjiskyevan: ever tried systemtap with rubinius ?
17:25:09brixenevan: what was it?
17:25:11evanwhats that?
17:25:14evanhelozjisky: whats that?
17:25:22evanbrixen: it's pretty fucking weird
17:25:30evanbrixen: strtod calls s2b
17:25:48helozjiskydtrace on linux
17:25:55evanwhich, the header file has externed, and #define'd to a __s2b_D2A
17:26:31evani think, strangly enough, that llvm's libraries have that same symbol
17:26:38brixenahh
17:26:40evanso strtod was calling the wrong one
17:26:46brixenwhoa
17:26:49evanso i changed the #define to __s2b_rbx_D2A
17:26:52evanand it went away
17:27:11brixenwhat a crazy symbol to clash
17:27:15evanseriously
17:27:33evani'm not sure why it's got all it's private functions externed
17:27:41evani think NOT externing them would fix the problem probably
17:27:50brixenyeah, libgdtoa is some funky code
17:27:52evanmaybe not though.
17:27:55evananyway, it's fixed.
17:27:57evanit's pretty weird.
17:27:59brixencool
17:28:04brixennice detective work
17:28:37evanto make it weirder
17:28:43evani can't find an s2b symbol in llvm
17:28:45evan:/
17:29:59evanhelozjisky: no, no experience, sorry.
17:30:02evanhelozjisky: you trying to?
17:30:25helozjiskyevan: trying it
17:31:44evanhelozjisky: well, if there is anything we can help with, let us know
17:32:12helozjiskyevan: thanks, buddy
17:32:53helozjiskyevan: have any progress on the document ?
17:33:03evanwhat document?
17:33:54helozjiskyi am new to rubinius, trying reading the documents
17:34:22helozjiskybut I think it's still the old version
17:34:33evanwhats still the old version?
17:34:59helozjiskyshotgun is missing
17:35:29evanthere are likely out of date docs, yes.
17:35:40helozjiskythis is ok, i can find it in git comments
17:35:54evanwhat are you looking for?
17:36:40helozjiskycan i build with debug option ?
17:36:48evansure
17:36:51evanrake DEV=1
17:38:51brixenhelozjisky: also rake build:help
17:39:59helozjiskyit works
17:40:41brixenhelozjisky: if you find stuff in the docs that is incorrect, let us know and I'll update it
17:41:09helozjiskyof course
17:41:29helozjiskythanks for your help, I have to go to bed, this is China :)
17:41:36brixenok
18:12:47brixenevan: so in removing name_ from BE, in BE::call (and variants) frame->name should be top_scope_->method()->name() ?
18:13:15evanor just nil
18:13:21brixenreally?
18:13:22brixenok
18:13:24evansure
18:31:05boyscoutRemoved name slot from BlockEnvironment. - e6dad43 - Brian Ford
18:37:00boyscoutCI: e6dad43 success. 1502 files, 7234 examples, 23646 expectations, 0 failures, 0 errors
22:48:28evanthis... is a weird way to work.
22:49:20agardinerwhatcha up to? :-)
22:49:49evanwell
22:49:56evanthe display on my macbook was being wierd
22:50:06evanand it appears to have finally given up life.
22:50:16evanso i'm using it via screen sharing
22:50:19evanfrom abby's macbook
22:50:23evanwhich works surprising well.
22:50:36agardineroh... neat, i guess
22:50:45agardinerbut it sucks that the screen is dead
22:50:52agardineri recently had to replace mine
22:50:59agardinerafter i put a keyboard into it!
22:51:06agardiner:-D
22:51:49evannice
22:51:53evanhows things btw?
22:51:59agardinerpretty good
22:52:07agardinergetting my life back!
22:52:15evanyay! hows London?
22:52:18evanprobably starting to get nice
22:52:19agardinerjust started looking at the debugger again
22:52:29evanoh cool.
22:52:31agardineryeah, we had a nice easter
22:52:38agardinergood weather, surprisingly
22:52:45evani think we should discuss how stepping-into-a-method should work
22:52:57agardineryeah, that's high on my list
22:53:09agardinerbut there's a lot to be done :-(
22:53:14evanyeah
22:53:21agardinersadly, much has changed and no longer workds
22:53:26evanyeah
22:53:37evanyou saw that I got basic breakpoints and next working though, yes?
22:54:11agardineri saw that you had got it working...
22:54:17agardinerbut not clear on the specific
22:55:01agardinerthis was after the stackfull changes right?
22:55:21drbrainRubyGems 1.3.2 is out
22:56:00evanagardiner: yeah
22:56:07evanagardiner: i did this.. oh, 2 weeks ago
22:56:08evanor so.
22:57:47evandrbrain: alrighty. probably should sync it in soon then.
22:58:02evanhopefully i'll get to it tomorrow
22:58:34drbrainlots of bug fixes
22:58:35slavahi evan
22:58:43evandrbrain: awesome.
22:58:45evanslava: allo
23:00:54agardinerevan: how does the lines tuple work now in CM?
23:01:03evanit's easier
23:01:19evanit's
23:01:23evanip, line, ip, line, ip, line
23:01:33evanthe line is valid for the the ip extend on either side of it
23:01:48agardinerah, ok
23:01:54agardinercool - that is easier
23:02:11evanthe algo in ruby and C++ to calculate the line is working
23:02:36agardiner100%?
23:02:47evanyeah
23:02:51agardinerif i recall, there were some issues way back in some corner cases
23:02:58agardinerneat!
23:03:00evani haven't seen any troubles with in
23:03:15evanwell, i also fixed up how the line table is populated
23:03:19evanit should be a lot more accurate now
23:20:48agardinerhmm
23:21:07agardinerseems like the lines tuple is not totally accurate
23:21:34evanoh?
23:21:46agardinerI'm looking at Kernel#binding
23:22:11evanoh
23:22:15agardinerthe source runs from line 35 to 38, but lines only shows line 36-38
23:22:18evani'll bet it's not emitting lines for args
23:22:35evanthats going to be a little tricky
23:22:42agardinerline 35 is not the args
23:22:52evanbecause later ips are actually on earlier lines
23:23:00evanright
23:23:11evanthe only line table entry it's outputting is for the call itself
23:23:17evanor rather
23:23:23evanthe search is stopping there
23:25:42agardinerit seems the new arrangement can't handle cases where instructions on a single source line end up at multiple ip locations...
23:26:08evanhm
23:27:02evanwell, it doesn't use the lines for comparison
23:27:04evanjust the ip
23:27:09evanso it should be able to handle it
23:27:23evanin this case
23:27:30evanit might look like
23:28:25evan0 36 4 37 8 38 12 35 17
23:28:44evanthats assuming each arg takes 4 args
23:28:51evanand the receiver is 4, plus 1 for ret
23:28:59evanwhich is totally wrong, but you get the idea
23:30:46agardinerso are the ip fields are inclusive on the left, and exclusive on the right for the line number they surround?
23:31:13evanshould be inclusive on the left, exclusive on the right
23:31:53agardinerok, and it is always in ip ascending order, right?
23:31:59evanyeah
23:32:00evanhas to be
23:32:07brixenevan: is lgpl'd code ok to use?
23:32:11agardineryeah, just wanted to be sure
23:32:13evanfor this case, i suspect that the entries are being spit out wrong
23:32:24evanbrixen: i think it's case by case
23:32:26evanwhat do you want to use?
23:32:44brixenwas looking at http://www.mpfr.org/
23:33:16evanto use for what?
23:33:28brixenreplace bigdecimal eventually
23:33:49evandoesn't need to be part of rubinius then
23:34:02evanin which case, can be whatever
23:34:02brixencould ffi it, huh
23:34:10evanwell, could be a generic extension
23:34:23evanbut yes, could FFI it.
23:34:33brixenjust a thought
23:34:38evani've got some ideas on how to make FFI pretty damn fast in the presense of teh JIT
23:34:46brixencool
23:35:03slavaevan: just by generating stubs for every function?
23:35:16evanstubs is part of it, yes.
23:35:18evanfor the slow path
23:35:21slavawhat else?
23:35:48evanbut the fast path will move the code to convert the arguments and call out directly into the JIT'd methods machine code stream
23:36:06slavaso inlining the FFI stub
23:36:06evanso if the code does
23:36:18evani = POSIX.atoi("1")
23:36:46headiuslike john rose's scheme VM
23:36:47evanthe JIT will strip away everything, leaving just converting the Ruby string into a char*
23:36:56evanand calling directly to atoi
23:37:05evanand code to convert the int to a Fixnum
23:37:09evanso yeah, inlining the stub
23:37:10slavathat's pretty much what factor does
23:37:13evanyep
23:37:15evani know.
23:37:16evan:D
23:37:23slavaI have some more speedups planned
23:37:46slavaFFI calls participating in float unboxing is the main one
23:37:56slavaand generating all the argument conversion code inline
23:37:58evanah nice
23:38:16slavado you have callbacks?
23:38:23evanin FFI? not yet.
23:38:28evanbut i'm going to add them.
23:46:55rueI wonder if unicorn poop is considered a sustainable construction material
23:47:23slavacan I have a toke of what you're smoking, sir?
23:54:02ruehands over unicorn poop