mirror of
https://github.com/Zenithsiz/ftmemsim-valgrind.git
synced 2026-02-03 10:05:29 +00:00
Callgrind: fix a few 'unused parameter' warnings
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@9251
This commit is contained in:
parent
5aac956e64
commit
13ce1f63bc
@ -183,7 +183,7 @@ BBCC* lookup_bbcc(BB* bb, Context* cxt)
|
||||
bbcc, bbcc ? bbcc->tid : 0);
|
||||
|
||||
CLG_DEBUGIF(2)
|
||||
if (bbcc) CLG_(print_bbcc)(-2,bbcc,False);
|
||||
if (bbcc) CLG_(print_bbcc)(-2,bbcc);
|
||||
|
||||
return bbcc;
|
||||
}
|
||||
@ -411,7 +411,7 @@ static BBCC* clone_bbcc(BBCC* orig, Context* cxt, Int rec_index)
|
||||
|
||||
|
||||
CLG_DEBUGIF(3)
|
||||
CLG_(print_bbcc)(-2, new, False);
|
||||
CLG_(print_bbcc)(-2, new);
|
||||
|
||||
CLG_DEBUG(2,"- clone_BBCC(%p, %d) for BB %#lx\n"
|
||||
" orig %s\n"
|
||||
@ -453,7 +453,7 @@ BBCC* CLG_(get_bbcc)(BB* bb)
|
||||
bb->last_bbcc = bbcc;
|
||||
|
||||
CLG_DEBUGIF(3)
|
||||
CLG_(print_bbcc)(-2, bbcc, False);
|
||||
CLG_(print_bbcc)(-2, bbcc);
|
||||
}
|
||||
|
||||
CLG_DEBUG(3, "- get_bbcc(BB %#lx): BBCC %p\n",
|
||||
|
||||
@ -114,7 +114,7 @@ void ensure_stack_size(Int i)
|
||||
|
||||
|
||||
/* Called when function entered nonrecursive */
|
||||
static void function_entered(fn_node* fn, BBCC* to)
|
||||
static void function_entered(fn_node* fn)
|
||||
{
|
||||
CLG_ASSERT(fn != 0);
|
||||
|
||||
@ -147,7 +147,7 @@ static void function_entered(fn_node* fn, BBCC* to)
|
||||
}
|
||||
|
||||
/* Called when function left (no recursive level active) */
|
||||
static void function_left(fn_node* fn, BBCC* from)
|
||||
static void function_left(fn_node* fn)
|
||||
{
|
||||
CLG_ASSERT(fn != 0);
|
||||
|
||||
@ -230,7 +230,7 @@ void CLG_(push_call_stack)(BBCC* from, UInt jmp, BBCC* to, Addr sp, Bool skip)
|
||||
jcc->call_counter++;
|
||||
CLG_(stat).call_counter++;
|
||||
|
||||
if (*pdepth == 1) function_entered(to_fn, to);
|
||||
if (*pdepth == 1) function_entered(to_fn);
|
||||
}
|
||||
|
||||
/* return address is only is useful with a real call;
|
||||
@ -354,7 +354,7 @@ void CLG_(pop_call_stack)()
|
||||
CLG_(current_fn_stack).bottom + lower_entry->fn_sp;
|
||||
CLG_ASSERT(CLG_(current_state).cxt != 0);
|
||||
|
||||
if (depth == 0) function_left(to_fn, jcc->from);
|
||||
if (depth == 0) function_left(to_fn);
|
||||
}
|
||||
|
||||
/* To allow for an assertion in push_call_stack() */
|
||||
|
||||
@ -112,7 +112,7 @@ void CLG_(print_execstate)(int s, exec_state* es)
|
||||
}
|
||||
|
||||
|
||||
void CLG_(print_bbcc)(int s, BBCC* bbcc, Bool jumpaddr)
|
||||
void CLG_(print_bbcc)(int s, BBCC* bbcc)
|
||||
{
|
||||
BB* bb;
|
||||
|
||||
@ -129,16 +129,9 @@ void CLG_(print_bbcc)(int s, BBCC* bbcc, Bool jumpaddr)
|
||||
bb = bbcc->bb;
|
||||
CLG_ASSERT(bb!=0);
|
||||
|
||||
#if 0
|
||||
if (jumpaddr)
|
||||
VG_(printf)("%s +%p=%p, ",
|
||||
VG_(printf)("%s +%#lx=%#lx, ",
|
||||
bb->obj->name + bb->obj->last_slash_pos,
|
||||
bb->jmp_offset, bb_jmpaddr(bb));
|
||||
else
|
||||
#endif
|
||||
VG_(printf)("%s +%#lx=%#lx, ",
|
||||
bb->obj->name + bb->obj->last_slash_pos,
|
||||
bb->offset, bb_addr(bb));
|
||||
bb->offset, bb_addr(bb));
|
||||
CLG_(print_cxt)(s+8, bbcc->cxt, bbcc->rec_index);
|
||||
}
|
||||
|
||||
@ -243,10 +236,10 @@ void CLG_(print_jcc)(int s, jCC* jcc)
|
||||
return;
|
||||
}
|
||||
VG_(printf)("JCC %p from ", jcc);
|
||||
CLG_(print_bbcc)(s+9, jcc->from, True);
|
||||
CLG_(print_bbcc)(s+9, jcc->from);
|
||||
print_indent(s+4);
|
||||
VG_(printf)("to ");
|
||||
CLG_(print_bbcc)(s+9, jcc->to, False);
|
||||
CLG_(print_bbcc)(s+9, jcc->to);
|
||||
print_indent(s+4);
|
||||
VG_(printf)("Calls %llu\n", jcc->call_counter);
|
||||
print_indent(s+4);
|
||||
@ -334,7 +327,7 @@ void CLG_(print_bbcc_cost)(int s, BBCC* bbcc)
|
||||
bb = bbcc->bb;
|
||||
CLG_ASSERT(bb!=0);
|
||||
|
||||
CLG_(print_bbcc)(s, bbcc, False);
|
||||
CLG_(print_bbcc)(s, bbcc);
|
||||
|
||||
ecounter = bbcc->ecounter_sum;
|
||||
|
||||
@ -440,7 +433,7 @@ void* CLG_(malloc)(HChar* cc, UWord s, char* f)
|
||||
void CLG_(print_bbno)(void) {}
|
||||
void CLG_(print_context)(void) {}
|
||||
void CLG_(print_jcc)(int s, jCC* jcc) {}
|
||||
void CLG_(print_bbcc)(int s, BBCC* bbcc, Bool b) {}
|
||||
void CLG_(print_bbcc)(int s, BBCC* bbcc) {}
|
||||
void CLG_(print_bbcc_fn)(BBCC* bbcc) {}
|
||||
void CLG_(print_cost)(int s, EventSet* es, ULong* cost) {}
|
||||
void CLG_(print_bb)(int s, BB* bb) {}
|
||||
|
||||
@ -787,7 +787,7 @@ static Bool fprint_bbcc(Int fd, BBCC* bbcc, AddrPos* last)
|
||||
CLG_ASSERT(bbcc->cxt != 0);
|
||||
CLG_DEBUGIF(1) {
|
||||
VG_(printf)("+ fprint_bbcc (Instr %d): ", bb->instr_count);
|
||||
CLG_(print_bbcc)(15, bbcc, False);
|
||||
CLG_(print_bbcc)(15, bbcc);
|
||||
}
|
||||
|
||||
CLG_ASSERT(currSum == 0 || currSum == 1);
|
||||
@ -1473,7 +1473,7 @@ static int new_dumpfile(Char buf[BUF_LEN], int tid, Char* trigger)
|
||||
}
|
||||
|
||||
|
||||
static void close_dumpfile(Char buf[BUF_LEN], int fd, int tid)
|
||||
static void close_dumpfile(int fd)
|
||||
{
|
||||
if (fd <0) return;
|
||||
|
||||
@ -1575,7 +1575,7 @@ static void print_bbccs_of_thread(thread_info* ti)
|
||||
p++;
|
||||
}
|
||||
|
||||
close_dumpfile(print_buf, print_fd, CLG_(current_tid));
|
||||
close_dumpfile(print_fd);
|
||||
if (array) VG_(free)(array);
|
||||
|
||||
/* set counters of last dump */
|
||||
|
||||
@ -855,7 +855,7 @@ extern ThreadId CLG_(current_tid);
|
||||
void CLG_(print_bbno)(void);
|
||||
void CLG_(print_context)(void);
|
||||
void CLG_(print_jcc)(int s, jCC* jcc);
|
||||
void CLG_(print_bbcc)(int s, BBCC* bbcc, Bool);
|
||||
void CLG_(print_bbcc)(int s, BBCC* bbcc);
|
||||
void CLG_(print_bbcc_fn)(BBCC* bbcc);
|
||||
void CLG_(print_execstate)(int s, exec_state* es);
|
||||
void CLG_(print_eventset)(int s, EventSet* es);
|
||||
|
||||
@ -389,10 +389,10 @@ void CLG_(collectBlockInfo)(IRSB* bbIn,
|
||||
}
|
||||
|
||||
static
|
||||
void collectStatementInfo(IRTypeEnv* tyenv, IRSB* bbOut, IRStmt* st,
|
||||
void collectStatementInfo(IRTypeEnv* tyenv, IRStmt* st,
|
||||
Addr* instrAddr, UInt* instrLen,
|
||||
IRExpr** loadAddrExpr, IRExpr** storeAddrExpr,
|
||||
UInt* dataSize, IRType hWordTy)
|
||||
UInt* dataSize)
|
||||
{
|
||||
CLG_ASSERT(isFlatIRStmt(st));
|
||||
|
||||
@ -602,8 +602,8 @@ IRSB* CLG_(instrument)( VgCallbackClosure* closure,
|
||||
i++;
|
||||
stnext = ( i < bbIn->stmts_used ? bbIn->stmts[i] : NULL );
|
||||
beforeIBoundary = !stnext || (Ist_IMark == stnext->tag);
|
||||
collectStatementInfo(bbIn->tyenv, bbOut, st, &instrAddr, &instrLen,
|
||||
&loadAddrExpr, &storeAddrExpr, &dataSize, hWordTy);
|
||||
collectStatementInfo(bbIn->tyenv, st, &instrAddr, &instrLen,
|
||||
&loadAddrExpr, &storeAddrExpr, &dataSize);
|
||||
|
||||
// instrument a simulator call before conditional jumps
|
||||
if (st->tag == Ist_Exit) {
|
||||
|
||||
@ -491,7 +491,7 @@ void prefetch_clear(void)
|
||||
* One stream can be detected per 4k page.
|
||||
*/
|
||||
static __inline__
|
||||
void prefetch_L2_doref(Addr a, UChar size)
|
||||
void prefetch_L2_doref(Addr a)
|
||||
{
|
||||
UInt stream = (a >> PF_PAGEBITS) % PF_STREAMS;
|
||||
UInt block = ( a >> L2.line_size_bits);
|
||||
@ -531,7 +531,7 @@ static
|
||||
CacheModelResult prefetch_I1_ref(Addr a, UChar size)
|
||||
{
|
||||
if ( cachesim_ref( &I1, a, size) == Hit ) return L1_Hit;
|
||||
prefetch_L2_doref(a,size);
|
||||
prefetch_L2_doref(a);
|
||||
if ( cachesim_ref( &L2, a, size) == Hit ) return L2_Hit;
|
||||
return MemAccess;
|
||||
}
|
||||
@ -540,7 +540,7 @@ static
|
||||
CacheModelResult prefetch_D1_ref(Addr a, UChar size)
|
||||
{
|
||||
if ( cachesim_ref( &D1, a, size) == Hit ) return L1_Hit;
|
||||
prefetch_L2_doref(a,size);
|
||||
prefetch_L2_doref(a);
|
||||
if ( cachesim_ref( &L2, a, size) == Hit ) return L2_Hit;
|
||||
return MemAccess;
|
||||
}
|
||||
@ -552,7 +552,7 @@ static
|
||||
CacheModelResult prefetch_I1_Read(Addr a, UChar size)
|
||||
{
|
||||
if ( cachesim_ref( &I1, a, size) == Hit ) return L1_Hit;
|
||||
prefetch_L2_doref(a,size);
|
||||
prefetch_L2_doref(a);
|
||||
switch( cachesim_ref_wb( &L2, Read, a, size) ) {
|
||||
case Hit: return L2_Hit;
|
||||
case Miss: return MemAccess;
|
||||
@ -565,7 +565,7 @@ static
|
||||
CacheModelResult prefetch_D1_Read(Addr a, UChar size)
|
||||
{
|
||||
if ( cachesim_ref( &D1, a, size) == Hit ) return L1_Hit;
|
||||
prefetch_L2_doref(a,size);
|
||||
prefetch_L2_doref(a);
|
||||
switch( cachesim_ref_wb( &L2, Read, a, size) ) {
|
||||
case Hit: return L2_Hit;
|
||||
case Miss: return MemAccess;
|
||||
@ -577,7 +577,7 @@ CacheModelResult prefetch_D1_Read(Addr a, UChar size)
|
||||
static
|
||||
CacheModelResult prefetch_D1_Write(Addr a, UChar size)
|
||||
{
|
||||
prefetch_L2_doref(a,size);
|
||||
prefetch_L2_doref(a);
|
||||
if ( cachesim_ref( &D1, a, size) == Hit ) {
|
||||
/* Even for a L1 hit, the write-trough L1 passes
|
||||
* the write to the L2 to make the L2 line dirty.
|
||||
|
||||
@ -422,7 +422,7 @@ exec_state* exec_state_save(void)
|
||||
CLG_DEBUGIF(1) {
|
||||
CLG_DEBUG(1, " cxtinfo_save(sig %d): collect %s, jmps_passed %d\n",
|
||||
es->sig, es->collect ? "Yes": "No", es->jmps_passed);
|
||||
CLG_(print_bbcc)(-9, es->bbcc, False);
|
||||
CLG_(print_bbcc)(-9, es->bbcc);
|
||||
CLG_(print_cost)(-9, CLG_(sets).full, es->cost);
|
||||
}
|
||||
|
||||
@ -448,7 +448,7 @@ exec_state* exec_state_restore(void)
|
||||
CLG_DEBUGIF(1) {
|
||||
CLG_DEBUG(1, " exec_state_restore(sig %d): collect %s, jmps_passed %d\n",
|
||||
es->sig, es->collect ? "Yes": "No", es->jmps_passed);
|
||||
CLG_(print_bbcc)(-9, es->bbcc, False);
|
||||
CLG_(print_bbcc)(-9, es->bbcc);
|
||||
CLG_(print_cxt)(-9, es->cxt, 0);
|
||||
CLG_(print_cost)(-9, CLG_(sets).full, es->cost);
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user