Class: RubyProf::Thread
- Inherits:
-
Object
- Object
- RubyProf::Thread
- Defined in:
- ext/ruby_prof/rp_thread.c
Instance Method Summary collapse
-
#id ⇒ Numeric
Returns the id of this thread.
-
#methods ⇒ Array of MethodInfo
Returns an array of methods that were called from this thread during program execution.
-
#method ⇒ MethodInfo
Returns the top level method for this thread (ie, the starting method).
Instance Method Details
#id ⇒ Numeric
Returns the id of this thread.
199 200 201 202 203 204 |
# File 'ext/ruby_prof/rp_thread.c', line 199
static VALUE
prof_thread_id(VALUE self)
{
thread_data_t* thread = prof_get_thread(self);
return thread->thread_id;
}
|
#methods ⇒ Array of MethodInfo
Returns an array of methods that were called from this thread during program execution.
211 212 213 214 215 216 217 218 219 220 221 |
# File 'ext/ruby_prof/rp_thread.c', line 211
static VALUE
prof_thread_methods(VALUE self)
{
thread_data_t* thread = prof_get_thread(self);
if (thread->methods == Qnil)
{
thread->methods = rb_ary_new();
st_foreach(thread->method_table, collect_methods, thread->methods);
}
return thread->methods;
}
|
#method ⇒ MethodInfo
Returns the top level method for this thread (ie, the starting method).
228 229 230 231 232 233 |
# File 'ext/ruby_prof/rp_thread.c', line 228
static VALUE
prof_thread_top_method(VALUE self)
{
thread_data_t* thread = prof_get_thread(self);
return prof_method_wrap(thread->top);
}
|