diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2013-02-03 00:38:46 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2013-02-03 00:38:46 +0000 |
commit | 9ed4d1ab8ca3bcf10cd57144768176235a06dbf4 (patch) | |
tree | 33c89eb7f2c93f07d73863cef70619609e1f87e4 /lib | |
parent | 0d7a19717506a017ed2a17bb5917e335b5499e0d (diff) | |
download | ruby-9ed4d1ab8ca3bcf10cd57144768176235a06dbf4.tar.gz |
profiler.rb: block calls
* lib/profiler.rb (PROFILE_CALL_PROC, PROFILE_RETURN_PROC): add b_call
and b_return to profile block calls.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@39023 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib')
-rw-r--r-- | lib/profiler.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/profiler.rb b/lib/profiler.rb index 862f442cf0..be33daf662 100644 --- a/lib/profiler.rb +++ b/lib/profiler.rb @@ -76,12 +76,12 @@ module Profiler__ @@start = nil # the start time that profiling began @@stacks = nil # the map of stacks keyed by thread @@maps = nil # the map of call data keyed by thread, class and id. Call data contains the call count, total time, - PROFILE_CALL_PROC = TracePoint.new(:call, :c_call) {|tp| # :nodoc: + PROFILE_CALL_PROC = TracePoint.new(*%i[call c_call b_call]) {|tp| # :nodoc: now = Process.times[0] stack = (@@stacks[Thread.current] ||= []) stack.push [now, 0.0] } - PROFILE_RETURN_PROC = TracePoint.new(:return, :c_return) {|tp| # :nodoc: + PROFILE_RETURN_PROC = TracePoint.new(*%i[return c_return b_return]) {|tp| # :nodoc: now = Process.times[0] key = Wrapper.new(tp.defined_class, tp.method_id) stack = (@@stacks[Thread.current] ||= []) |