219件ヒット
[1-100件を表示]
(0.116秒)
クラス
- Fiber (5)
- TracePoint (82)
- Tracer (22)
モジュール
- Etc (33)
- ObjectSpace (55)
キーワード
- Ruby用語集 (11)
-
SC
_ JOB _ CONTROL (11) -
SC
_ SHARED _ MEMORY _ OBJECTS (11) -
SC
_ TYPED _ MEMORY _ OBJECTS (11) -
allocation
_ sourcefile (11) -
allocation
_ sourceline (11) - disable (11)
- enable (11)
- new (11)
- parameters (6)
- raise (5)
-
return
_ value (11) - self (11)
-
set
_ trace _ func (11) - stat (10)
-
trace
_ func (22) -
trace
_ object _ allocations (11) -
trace
_ object _ allocations _ start (11) -
trace
_ object _ allocations _ stop (11)
検索結果
先頭5件
-
TracePoint
. trace(*events) {|obj| . . . } -> TracePoint (24419.0) -
新しい TracePoint オブジェクトを作成して自動的にトレースを開始し ます。TracePoint.new のコンビニエンスメソッドです。
...新しい TracePoint オブジェクトを作成して自動的にトレースを開始し
ます。TracePoint.new のコンビニエンスメソッドです。
@param events トレースするイベントを String か Symbol で任
意の数指定します。指定できる値に......ついては
TracePoint.new を参照してください。
//emlist[例][ruby]{
trace = TracePoint.trace(:call) { |tp| [tp.lineno, tp.event] }
# => #<TracePoint:0x007f786a452448>
trace.enabled? # => true
//}
@raise ThreadError ブロックを指定しなかった場合に発生し... -
ObjectSpace
. # trace _ object _ allocations _ stop -> nil (21313.0) -
オブジェクト割り当てのトレースを終了します。
...オブジェクト割り当てのトレースを終了します。
トレースを終了する為には、ObjectSpace.#trace_object_allocations_startを呼んだ回数分だけこのメソッドを呼ぶ必要があります。
@see ObjectSpace.#trace_object_allocations_start... -
ObjectSpace
. # trace _ object _ allocations { . . . } (21307.0) -
与えられたブロック内でオブジェクトのトレースを行います。
...のトレースを行います。
//emlist[例][ruby]{
require 'objspace'
class C
include ObjectSpace
def foo
trace_object_allocations do
obj = Object.new
p "#{allocation_sourcefile(obj)}:#{allocation_sourceline(obj)}"
end
end
end
C.new.foo #=> "objtrace.rb:8"
//}... -
ObjectSpace
. # trace _ object _ allocations _ start -> nil (21307.0) -
オブジェクト割り当てのトレースを開始します。
...オブジェクト割り当てのトレースを開始します。
@see ObjectSpace.#trace_object_allocations_stop... -
Tracer
# trace _ func(event , file , line , id , binding , klass , *) -> object | nil (9401.0) -
@todo
@todo -
Tracer
. trace _ func(*vars) -> object | nil (9301.0) -
debug ライブラリの内部で使用します。
debug ライブラリの内部で使用します。 -
TracePoint
# disable { . . . } -> object (9260.0) -
self のトレースを無効にします。
...前の TracePoint#enabled? を返します。(トレースが既に有効であっ
た場合は true を返します。そうでなければ false を返します)
//emlist[例][ruby]{
trace.enabled? # => true
trace.disable # => false (実行前の状態)
trace.enabled? # => false
trace.disable #......結果を返します。
//emlist[例][ruby]{
trace.enabled? # => true
trace.disable do
trace.enabled? # => false
end
trace.enabled? # => true
//}
[注意] イベントフックのためのメソッドに、ブロックの外側で参照した場合は
RuntimeError が発生する事に注......意してください。
trace.enable { p trace.lineno }
# => RuntimeError: access from outside
@see TracePoint#enable, TracePoint#enabled?... -
ObjectSpace
. # allocation _ sourcefile(object) -> String (9224.0) -
objectの元となったソースファイル名を返します。
...objectの元となったソースファイル名を返します。
@param object 元となるソースファイル名を取得したいobjectを指定します。
@return objectの元となるソースファイル名を返します。存在しない場合はnilを返します。
//emlist[例:test......{
require 'objspace'
ObjectSpace::trace_object_allocations_start
obj = Object.new
puts "file:#{ObjectSpace::allocation_sourcefile(obj)}" # => file:test.rb
ObjectSpace::trace_object_allocations_stop
//}
@see ObjectSpace.#trace_object_allocations_start,
ObjectSpace.#trace_object_allocations_s... -
ObjectSpace
. # allocation _ sourceline(object) -> Integer (9224.0) -
objectの元となったソースファイルの行番号を返します。
...objectの元となったソースファイルの行番号を返します。
@param object 元となるソースファイルの行番号を取得したいobjectを指定します。
@return objectの元となるソースファイルの行番号を返します。存在しない場合はnilを返し......//emlist[例][ruby]{
require 'objspace'
ObjectSpace::trace_object_allocations_start
obj = Object.new
puts "line:#{ObjectSpace::allocation_sourceline(obj)}" # => line:4
ObjectSpace::trace_object_allocations_stop
//}
@see ObjectSpace.#trace_object_allocations_start,
ObjectSpace.#trace_object_a......llocations_stop... -
static VALUE set
_ trace _ func(VALUE obj , VALUE trace) (6416.0) -
Kernel#set_trace_func の実体。 評価器に対するフック手続きを登録します。
...Kernel#set_trace_func の実体。
評価器に対するフック手続きを登録します。...