probe_hacks.patch
| b/Makefile.in | ||
|---|---|---|
| 297 | 297 |
@$(ECHO) preprocessing $< |
| 298 | 298 |
$(Q) $(CPP) $(XCFLAGS) $(CPPFLAGS) $(COUTFLAG)$@ -E $< > $@ |
| 299 | 299 | |
| 300 |
probes.h: |
|
| 301 |
@$(ECHO) translating probes $< |
|
| 302 |
dtrace -o $@ -h -s probes.d |
|
| 303 | ||
| 300 | 304 |
clean-local:: |
| 301 | 305 |
$(Q)$(RM) ext/extinit.c ext/extinit.$(OBJEXT) ext/ripper/y.output |
| 302 | 306 |
-$(Q)$(RM) $(pkgconfig_DATA) |
| b/array.c | ||
|---|---|---|
| 15 | 15 |
#include "ruby/util.h" |
| 16 | 16 |
#include "ruby/st.h" |
| 17 | 17 |
#include "ruby/encoding.h" |
| 18 |
#include "probes.h" |
|
| 18 | 19 |
#include "internal.h" |
| 19 | 20 | |
| 20 | 21 |
#ifndef ARRAY_DEBUG |
| ... | ... | |
| 303 | 304 |
FL_SET_EMBED((VALUE)ary); |
| 304 | 305 |
ARY_SET_EMBED_LEN((VALUE)ary, 0); |
| 305 | 306 | |
| 307 |
if(RUBY_ARRAY_ALLOC_ENABLED()) {
|
|
| 308 |
RUBY_ARRAY_ALLOC(rb_sourcefile(), rb_sourceline()); |
|
| 309 |
} |
|
| 310 | ||
| 306 | 311 |
return (VALUE)ary; |
| 307 | 312 |
} |
| 308 | 313 | |
| b/gc.c | ||
|---|---|---|
| 21 | 21 |
#include "internal.h" |
| 22 | 22 |
#include "gc.h" |
| 23 | 23 |
#include "constant.h" |
| 24 |
#include "probes.h" |
|
| 24 | 25 |
#include <stdio.h> |
| 25 | 26 |
#include <setjmp.h> |
| 26 | 27 |
#include <sys/types.h> |
| ... | ... | |
| 1167 | 1168 |
} |
| 1168 | 1169 |
} |
| 1169 | 1170 | |
| 1171 |
if(RUBY_OBJECT_ALLOC_ENABLED()) RUBY_OBJECT_ALLOC(); |
|
| 1172 | ||
| 1170 | 1173 |
obj = (VALUE)freelist; |
| 1171 | 1174 |
freelist = freelist->as.free.next; |
| 1172 | 1175 | |
| b/hash.c | ||
|---|---|---|
| 15 | 15 |
#include "ruby/st.h" |
| 16 | 16 |
#include "ruby/util.h" |
| 17 | 17 |
#include "ruby/encoding.h" |
| 18 |
#include "probes.h" |
|
| 18 | 19 |
#include <errno.h> |
| 19 | 20 | |
| 20 | 21 |
#ifdef __APPLE__ |
| ... | ... | |
| 221 | 222 |
OBJSETUP(hash, klass, T_HASH); |
| 222 | 223 | |
| 223 | 224 |
RHASH_IFNONE(hash) = Qnil; |
| 225 |
if(RUBY_HASH_ALLOC_ENABLED()) {
|
|
| 226 |
RUBY_HASH_ALLOC(rb_sourcefile(), rb_sourceline()); |
|
| 227 |
} |
|
| 224 | 228 | |
| 225 | 229 |
return (VALUE)hash; |
| 226 | 230 |
} |
| b/string.c | ||
|---|---|---|
| 15 | 15 |
#include "ruby/re.h" |
| 16 | 16 |
#include "ruby/encoding.h" |
| 17 | 17 |
#include "internal.h" |
| 18 |
#include "probes.h" |
|
| 18 | 19 |
#include <assert.h> |
| 19 | 20 | |
| 20 | 21 |
#define BEG(no) (regs->beg[(no)]) |
| ... | ... | |
| 377 | 378 |
str->as.heap.len = 0; |
| 378 | 379 |
str->as.heap.aux.capa = 0; |
| 379 | 380 | |
| 381 |
if(RUBY_STRING_ALLOC_ENABLED()) {
|
|
| 382 |
RUBY_STRING_ALLOC(rb_sourcefile(), rb_sourceline()); |
|
| 383 |
} |
|
| 384 | ||
| 380 | 385 |
return (VALUE)str; |
| 381 | 386 |
} |
| 382 | 387 | |
| b/vm_eval.c | ||
|---|---|---|
| 11 | 11 | |
| 12 | 12 |
**********************************************************************/ |
| 13 | 13 | |
| 14 |
#include "probes.h" |
|
| 15 | ||
| 14 | 16 |
static inline VALUE method_missing(VALUE obj, ID id, int argc, const VALUE *argv, int call_status); |
| 15 | 17 |
static inline VALUE rb_vm_set_finish_env(rb_thread_t * th); |
| 16 | 18 |
static inline VALUE vm_yield_with_cref(rb_thread_t *th, int argc, const VALUE *argv, const NODE *cref); |
| ... | ... | |
| 224 | 226 |
rb_call0(VALUE recv, ID mid, int argc, const VALUE *argv, |
| 225 | 227 |
call_type scope, VALUE self) |
| 226 | 228 |
{
|
| 229 |
if(RUBY_FUNCTION_ENTRY_ENABLED()) {
|
|
| 230 |
RUBY_FUNCTION_ENTRY( |
|
| 231 |
rb_obj_classname(recv), |
|
| 232 |
rb_id2name(mid), |
|
| 233 |
argc, |
|
| 234 |
rb_sourcefile(), |
|
| 235 |
rb_sourceline()); |
|
| 236 |
} |
|
| 227 | 237 |
rb_method_entry_t *me = rb_search_method_entry(recv, mid); |
| 228 | 238 |
rb_thread_t *th = GET_THREAD(); |
| 229 | 239 |
int call_status = rb_method_call_status(th, me, scope, self); |