Skip to content

Instantly share code, notes, and snippets.

@brixen
Created September 18, 2009 18:45
Show Gist options
  • Select an option

  • Save brixen/189220 to your computer and use it in GitHub Desktop.

Select an option

Save brixen/189220 to your computer and use it in GitHub Desktop.
gauss:rubinius brian$ bin/rbx -Xprofiler.graph -P self_seconds compile-ng lib/ruby_parser.rb
lib/ruby_parser.rb
index % time self children called name
----------------------------------------------------------
0.03 1.44 18477/55431 Rubinius::AST::Node#visit [18]
0.00 0.06 1011/1025 Rubinius::AST::ActualArguments#bytecode [0]
0.00 0.11 855/5130 Rubinius::SydneyRewriter.sexp_from_array [0]
0.00 1.29 711/711 Enumerable#each_with_index [0]
0.00 0.01 665/665 Enumerable#find_all [0]
0.00 0.09 546/1092 Enumerable#inject [0]
0.00 0.26 546/2184 InstructionSequence::Encoder#encode_stream [0]
0.00 0.04 475/475 Compiler::Node#consume [0]
0.00 0.00 380/570 Compiler::LocalScope#encoded_order [0]
0.00 0.92 356/3204 Rubinius::Generator#encode [0]
[1] 11.5 0.25 7.67 26785 Array#each [1]
0.02 0.00 129756/180951 Array::Iterator#next [23]
0.02 0.00 102995/140091 Array::Iterator#item [31]
0.02 0.01 26785/40942 Array#to_iter [26]
0.02 88.10 24015/24015 Rubinius::AST::Node#visit {} [24]
0.04 1.53 18116/36232 InstructionSequence::Encoder#encode_stream {} [14]
0.01 0.12 18116/18116 Enumerable#inject {} [41]
0.03 0.22 16596/38565 Rubinius::Generator#collapse_labels {} [16]
0.00 564.62 7410/7410 Enumerable#each_with_index {} [0]
0.00 9.05 5625/5625 Rubinius::AST::ArrayLiteral#bytecode {} [0]
0.00 5.60 2090/2090 <metaclass>#sexp_from_array {} [0]
-------------------------------------------------------
0.08 0.07 146587/243199 Compiler::StackDepthCalculator#run_from [3]
0.07 0.01 27414/167588 InstructionSequence::Encoder#encode [4]
0.01 0.01 17045/24749 Rubinius::Generator#push [0]
0.01 0.01 12339/15643 Rubinius::Generator#push_int [0]
0.00 0.00 1045/2185 Sexp#get [0]
0.00 0.00 665/855 Compiler::Generator#push [0]
0.00 0.00 475/1140 Rubinius::SydneyRewriter#rewrite_call [0]
0.00 0.00 95/190 Sexp#find_node [0]
0.00 0.00 27/216 Thread.detect_recursion [0]
0.00 0.00 8/32 Rubinius::AST::IterArguments#bytecode [0]
[2] 0.2 0.09 0.02 205713 Kernel#=== [2]
0.04 0.00 205713/334427 Kernel#equal? [13]
0.00 0.00 198/6604 Kernel#== [0]
-------------------------------------------------------
0.00 0.26 546/546 Compiler::StackDepthCalculator#run [0]
0.08 0.02 131/243199 Compiler::StackDepthCalculator#run_from [3]
[3] 0.4 0.08 0.20 677 Compiler::StackDepthCalculator#run_from [3]
0.09 0.02 146587/205713 Kernel#=== [2]
0.01 0.00 20319/78868 Rubinius::Tuple#[] [0]
0.01 0.00 19220/76115 Array#[] [0]
0.01 0.00 19179/47536 Array#[]= [0]
0.05 0.02 18543/36659 Rubinius::InstructionSet.[] [9]
0.03 0.20 16898/35014 Rubinius::InstructionSet::OpCode#stack_difference [17]
0.02 0.01 1645/36659 Rubinius::InstructionSet::OpCode#stack_produced [29]
0.00 0.00 636/6417 Rubinius::Tuple#size [0]
0.08 0.05 131/677 Compiler::StackDepthCalculator#run_from [3]
0.00 0.00 41/142 Fixnum#>= [0]
-------------------------------------------------------
0.04 0.23 18116/36232 InstructionSequence::Encoder#encode_stream {} [14]
[4] 0.3 0.07 0.16 18116 InstructionSequence::Encoder#encode [4]
0.02 0.00 36232/124483 Kernel#kind_of? [27]
0.01 0.01 31026/31026 InstructionSequence#[]= [36]
0.09 0.00 27414/205713 Kernel#=== [2]
0.03 0.23 18116/35014 Rubinius::InstructionSet::OpCode#stack_difference [17]
0.05 0.02 18116/36659 Rubinius::InstructionSet.[] [9]
0.01 0.00 12910/76115 Array#[] [0]
0.00 0.00 12910/12910 Integer#to_i [0]
0.04 0.00 10864/59324 Array#first [11]
-------------------------------------------------------
0.00 0.25 1/3 File.to_ast [0]
[5] 0.4 0.06 0.19 1 Rubinius::Melbourne#file_to_ast [5]
0.00 0.02 3040/3040 Rubinius::Melbourne#process_number [0]
0.03 0.00 2043/2043 Rubinius::Melbourne#process_str [19]
0.00 0.00 1038/1038 Rubinius::Melbourne#process_array [0]
0.00 0.00 1002/1002 Rubinius::Melbourne#process_negate [0]
0.00 0.00 992/992 Rubinius::Melbourne#process_lvar [0]
0.00 0.00 899/899 Rubinius::Melbourne#process_lit [0]
0.00 0.02 863/863 Rubinius::Melbourne#process_call [0]
0.00 0.00 546/546 Rubinius::Melbourne#process_nil [0]
0.00 0.00 405/405 Rubinius::Melbourne#process_lasgn [0]
0.00 0.00 354/354 Rubinius::Melbourne#process_block [0]
-------------------------------------------------------
0.01 0.01 5177/10354 Rubinius::Generator#push_literal [0]
0.00 0.00 2370/6354 Rubinius::Generator#send [0]
0.00 0.05 2056/2056 Rubinius::Generator#string_dup [0]
0.01 0.00 1780/15643 Rubinius::Generator#push_int [0]
0.00 0.00 980/980 Rubinius::Generator#push_local [0]
0.00 0.00 957/3762 Rubinius::Generator#pop [0]
0.00 0.00 586/586 Rubinius::Generator#push_nil [0]
0.00 0.00 486/486 Rubinius::Generator#push_self [0]
0.00 0.00 401/401 Rubinius::Generator#set_local [0]
0.00 0.00 359/1077 Rubinius::Generator#push_const [0]
[6] 0.1 0.06 0.02 16602 Rubinius::Generator#add [6]
0.02 0.00 15224/41369 Array#<< [30]
0.04 0.00 6059/59324 Array#first [11]
-------------------------------------------------------
0.03 0.06 1361/70196 Rubinius::AST::ClosedScope#map_variables {} [15]
[7] 0.1 0.05 0.01 1361 Rubinius::AST::ClosedScope#assign_local_reference [7]
0.00 0.00 1361/4594 Rubinius::AST::ClosedScope#variables [0]
0.00 0.00 1361/1381 Rubinius::CompilerNG::LocalReference#initialize [0]
0.01 0.00 1361/35332 Class#allocate [0]
0.01 0.05 1361/14417 Hash#[] [0]
0.00 0.00 46/1084 Rubinius::AST::ClosedScope#new_local [0]
-------------------------------------------------------
0.00 0.05 24/1838 Compiler::Utils.single_load [0]
[8] 0.1 0.05 0.00 24 Rubinius::CompiledMethod.scripts [8]
-------------------------------------------------------
0.08 0.03 18543/243199 Compiler::StackDepthCalculator#run_from [3]
0.07 0.04 18116/167588 InstructionSequence::Encoder#encode [4]
[9] 0.1 0.05 0.02 36659 Rubinius::InstructionSet.[] [9]
0.01 0.00 36659/36659 Rubinius::InstructionSet.opcodes_map [0]
0.01 0.00 36659/76115 Array#[] [0]
0.01 0.00 36659/37266 Rubinius::LookupTable#[] [0]
0.01 0.00 36659/36660 Rubinius::InstructionSet.opcodes [0]
-------------------------------------------------------
0.03 0.01 18477/55431 Rubinius::AST::Node#visit [18]
0.02 0.04 17769/53658 Rubinius::AST::Node#visit {} [24]
0.00 0.00 1330/1995 Compiler::Node#set [0]
0.00 0.00 736/4566 Hash#initialize [0]
0.00 0.00 380/570 Compiler::Node#show_errors [0]
0.00 0.00 24/94 Compiler::Utils.compile_feature [0]
0.00 0.00 2/4 Kernel#lambda [0]
0.00 0.00 2/10 Rubinius::Options#on [0]
0.00 0.00 1/3 Rubinius::Options#help [0]
[10] 0.1 0.04 0.00 38721 Proc.__from_block__ [10]
0.00 0.00 36395/36395 Proc#to_proc [0]
-------------------------------------------------------
0.02 0.03 35014/35014 Rubinius::InstructionSet::OpCode#stack_consumed [28]
0.07 0.01 10864/167588 InstructionSequence::Encoder#encode [4]
0.06 0.01 6059/21283 Rubinius::Generator#add [6]
0.00 0.00 1900/9975 Rubinius::SydneyRewriter#rewrite [0]
0.00 0.00 950/4750 Compiler#convert_sexp [0]
0.00 0.00 924/3762 Rubinius::Generator#pop [0]
0.00 0.00 760/2375 Sexp#find_nodes {} [0]
0.00 0.00 692/1730 Rubinius::AST::Block#strip_arguments [0]
0.00 0.00 570/1900 Compiler::Generator#add [0]
0.00 0.00 475/2185 Sexp#get [0]
[11] 0.1 0.04 0.01 59324 Array#first [11]
0.01 0.00 59324/96299 Array#at [43]
0.04 0.00 59324/334427 Kernel#equal? [13]
-------------------------------------------------------
0.03 0.07 10104/48767 Rubinius::Generator#collapse_labels {} [16]
0.00 0.10 855/9975 Rubinius::SydneyRewriter#rewrite [0]
0.00 0.01 760/4085 Compiler::Generator#collapse_labels {} [0]
0.00 0.00 190/665 Compiler::Node::Arguments#args [0]
0.00 0.01 95/95 Compiler::Node::ArrayLiteral#consume [0]
[12] 0.3 0.04 0.15 12004 Array#map! [12]
0.02 0.00 38058/180951 Array::Iterator#next [23]
0.01 0.00 26054/47536 Array#[]= [0]
0.00 0.00 26054/26265 Array::Iterator#index [0]
0.02 0.00 26054/140091 Array::Iterator#item [31]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment