either to keep the free stacktrace and/or to compute full xtree memory.
Also, properly compute avg nr of IP per execontext: the avg must
be computed using the real nr of execontext stored, not the hash
table size.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@16199
" exectx: %'lu lists, %'llu contexts (avg %3.2f per list)"
" (avg %3.2f IP per context)\n",
ec_htab_size, ec_totstored, (Double)ec_totstored / (Double)ec_htab_size,
- (Double)total_n_ips / (Double)ec_htab_size
+ (Double)total_n_ips / (Double)ec_totstored
);
VG_(message)(Vg_DebugMsg,
" exectx: %'llu searches, %'llu full compares (%'llu per 1000)\n",
switch (MC_(clo_keep_stacktraces)) {
case KS_none: return;
- case KS_alloc: pos = -1; break;
+ case KS_alloc:
+ if (LIKELY(VG_(clo_xtree_memory)
+ != Vg_XTMemory_Full))
+ return;
+ pos = -1; break;
case KS_free: pos = 0; break;
case KS_alloc_then_free: pos = 0; break;
case KS_alloc_and_free: pos = 1; break;
ec_free = VG_(record_ExeContext) ( tid, 0/*first_ip_delta*/ );
if (UNLIKELY(VG_(clo_xtree_memory) == Vg_XTMemory_Full))
VG_(XTMemory_Full_free)(mc->szB, mc->where[0], ec_free);
- if (pos >= 0)
+ if (LIKELY(pos >= 0))
mc->where[pos] = ec_free;
}