@@ -3386,11 +3386,11 @@ gc_page_sweep(rb_objspace_t *objspace, rb_heap_t *heap, struct heap_page *sweep_
3386
3386
if (bitset & 1 ) {
3387
3387
switch (BUILTIN_TYPE (p )) {
3388
3388
default : { /* majority case */
3389
- gc_report (2 , objspace , "page_sweep: free %s \n" , obj_info (( VALUE ) p ) );
3389
+ gc_report (2 , objspace , "page_sweep: free %p \n" , ( void * ) p );
3390
3390
#if USE_RGENGC && RGENGC_CHECK_MODE
3391
3391
if (!is_full_marking (objspace )) {
3392
- if (RVALUE_OLD_P ((VALUE )p )) rb_bug ("page_sweep: %s - old while minor GC." , obj_info (( VALUE ) p ) );
3393
- if (rgengc_remembered (objspace , (VALUE )p )) rb_bug ("page_sweep: %s - remembered." , obj_info (( VALUE ) p ) );
3392
+ if (RVALUE_OLD_P ((VALUE )p )) rb_bug ("page_sweep: %p - old while minor GC." , ( void * ) p );
3393
+ if (rgengc_remembered (objspace , (VALUE )p )) rb_bug ("page_sweep: %p - remembered." , ( void * ) p );
3394
3394
}
3395
3395
#endif
3396
3396
if (obj_free (objspace , (VALUE )p )) {
@@ -5729,26 +5729,26 @@ NOINLINE(static void gc_writebarrier_incremental(VALUE a, VALUE b, rb_objspace_t
5729
5729
static void
5730
5730
gc_writebarrier_incremental (VALUE a , VALUE b , rb_objspace_t * objspace )
5731
5731
{
5732
- gc_report (2 , objspace , "gc_writebarrier_incremental: [LG] %s -> %s\n" , obj_info ( a ) , obj_info (b ));
5732
+ gc_report (2 , objspace , "gc_writebarrier_incremental: [LG] %p -> %s\n" , ( void * ) a , obj_info (b ));
5733
5733
5734
5734
if (RVALUE_BLACK_P (a )) {
5735
5735
if (RVALUE_WHITE_P (b )) {
5736
5736
if (!RVALUE_WB_UNPROTECTED (a )) {
5737
- gc_report (2 , objspace , "gc_writebarrier_incremental: [IN] %s -> %s\n" , obj_info ( a ) , obj_info (b ));
5737
+ gc_report (2 , objspace , "gc_writebarrier_incremental: [IN] %p -> %s\n" , ( void * ) a , obj_info (b ));
5738
5738
gc_mark_from (objspace , b , a );
5739
5739
}
5740
5740
}
5741
5741
else if (RVALUE_OLD_P (a ) && !RVALUE_OLD_P (b )) {
5742
5742
if (!RVALUE_WB_UNPROTECTED (b )) {
5743
- gc_report (1 , objspace , "gc_writebarrier_incremental: [GN] %s -> %s\n" , obj_info ( a ) , obj_info (b ));
5743
+ gc_report (1 , objspace , "gc_writebarrier_incremental: [GN] %p -> %s\n" , ( void * ) a , obj_info (b ));
5744
5744
RVALUE_AGE_SET_OLD (objspace , b );
5745
5745
5746
5746
if (RVALUE_BLACK_P (b )) {
5747
5747
gc_grey (objspace , b );
5748
5748
}
5749
5749
}
5750
5750
else {
5751
- gc_report (1 , objspace , "gc_writebarrier_incremental: [LL] %s -> %s\n" , obj_info ( a ) , obj_info (b ));
5751
+ gc_report (1 , objspace , "gc_writebarrier_incremental: [LL] %p -> %s\n" , ( void * ) a , obj_info (b ));
5752
5752
gc_remember_unprotected (objspace , b );
5753
5753
}
5754
5754
}
@@ -9037,65 +9037,65 @@ rb_raw_obj_info(char *buff, const int buff_size, VALUE obj)
9037
9037
(int )RARRAY_LEN (obj ));
9038
9038
break ;
9039
9039
case T_STRING : {
9040
- snprintf (buff , buff_size , "%s %s" , buff , RSTRING_PTR (obj ));
9041
- break ;
9040
+ snprintf (buff , buff_size , "%s %s" , buff , RSTRING_PTR (obj ));
9041
+ break ;
9042
9042
}
9043
9043
case T_CLASS : {
9044
- VALUE class_path = rb_class_path_cached (obj );
9045
- if (!NIL_P (class_path )) {
9046
- snprintf (buff , buff_size , "%s %s" , buff , RSTRING_PTR (class_path ));
9047
- }
9048
- break ;
9044
+ VALUE class_path = rb_class_path_cached (obj );
9045
+ if (!NIL_P (class_path )) {
9046
+ snprintf (buff , buff_size , "%s %s" , buff , RSTRING_PTR (class_path ));
9047
+ }
9048
+ break ;
9049
9049
}
9050
9050
case T_DATA : {
9051
- const char * const type_name = rb_objspace_data_type_name (obj );
9052
- if (type_name ) {
9053
- snprintf (buff , buff_size , "%s %s" , buff , type_name );
9054
- }
9055
- break ;
9051
+ const char * const type_name = rb_objspace_data_type_name (obj );
9052
+ if (type_name ) {
9053
+ snprintf (buff , buff_size , "%s %s" , buff , type_name );
9054
+ }
9055
+ break ;
9056
9056
}
9057
9057
case T_IMEMO : {
9058
- const char * imemo_name ;
9059
- switch (imemo_type (obj )) {
9058
+ const char * imemo_name ;
9059
+ switch (imemo_type (obj )) {
9060
9060
#define IMEMO_NAME (x ) case imemo_##x: imemo_name = #x; break;
9061
- IMEMO_NAME (none );
9062
- IMEMO_NAME (cref );
9063
- IMEMO_NAME (svar );
9064
- IMEMO_NAME (throw_data );
9065
- IMEMO_NAME (ifunc );
9066
- IMEMO_NAME (memo );
9067
- IMEMO_NAME (ment );
9068
- IMEMO_NAME (iseq );
9061
+ IMEMO_NAME (none );
9062
+ IMEMO_NAME (cref );
9063
+ IMEMO_NAME (svar );
9064
+ IMEMO_NAME (throw_data );
9065
+ IMEMO_NAME (ifunc );
9066
+ IMEMO_NAME (memo );
9067
+ IMEMO_NAME (ment );
9068
+ IMEMO_NAME (iseq );
9069
9069
default : rb_bug ("unknown IMEMO" );
9070
9070
#undef IMEMO_NAME
9071
+ }
9072
+ snprintf (buff , buff_size , "%s %s" , buff , imemo_name );
9073
+
9074
+ switch (imemo_type (obj )) {
9075
+ case imemo_ment : {
9076
+ const rb_method_entry_t * me = & RANY (obj )-> as .imemo .ment ;
9077
+ snprintf (buff , buff_size , "%s (called_id: %s, type: %s, alias: %d, owner: %s, defined_class: %s)" , buff ,
9078
+ rb_id2name (me -> called_id ),
9079
+ method_type_name (me -> def -> type ),
9080
+ me -> def -> alias_count ,
9081
+ obj_info (me -> owner ),
9082
+ obj_info (me -> defined_class ));
9083
+ break ;
9071
9084
}
9072
- snprintf (buff , buff_size , "%s %s" , buff , imemo_name );
9073
-
9074
- switch (imemo_type (obj )) {
9075
- case imemo_ment : {
9076
- const rb_method_entry_t * me = & RANY (obj )-> as .imemo .ment ;
9077
- snprintf (buff , buff_size , "%s (called_id: %s, type: %s, alias: %d, owner: %s, defined_class: %s)" , buff ,
9078
- rb_id2name (me -> called_id ),
9079
- method_type_name (me -> def -> type ),
9080
- me -> def -> alias_count ,
9081
- obj_info (me -> owner ),
9082
- obj_info (me -> defined_class ));
9083
- break ;
9084
- }
9085
- case imemo_iseq : {
9086
- const rb_iseq_t * iseq = (const rb_iseq_t * )obj ;
9087
-
9088
- if (iseq -> body -> location .label ) {
9089
- snprintf (buff , buff_size , "%s %s@%s:%d" , buff ,
9090
- RSTRING_PTR (iseq -> body -> location .label ),
9091
- RSTRING_PTR (iseq -> body -> location .path ),
9092
- FIX2INT (iseq -> body -> location .first_lineno ));
9093
- }
9094
- break ;
9085
+ case imemo_iseq : {
9086
+ const rb_iseq_t * iseq = (const rb_iseq_t * )obj ;
9087
+
9088
+ if (iseq -> body -> location .label ) {
9089
+ snprintf (buff , buff_size , "%s %s@%s:%d" , buff ,
9090
+ RSTRING_PTR (iseq -> body -> location .label ),
9091
+ RSTRING_PTR (iseq -> body -> location .path ),
9092
+ FIX2INT (iseq -> body -> location .first_lineno ));
9095
9093
}
9096
- default :
9097
- break ;
9094
+ break ;
9098
9095
}
9096
+ default :
9097
+ break ;
9098
+ }
9099
9099
}
9100
9100
default :
9101
9101
break ;
0 commit comments