1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

* include/ruby/ruby.h: rename RUBY_INTERNAL_EVENT_FREE to

RUBY_INTERNAL_EVENT_FREEOBJ.
* ext/-test-/tracepoint/tracepoint.c,
  ext/objspace/object_tracing.c,
  gc.c, vm_trace.c: catch up this change.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40959 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
ko1 2013-05-27 10:28:25 +00:00
parent 0d339bf5cb
commit f0b6cb6fc7
6 changed files with 15 additions and 6 deletions

View file

@ -1,3 +1,12 @@
Mon May 27 19:25:47 2013 Koichi Sasada <ko1@atdot.net>
* include/ruby/ruby.h: rename RUBY_INTERNAL_EVENT_FREE to
RUBY_INTERNAL_EVENT_FREEOBJ.
* ext/-test-/tracepoint/tracepoint.c,
ext/objspace/object_tracing.c,
gc.c, vm_trace.c: catch up this change.
Mon May 27 18:57:28 2013 Koichi Sasada <ko1@atdot.net>
* ext/objspace/objspace.c: support ObjectSpace.trace_object_allocations.

View file

@ -19,7 +19,7 @@ tracepoint_track_objspace_events_i(VALUE tpval, void *data)
newobj_count++;
break;
}
case RUBY_INTERNAL_EVENT_FREE:
case RUBY_INTERNAL_EVENT_FREEOBJ:
{
free_count++;
break;
@ -37,7 +37,7 @@ tracepoint_track_objspace_events_i(VALUE tpval, void *data)
VALUE
tracepoint_track_objspace_events(VALUE self)
{
VALUE tpval = rb_tracepoint_new(0, RUBY_INTERNAL_EVENT_NEWOBJ | RUBY_INTERNAL_EVENT_FREE | RUBY_INTERNAL_EVENT_GC_START, tracepoint_track_objspace_events_i, 0);
VALUE tpval = rb_tracepoint_new(0, RUBY_INTERNAL_EVENT_NEWOBJ | RUBY_INTERNAL_EVENT_FREEOBJ | RUBY_INTERNAL_EVENT_GC_START, tracepoint_track_objspace_events_i, 0);
VALUE result = rb_ary_new();
int i;

View file

@ -125,7 +125,7 @@ trace_object_allocations(VALUE objspace)
struct traceobj_arg arg;
arg.newobj_trace = rb_tracepoint_new(0, RUBY_INTERNAL_EVENT_NEWOBJ, newobj_i, &arg);
arg.freeobj_trace = rb_tracepoint_new(0, RUBY_INTERNAL_EVENT_FREE, freeobj_i, &arg);
arg.freeobj_trace = rb_tracepoint_new(0, RUBY_INTERNAL_EVENT_FREEOBJ, freeobj_i, &arg);
arg.object_table = st_init_numtable();
arg.path_table = st_init_strtable();

2
gc.c
View file

@ -1121,7 +1121,7 @@ make_io_deferred(RVALUE *p)
static int
obj_free(rb_objspace_t *objspace, VALUE obj)
{
gc_event_hook(objspace, RUBY_INTERNAL_EVENT_FREE, obj);
gc_event_hook(objspace, RUBY_INTERNAL_EVENT_FREEOBJ, obj);
switch (BUILTIN_TYPE(obj)) {
case T_NIL:

View file

@ -1729,7 +1729,7 @@ int ruby_native_thread_p(void);
#define RUBY_INTERNAL_EVENT_SWITCH 0x040000
/* 0x080000 */
#define RUBY_INTERNAL_EVENT_NEWOBJ 0x100000
#define RUBY_INTERNAL_EVENT_FREE 0x200000
#define RUBY_INTERNAL_EVENT_FREEOBJ 0x200000
#define RUBY_INTERNAL_EVENT_GC_START 0x400000
#define RUBY_INTERNAL_EVENT_OBJSPACE_MASK 0x700000
#define RUBY_INTERNAL_EVENT_MASK 0xfffe0000

View file

@ -826,7 +826,7 @@ rb_tracearg_raised_exception(rb_trace_arg_t *trace_arg)
VALUE
rb_tracearg_object(rb_trace_arg_t *trace_arg)
{
if (trace_arg->event & (RUBY_INTERNAL_EVENT_NEWOBJ | RUBY_INTERNAL_EVENT_FREE)) {
if (trace_arg->event & (RUBY_INTERNAL_EVENT_NEWOBJ | RUBY_INTERNAL_EVENT_FREEOBJ)) {
/* ok */
}
else {