Skip to content

Instantly share code, notes, and snippets.

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

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

Select an option

Save brixen/189221 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.07 0.22 16608/59928 Rubinius::Generator#add [7]
0.00 0.00 1167/9555 Hash.[] [0]
0.00 0.00 866/3179 Array#pop [0]
0.00 0.00 356/712 Rubinius::Generator#close [0]
0.00 0.00 346/1038 Rubinius::AST::Define#initialize [0]
0.00 0.00 336/2352 Array::IdentityMap#include? [0]
0.00 0.00 190/380 Compiler::Generator#close [0]
0.00 0.00 95/285 Compiler::Node::Block#bytecode [0]
0.00 0.00 95/380 Compiler::Node::Arguments#consume [0]
0.00 0.00 95/570 Compiler::Node::EvalExpression#initialize [0]
[1] 0.3 0.22 0.00 20167 Array#empty? [1]
-------------------------------------------------------
0.03 1.18 18477/55431 Rubinius::AST::Node#visit [17]
0.00 0.09 1011/1025 Rubinius::AST::ActualArguments#bytecode [0]
0.00 0.10 855/5130 Rubinius::SydneyRewriter.sexp_from_array [0]
0.00 2.32 711/711 Enumerable#each_with_index [0]
0.00 0.01 665/665 Enumerable#find_all [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.44 356/2492 Rubinius::Generator#encode [0]
0.00 0.02 346/692 Rubinius::AST::FormalArguments#map_arguments [0]
0.00 0.00 285/1140 Compiler::Node::ClosedScope#consume {} [0]
[2] 10.6 0.13 7.87 25719 Array#each [2]
0.01 0.00 78905/117622 Array::Iterator#next [34]
0.01 0.00 53210/88508 Array::Iterator#item [41]
0.01 0.01 25719/29190 Array#to_iter [31]
0.02 56.64 24015/24015 Rubinius::AST::Node#visit {} [21]
0.00 2015.06 7410/7410 Enumerable#each_with_index {} [0]
0.00 10.43 5625/5625 Rubinius::AST::ArrayLiteral#bytecode {} [0]
0.01 1.12 2090/2090 <metaclass>#sexp_from_array {} [0]
0.00 0.01 1615/1615 Enumerable#find_all {} [0]
0.00 0.02 1520/3325 Compiler::Generator#collapse_labels {} [0]
0.00 0.01 1520/1520 Enumerable#inject {} [0]
-------------------------------------------------------
0.00 0.27 860/2074 Rubinius::AST::Block#bytecode {} [0]
0.00 0.00 30/270 Rubinius::AST::AttributeAssignment#bytecode [0]
0.00 0.00 18/126 Rubinius::AST::And#bytecode [0]
0.00 0.00 17/153 Rubinius::AST::ElementAssignment#bytecode [0]
0.00 0.00 14/42 Rubinius::AST::MAsgn#bytecode {} [0]
0.00 0.00 8/32 Rubinius::AST::IterArguments#bytecode [0]
0.00 0.00 5/39 Rubinius::AST::OpAssign2#bytecode [0]
0.00 0.00 5/41 Rubinius::AST::When#receiver_bytecode [0]
0.00 0.00 3/21 Rubinius::AST::ReceiverCase#bytecode [0]
0.00 0.00 1/20 Rubinius::AST::ClosedScope#attach_and_call [0]
[3] 0.4 0.11 0.16 963 Rubinius::Generator#pop [3]
0.07 0.95 963/16608 Rubinius::Generator#add [7]
-------------------------------------------------------
0.02 0.10 41381/41381 Array#<< [26]
[4] 0.1 0.10 0.00 41381 Array#set_index [4]
-------------------------------------------------------
0.00 0.28 546/546 Compiler::StackDepthCalculator#run [0]
0.08 0.02 131/243381 Compiler::StackDepthCalculator#run_from [5]
[5] 0.4 0.08 0.21 677 Compiler::StackDepthCalculator#run_from [5]
0.07 0.02 146699/180976 Kernel#=== [8]
0.01 0.00 20333/78882 Rubinius::Tuple#[] [45]
0.01 0.00 19234/62893 Array#[] [0]
0.01 0.00 19193/54054 Array#[]= [43]
0.05 0.02 18557/36685 Rubinius::InstructionSet.[] [12]
0.02 0.21 16912/18432 Rubinius::InstructionSet::OpCode#stack_difference [30]
0.02 0.01 1645/20077 Rubinius::InstructionSet::OpCode#stack_produced [23]
0.00 0.00 636/6417 Rubinius::Tuple#size [0]
0.08 0.05 131/677 Compiler::StackDepthCalculator#run_from [5]
0.00 0.00 41/142 Fixnum#>= [0]
-------------------------------------------------------
0.07 0.07 10104/59928 Rubinius::Generator#add [7]
0.00 0.00 761/761 Array#push [0]
0.00 0.00 10/40 Array#+ [0]
0.00 0.00 1/3 <metaclass>#[] {} [0]
[6] 0.1 0.07 0.00 10876 Array#concat [6]
-------------------------------------------------------
0.04 0.23 5177/10354 Rubinius::Generator#push_literal [13]
0.00 0.05 2370/6354 Rubinius::Generator#send [0]
0.05 0.01 2056/2056 Rubinius::Generator#string_dup [11]
0.01 0.01 1780/15643 Rubinius::Generator#push_int [0]
0.00 0.00 980/980 Rubinius::Generator#push_local [0]
0.11 0.16 963/963 Rubinius::Generator#pop [3]
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.04 359/1077 Rubinius::Generator#push_const [0]
[7] 0.7 0.07 0.43 16608 Rubinius::Generator#add [7]
0.22 0.00 16608/20167 Array#empty? [1]
0.02 0.64 16608/41381 Array#<< [26]
0.05 0.02 16608/36685 Rubinius::InstructionSet.[] [12]
0.07 0.00 10104/10876 Array#concat [6]
-------------------------------------------------------
0.08 0.07 146699/243381 Compiler::StackDepthCalculator#run_from [5]
0.01 0.01 17045/24749 Rubinius::Generator#push [0]
0.01 0.01 12339/15643 Rubinius::Generator#push_int [0]
0.01 0.00 2565/14060 InstructionSequence::Encoder#encode [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]
[8] 0.1 0.07 0.02 180976 Kernel#=== [8]
0.03 0.00 180976/242040 Kernel#equal? [19]
0.00 0.00 198/6604 Kernel#== [0]
-------------------------------------------------------
0.00 0.26 1/3 File.to_ast [0]
[9] 0.3 0.06 0.20 1 Rubinius::Melbourne#file_to_ast [9]
0.00 0.02 3040/3040 Rubinius::Melbourne#process_number [0]
0.04 0.00 2043/2043 Rubinius::Melbourne#process_str [15]
0.00 0.00 1038/1038 Rubinius::Melbourne#process_array [0]
0.00 0.00 1002/1002 Rubinius::Melbourne#process_negate [0]
0.02 0.00 992/992 Rubinius::Melbourne#process_lvar [27]
0.00 0.00 899/899 Rubinius::Melbourne#process_lit [0]
0.00 0.01 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.00 0.05 24/1838 Compiler::Utils.single_load [0]
[10] 0.1 0.05 0.00 24 Rubinius::CompiledMethod.scripts [10]
-------------------------------------------------------
0.00 0.06 2043/6129 Rubinius::AST::StringLiteral#bytecode [0]
0.00 0.00 13/65 Rubinius::AST::DynamicString#bytecode [0]
[11] 0.1 0.05 0.01 2056 Rubinius::Generator#string_dup [11]
0.07 0.05 2056/16608 Rubinius::Generator#add [7]
-------------------------------------------------------
0.08 0.03 18557/243381 Compiler::StackDepthCalculator#run_from [5]
0.07 0.03 16608/59928 Rubinius::Generator#add [7]
0.01 0.00 1520/14060 InstructionSequence::Encoder#encode [0]
[12] 0.1 0.05 0.02 36685 Rubinius::InstructionSet.[] [12]
0.01 0.00 36685/36685 Rubinius::InstructionSet.opcodes_map [0]
0.01 0.00 36685/62893 Array#[] [0]
0.01 0.00 36685/37293 Rubinius::LookupTable#[] [0]
0.01 0.00 36685/36686 Rubinius::InstructionSet.opcodes [0]
-------------------------------------------------------
0.00 0.05 2043/6129 Rubinius::AST::StringLiteral#bytecode [0]
0.01 0.03 1524/15643 Rubinius::Generator#push_int [0]
0.00 0.06 899/1798 Rubinius::AST::SymbolLiteral#bytecode [0]
0.00 0.01 347/694 Rubinius::Generator#push_generator [0]
0.00 0.20 346/3460 Rubinius::AST::Define#bytecode [0]
0.00 0.00 13/65 Rubinius::AST::DynamicString#bytecode [0]
0.00 0.00 3/6 Rubinius::AST::ConstName#bytecode [0]
0.00 0.00 1/20 Rubinius::AST::ClosedScope#attach_and_call [0]
0.00 0.00 1/3 Rubinius::AST::ClassName#name_bytecode [0]
[13] 0.5 0.04 0.30 5177 Rubinius::Generator#push_literal [13]
0.00 1.91 5177/5541 Rubinius::Generator#find_literal [0]
0.07 1.37 5177/16608 Rubinius::Generator#add [7]
--------------
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment