diff options
author | weidendo <weidendo@a5019735-40e9-0310-863c-91ae7b9d1cf9> | 2009-02-24 12:26:53 +0000 |
---|---|---|
committer | weidendo <weidendo@a5019735-40e9-0310-863c-91ae7b9d1cf9> | 2009-02-24 12:26:53 +0000 |
commit | 09ee78ec9675201840d895623d49efba1ffe05d8 (patch) | |
tree | 68fc127226da309126994b4af68b2cd50cf7edc1 | |
parent | 1dcee097db02f9ef3ba355162c4373d90d0e895c (diff) |
Callgrind: fix a few 'unused parameter' warnings
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@9251 a5019735-40e9-0310-863c-91ae7b9d1cf9
-rw-r--r-- | callgrind/bbcc.c | 6 | ||||
-rw-r--r-- | callgrind/callstack.c | 8 | ||||
-rw-r--r-- | callgrind/debug.c | 21 | ||||
-rw-r--r-- | callgrind/dump.c | 6 | ||||
-rw-r--r-- | callgrind/global.h | 2 | ||||
-rw-r--r-- | callgrind/main.c | 8 | ||||
-rw-r--r-- | callgrind/sim.c | 12 | ||||
-rw-r--r-- | callgrind/threads.c | 4 |
8 files changed, 30 insertions, 37 deletions
diff --git a/callgrind/bbcc.c b/callgrind/bbcc.c index 554c1ed5..2038f444 100644 --- a/callgrind/bbcc.c +++ b/callgrind/bbcc.c @@ -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", diff --git a/callgrind/callstack.c b/callgrind/callstack.c index d89b53ed..5686691d 100644 --- a/callgrind/callstack.c +++ b/callgrind/callstack.c @@ -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() */ diff --git a/callgrind/debug.c b/callgrind/debug.c index 9a490816..f9f53319 100644 --- a/callgrind/debug.c +++ b/callgrind/debug.c @@ -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) {} diff --git a/callgrind/dump.c b/callgrind/dump.c index 44fb276a..27257019 100644 --- a/callgrind/dump.c +++ b/callgrind/dump.c @@ -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 */ diff --git a/callgrind/global.h b/callgrind/global.h index 926e8588..461218a8 100644 --- a/callgrind/global.h +++ b/callgrind/global.h @@ -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); diff --git a/callgrind/main.c b/callgrind/main.c index a6d20754..ed58a491 100644 --- a/callgrind/main.c +++ b/callgrind/main.c @@ -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) { diff --git a/callgrind/sim.c b/callgrind/sim.c index 6e9de489..5208a725 100644 --- a/callgrind/sim.c +++ b/callgrind/sim.c @@ -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. diff --git a/callgrind/threads.c b/callgrind/threads.c index 779fe41b..02f3a784 100644 --- a/callgrind/threads.c +++ b/callgrind/threads.c @@ -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); } |