Skip to content

Commit

Permalink
Use hexadecimal format for logging of traced pointer descriptor
Browse files Browse the repository at this point in the history
* mark.c [ENABLE_TRACE] (GC_mark_from): Change print format specifier
from %lu to 0x%lx for non-length descr value.
  • Loading branch information
ivmai committed Jul 24, 2024
1 parent b64d780 commit c3489b6
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions mark.c
Original file line number Diff line number Diff line change
Expand Up @@ -745,7 +745,7 @@ GC_INNER mse * GC_mark_from(mse *mark_stack_top, mse *mark_stack,
# ifdef ENABLE_TRACE
if (ADDR_INSIDE(GC_trace_ptr, current_p,
current_p + PTRS_TO_BYTES(BITMAP_BITS))) {
GC_log_printf("GC #%lu: tracing from %p bitmap descr %lu\n",
GC_log_printf("GC #%lu: tracing from %p bitmap descr 0x%lx\n",
(unsigned long)GC_gc_no, (void *)current_p,
(unsigned long)descr);
}
Expand Down Expand Up @@ -776,7 +776,7 @@ GC_INNER mse * GC_mark_from(mse *mark_stack_top, mse *mark_stack,
const void *base = GC_base(current_p);

if (base != NULL && GC_base(GC_trace_ptr) == base) {
GC_log_printf("GC #%lu: tracing from %p, proc descr %lu\n",
GC_log_printf("GC #%lu: tracing from %p, proc descr 0x%lx\n",
(unsigned long)GC_gc_no, (void *)current_p,
(unsigned long)descr);
}
Expand Down

0 comments on commit c3489b6

Please sign in to comment.