Skip to content

Instantly share code, notes, and snippets.

View methodmissing's full-sized avatar

Lourens Naudé methodmissing

View GitHub Profile
void
rb_memerror()
{
rb_thread_t th = rb_curr_thread;
if (!nomem_error ||
(rb_thread_raised_p(th, RAISED_NOMEMORY) && rb_safe_level() < 4)) {
fprintf(stderr, "[FATAL] failed to allocate memory\n");
exit(1);
}
213-138-232-39:mri_instrumentation lourens$ rake
(in /Users/lourens/projects/mri_instrumentation)
/opt/local/bin/ruby -I"/Users/lourens/projects/mri_instrumentation/lib" -I"/Users/lourens/projects/mri_instrumentation/lib" "/Users/lourens/.gem/ruby/1.8/gems/rake-0.8.4/lib/rake/rake_test_loader.rb" "test/instrumentation/argument_test.rb" "test/instrumentation/definition_test.rb" "test/instrumentation/probe_collection_test.rb" "test/instrumentation/probe_test.rb" "test/instrumentation/runner_test.rb" "test/instrumentation/strategy/base_test.rb" "test/instrumentation/strategy/builder_test.rb" "test/instrumentation/strategy/calltime_test.rb" "test/instrumentation_test.rb"
/Users/lourens/.gem/ruby/1.8/gems/rake-0.8.4/lib/rake.rb:990: warning: Insecure world writable dir /Users/lourens in PATH, mode 040753
Loaded suite /Users/lourens/.gem/ruby/1.8/gems/rake-0.8.4/lib/rake/rake_test_loader
Started
......................................Tracing... Hit Ctrl-C to end.
Count,
Probe COUNT
class Target
def initialize( runs )
@runs = runs
end
def run!
@runs.times do
Time.now
end
213-138-232-39:mri_instrumentation lourens$ rake
(in /Users/lourens/projects/mri_instrumentation)
/opt/local/bin/ruby -I"/Users/lourens/projects/mri_instrumentation/lib" -I"/Users/lourens/projects/mri_instrumentation/lib" "/Users/lourens/.gem/ruby/1.8/gems/rake-0.8.4/lib/rake/rake_test_loader.rb" "test/instrumentation/argument_test.rb" "test/instrumentation/definition_test.rb" "test/instrumentation/probe_collection_test.rb" "test/instrumentation/probe_test.rb" "test/instrumentation/runner_test.rb" "test/instrumentation/strategy/base_test.rb" "test/instrumentation/strategy/builder_test.rb" "test/instrumentation/strategy/calltime_test.rb" "test/instrumentation_test.rb"
/Users/lourens/.gem/ruby/1.8/gems/rake-0.8.4/lib/rake.rb:990: warning: Insecure world writable dir /Users/lourens in PATH, mode 040753
Loaded suite /Users/lourens/.gem/ruby/1.8/gems/rake-0.8.4/lib/rake/rake_test_loader
Started
......................................Tracing... Hit Ctrl-C to end.
Count,
Probe COUNT
rb_memerror:
return: void
rb_newobj:
ruby_stack_check:
ruby_xmalloc:
return: void
ruby_xcalloc:
return: void
ruby_xrealloc:
return: void
213-138-231-176:mri_instrumentation lourens$ ./bin/instrument -c /Users/lourens/projects/superbreak_app/script/console cache
./bin/../lib/mri/instrumentation/runner/base.rb:85: warning: Insecure world writable dir /Users/lourens in PATH, mode 040753
./bin/../lib/mri/instrumentation/runner/base.rb:87: warning: Insecure world writable dir /Users/lourens in PATH, mode 040753
Loading development environment (Rails 2.3.2)
/Users/lourens/projects/superbreak_app/vendor/rails/railties/lib/commands/console.rb:45: warning: Insecure world writable dir /Users/lourens in PATH, mode 040753
Tracing... Hit Ctrl-C to end.
dtrace: error on enabled probe ID 4 (ID 18889: pid8220:ruby:rb_clear_cache_by_id:entry): invalid address (0x2) in action #3 at DIF offset 28
>>
Count,
213-138-231-176:mri_instrumentation lourens$ ./bin/instrument -c /Users/lourens/projects/superbreak_app/script/console cache
./bin/../lib/mri/instrumentation/runner/base.rb:86: warning: Insecure world writable dir /Users/lourens in PATH, mode 040753
Loading development environment (Rails 2.3.2)
/Users/lourens/projects/superbreak_app/vendor/rails/railties/lib/commands/console.rb:45: warning: Insecure world writable dir /Users/lourens in PATH, mode 040753
Tracing... Hit Ctrl-C to end.
>> exit
Count,
Probe COUNT
rb_clear_cache 43
213-138-231-176:mri_instrumentation lourens$ ./bin/instrument -c /Users/lourens/projects/superbreak_app/script/console gc
./bin/../lib/mri/instrumentation/runner/base.rb:86: warning: Insecure world writable dir /Users/lourens in PATH, mode 040753
Tracing... Hit Ctrl-C to end.
Loading development environment (Rails 2.3.2)
/Users/lourens/projects/superbreak_app/vendor/rails/railties/lib/commands/console.rb:45: warning: Insecure world writable dir /Users/lourens in PATH, mode 040753
>> exit
Count,
Probe COUNT
rb_gc_unregister_address 1
Count,
Probe COUNT
rb_gc_unregister_address 1
add_heap 4
garbage_collect 4
rb_gc_mark_locations 5
rb_mark_tbl 9
rb_global_variable 22
rb_gc_register_address 23
sweep_source_filename 91
racing... Hit Ctrl-C to end.
>> exit
Count,
Probe COUNT
yield_under 1
yield_under_i 1
blk_copy_prev 11
blk_free 12
blk_dup 20