From: David Mitchell Date: Fri, 8 Jan 2010 17:53:29 +0000 (+0000) Subject: include sv_debug_serial field in debugging output X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=cbe56f1dc5efa2a32e6943a97f6928e7eef1b1f6;p=p5sagit%2Fp5-mst-13.2.git include sv_debug_serial field in debugging output --- diff --git a/dump.c b/dump.c index 54999ad..bc1ba58 100644 --- a/dump.c +++ b/dump.c @@ -1566,12 +1566,15 @@ Perl_do_sv_dump(pTHX_ I32 level, PerlIO *file, SV *sv, I32 nest, I32 maxnest, bo s = SvPVX_const(d); #ifdef DEBUG_LEAKING_SCALARS - Perl_dump_indent(aTHX_ level, file, "ALLOCATED at %s:%d %s %s%s\n", + Perl_dump_indent(aTHX_ level, file, + "ALLOCATED at %s:%d %s %s%s; serial %"UVuf"\n", sv->sv_debug_file ? sv->sv_debug_file : "(unknown)", sv->sv_debug_line, sv->sv_debug_inpad ? "for" : "by", sv->sv_debug_optype ? PL_op_name[sv->sv_debug_optype]: "(none)", - sv->sv_debug_cloned ? " (cloned)" : ""); + sv->sv_debug_cloned ? " (cloned)" : "", + sv->sv_debug_serial + ); #endif Perl_dump_indent(aTHX_ level, file, "SV = "); if (type < SVt_LAST) { diff --git a/perl.c b/perl.c index 83ef30e..f44fab7 100644 --- a/perl.c +++ b/perl.c @@ -1162,7 +1162,7 @@ perl_destruct(pTHXx) PerlIO_printf(Perl_debug_log, "leaked: sv=0x%p" " flags=0x%"UVxf " refcnt=%"UVuf pTHX__FORMAT "\n" - "\tallocated at %s:%d %s %s%s\n", + "\tallocated at %s:%d %s %s%s; serial %"UVuf"\n", (void*)sv, (UV)sv->sv_flags, (UV)sv->sv_refcnt pTHX__VALUE, sv->sv_debug_file ? sv->sv_debug_file : "(unknown)", @@ -1170,7 +1170,8 @@ perl_destruct(pTHXx) sv->sv_debug_inpad ? "for" : "by", sv->sv_debug_optype ? PL_op_name[sv->sv_debug_optype]: "(none)", - sv->sv_debug_cloned ? " (cloned)" : "" + sv->sv_debug_cloned ? " (cloned)" : "", + sv->sv_debug_serial ); #ifdef DEBUG_LEAKING_SCALARS_FORK_DUMP Perl_dump_sv_child(aTHX_ sv);