From: Tim Bunce Date: Wed, 26 Sep 2012 13:34:42 +0000 (+0900) Subject: Note need to treat HEs as nodes. Warn on suspect HeVAL X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=b6ec3c3a2fc33dc6030b21da274619ef127d923f;p=p5sagit%2FDevel-Size.git Note need to treat HEs as nodes. Warn on suspect HeVAL --- diff --git a/Size.xs b/Size.xs index 7115187..fb02351 100644 --- a/Size.xs +++ b/Size.xs @@ -1078,6 +1078,7 @@ sv_size(pTHX_ struct state *const st, pPATH, const SV * const orig_thing, for (cur_bucket = 0; cur_bucket <= HvMAX(thing); cur_bucket++) { cur_entry = *(HvARRAY(thing) + cur_bucket); while (cur_entry) { +/* XXX a HE should probably be a node so the keys and values are seen as pairs */ ADD_SIZE(st, "he", sizeof(HE)); hek_size(aTHX_ st, cur_entry->hent_hek, HvSHAREKEYS(thing), NPathLink("hent_hek")); if (recurse >= st->min_recurse_threshold) { @@ -1088,6 +1089,7 @@ sv_size(pTHX_ struct state *const st, pPATH, const SV * const orig_thing, */ if (PTR2UV(HeVAL(cur_entry)) > 0xFFF) sv_size(aTHX_ st, NPathLink("HeVAL"), HeVAL(cur_entry), recurse); +else warn("skipped suspect HeVAL %p", HeVAL(cur_entry)); } cur_entry = cur_entry->hent_next; }