/* and function name for each basic block */
VG_(OSetGen_ResetIter)(instr_info_table);
while ( (bb_elem = VG_(OSetGen_Next)(instr_info_table)) ) {
- VG_(fprintf)( fp, "F:%d:%x:%s\n", bb_elem->block_num,
- (Int)bb_elem->BB_addr, bb_elem->fn_name);
+ VG_(fprintf)( fp, "F:%d:%lx:%s\n", bb_elem->block_num,
+ bb_elem->BB_addr, bb_elem->fn_name);
}
VG_(fclose)(fp);
VG_(sprintf)(buf,"\n\n"
"# Thread %d\n"
"# Total intervals: %d (Interval Size %d)\n"
- "# Total instructions: %lld\n"
- "# Total reps: %lld\n"
- "# Unique reps: %lld\n"
- "# Total fldcw instructions: %lld\n\n",
+ "# Total instructions: %llu\n"
+ "# Total reps: %llu\n"
+ "# Unique reps: %llu\n"
+ "# Total fldcw instructions: %llu\n\n",
i,
(Int)(bbv_thread[i].total_instr/(ULong)interval_size),
interval_size,
intro_Block(bk);
- if (0) VG_(printf)("ALLOC %ld -> %p\n", req_szB, p);
+ if (0) VG_(printf)("ALLOC %lu -> %p\n", req_szB, p);
return p;
}
static
void* renew_block ( ThreadId tid, void* p_old, SizeT new_req_szB )
{
- if (0) VG_(printf)("REALL %p %ld\n", p_old, new_req_szB);
+ if (0) VG_(printf)("REALL %p %lu\n", p_old, new_req_szB);
void* p_new = NULL;
tl_assert(new_req_szB > 0); // map 0 to 1
what, s );
VG_(pp_ExeContext)( VG_(get_error_where)(err) );
- emit( " <auxwhat>Address %#lx is %ld bytes inside a "
- "%ld-byte block free'd</auxwhat>\n",
+ emit( " <auxwhat>Address %#lx is %lu bytes inside a "
+ "%lu-byte block free'd</auxwhat>\n",
lo, lo-Seg__addr(seglo), Seg__size(seglo) );
VG_(pp_ExeContext)(Seg__where(seglo));
what, s );
VG_(pp_ExeContext)( VG_(get_error_where)(err) );
- emit( " Address %#lx is %ld bytes inside a "
- "%ld-byte block free'd\n",
+ emit( " Address %#lx is %lu bytes inside a "
+ "%lu-byte block free'd\n",
lo, lo-Seg__addr(seglo), Seg__size(seglo) );
VG_(pp_ExeContext)(Seg__where(seglo));
emit( " <auxwhat>First byte is "
"not inside a known block</auxwhat>\n" );
} else {
- emit( " <auxwhat>First byte (%#lx) is %ld bytes inside a "
- "%ld-byte block alloc'd</auxwhat>\n",
+ emit( " <auxwhat>First byte (%#lx) is %lu bytes inside a "
+ "%lu-byte block alloc'd</auxwhat>\n",
lo, lo-Seg__addr(seglo), Seg__size(seglo) );
VG_(pp_ExeContext)(Seg__where(seglo));
}
emit( " <auxwhat>Last byte is "
"not inside a known block</auxwhat>\n" );
} else {
- emit( " <auxwhat>Last byte (%#lx) is %ld bytes inside a "
- "%ld-byte block alloc'd</auxwhat>\n",
+ emit( " <auxwhat>Last byte (%#lx) is %lu bytes inside a "
+ "%lu-byte block alloc'd</auxwhat>\n",
hi, hi-Seg__addr(seghi), Seg__size(seghi) );
VG_(pp_ExeContext)(Seg__where(seghi));
}
if (UNKNOWN == seglo) {
emit( " First byte is not inside a known block\n" );
} else {
- emit( " First byte (%#lx) is %ld bytes inside a "
- "%ld-byte block alloc'd\n",
+ emit( " First byte (%#lx) is %lu bytes inside a "
+ "%lu-byte block alloc'd\n",
lo, lo-Seg__addr(seglo), Seg__size(seglo) );
VG_(pp_ExeContext)(Seg__where(seglo));
}
if (UNKNOWN == seghi) {
emit( " Last byte is not inside a known block\n" );
} else {
- emit( " Last byte (%#lx) is %ld bytes inside a "
- "%ld-byte block alloc'd\n",
+ emit( " Last byte (%#lx) is %lu bytes inside a "
+ "%lu-byte block alloc'd\n",
hi, hi-Seg__addr(seghi), Seg__size(seghi) );
VG_(pp_ExeContext)(Seg__where(seghi));
}
static void GlobalTreeNode__pp ( GlobalTreeNode* nd ) {
tl_assert(nd->descr);
- VG_(printf)("GTNode [%#lx,+%ld) %s",
+ VG_(printf)("GTNode [%#lx,+%lu) %s",
nd->addr, nd->szB, nd->descr->name);
}
sKey.szB = szB;
gKey.addr = ea;
gKey.szB = szB;
- if (0) VG_(printf)("Tree sizes %ld %ld\n",
+ if (0) VG_(printf)("Tree sizes %lu %lu\n",
VG_(sizeFM)(siTrees[tid]), VG_(sizeFM)(giTree));
sOK = VG_(findBoundsFM)( siTrees[tid],
(UWord*)&sLB, NULL/*unused*/,
if (0 && (sb || gb))
VG_(message)(Vg_DebugMsg,
"exp-sgcheck: new max tree sizes: "
- "StackTree %ld, GlobalTree %ld\n",
+ "StackTree %lu, GlobalTree %lu\n",
stats__max_sitree_size, stats__max_gitree_size );
}
} else {
default:
tl_assert2(0, "VERB_snapshot: unknown snapshot kind: %d", snapshot->kind);
}
- VERB(verbosity, "%s S%s%3d (t:%lld, hp:%ld, ex:%ld, st:%ld)\n",
+ VERB(verbosity, "%s S%s%3d (t:%lld, hp:%lu, ex:%lu, st:%lu)\n",
prefix, suffix, i,
snapshot->time,
snapshot->heap_szB,
}
VERB(3, ">>> (%ld, %ld)\n",
- new_req_szB - old_req_szB, new_slop_szB - old_slop_szB);
+ (SSizeT)(new_req_szB - old_req_szB),
+ (SSizeT)(new_slop_szB - old_slop_szB));
}
return p_new;
static INLINE void new_mem_stack_2(SizeT len, const HChar* what)
{
if (have_started_executing_code) {
- VERB(3, "<<< new_mem_stack (%ld)\n", len);
+ VERB(3, "<<< new_mem_stack (%lu)\n", len);
n_stack_allocs++;
update_stack_stats(len);
maybe_take_snapshot(Normal, what);
static INLINE void die_mem_stack_2(SizeT len, const HChar* what)
{
if (have_started_executing_code) {
- VERB(3, "<<< die_mem_stack (%ld)\n", -len);
+ VERB(3, "<<< die_mem_stack (-%lu)\n", len);
n_stack_frees++;
maybe_take_snapshot(Peak, "stkPEAK");
update_stack_stats(-len);
}
// Do the non-ip_desc part first...
- FP("%sn%d: %lu ", depth_str, sxpt->Sig.n_children, sxpt->szB);
+ FP("%sn%u: %lu ", depth_str, sxpt->Sig.n_children, sxpt->szB);
// For ip_descs beginning with "0xABCD...:" addresses, we first
// measure the length of the "0xabcd: " address at the start of the
STATS("stack allocs: %u\n", n_stack_allocs);
STATS("stack frees: %u\n", n_stack_frees);
STATS("XPts: %u\n", n_xpts);
- STATS("top-XPts: %u (%d%%)\n",
+ STATS("top-XPts: %u (%u%%)\n",
alloc_xpt->n_children,
( n_xpts ? alloc_xpt->n_children * 100 / n_xpts : 0));
STATS("XPt init expansions: %u\n", n_xpt_init_expansions);