Skip to content

Commit

Permalink
Remove old SendSite/Selector cruft
Browse files Browse the repository at this point in the history
  • Loading branch information
Evan Phoenix committed Nov 8, 2010
1 parent 0100435 commit f24335d
Show file tree
Hide file tree
Showing 7 changed files with 0 additions and 144 deletions.
2 changes: 0 additions & 2 deletions kernel/bootstrap/load_order.txt
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -25,8 +25,6 @@ proc.rbc
process.rbc process.rbc
regexp.rbc regexp.rbc
rubinius.rbc rubinius.rbc
selector.rbc
sendsite.rbc
static_scope.rbc static_scope.rbc
string.rbc string.rbc
symbol.rbc symbol.rbc
Expand Down
18 changes: 0 additions & 18 deletions kernel/bootstrap/selector.rb

This file was deleted.

49 changes: 0 additions & 49 deletions kernel/bootstrap/sendsite.rb

This file was deleted.

9 changes: 0 additions & 9 deletions kernel/common/compiled_method.rb
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -334,15 +334,6 @@ def change_name(name)
return cm return cm
end end


##
# Convenience method to return an array of the SendSites from
# this CompiledMethod's literals.
#
# @return [Tuple]
def send_sites
literals.select {|lit| lit.kind_of? SendSite }
end

## ##
# Locates the CompiledMethod and instruction address (IP) of the first # Locates the CompiledMethod and instruction address (IP) of the first
# instruction on the specified line. This method recursively examines child # instruction on the specified line. This method recursively examines child
Expand Down
1 change: 0 additions & 1 deletion kernel/common/load_order.txt
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -66,7 +66,6 @@ struct.rbc
process.rbc process.rbc
random.rbc random.rbc
regexp.rbc regexp.rbc
selector.rbc
signal.rbc signal.rbc
sprintf.rbc sprintf.rbc
symbol.rbc symbol.rbc
Expand Down
17 changes: 0 additions & 17 deletions kernel/common/selector.rb

This file was deleted.

48 changes: 0 additions & 48 deletions kernel/delta/profiler.rb
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -489,53 +489,5 @@ def print_relatives(out, rels)
end end
end end
end end

##
# Displays Selector statistics.

class Selectors
def show_stats(range=30)

count = Selector::ALL.size

entries = Selector::ALL.values.map { |s| [s, s.receives] }

entries.delete_if { |e| e.last < 10 }

sort = entries.sort { |a,b| b.last <=> a.last }

puts "\nTotal Selectors: #{count}"
puts "Top #{range}, by receives:"
puts "%-20s| %-20s| %s" % ["name", "receives", "send sites"]
puts "=========================================================="
sort[0,range].each do |entry|
puts "%-20s| %-20d| %d" % [entry.first.name, entry.last, entry.first.send_sites.size]
end
end
end

##
# Displays SendSite statistics.

class SendSites
def show_stats(range=30)
send_sites = Selector::ALL.values.inject([]) { |acc,s| acc.concat(s.send_sites) }
count = send_sites.size

send_sites.delete_if { |e| (e.hits + e.misses) < 10 }

sort = send_sites.sort { |a,b| (b.hits + b.misses) <=> (a.hits + a.misses) }

puts "\nTotal SendSites: #{count}"
puts "Top #{range}, by sends:"
puts "%-32s| %-18s | %-18s| %-10s| %s" % ["sender", "receiver class", "name", "hits", "misses"]
puts "==================================================================================================="
sort[0,range].each do |entry|
mod = entry.sender.scope.module if entry.sender.scope
sender = "#{mod}##{entry.sender.name}"
puts "%-32s| %-18s | %-18s| %-10d| %d" % [sender, entry.recv_class, entry.name, entry.hits, entry.misses]
end
end
end
end end
end end

0 comments on commit f24335d

Please sign in to comment.