]> git.ipfire.org Git - thirdparty/valgrind.git/commitdiff
Callgrind: fix a few 'unused parameter' warnings
authorJosef Weidendorfer <Josef.Weidendorfer@gmx.de>
Tue, 24 Feb 2009 12:26:53 +0000 (12:26 +0000)
committerJosef Weidendorfer <Josef.Weidendorfer@gmx.de>
Tue, 24 Feb 2009 12:26:53 +0000 (12:26 +0000)
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@9251

callgrind/bbcc.c
callgrind/callstack.c
callgrind/debug.c
callgrind/dump.c
callgrind/global.h
callgrind/main.c
callgrind/sim.c
callgrind/threads.c

index 554c1ed57170a6ed1f4061579d581c1a17554cdd..2038f44498c2e017f7460767164d33ee6755b229 100644 (file)
@@ -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",
index d89b53edc9a31e19245ca0de6787efddbf1334be..5686691dadd14c7823ab474ac0d601e73b232eda 100644 (file)
@@ -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() */
index 9a490816f1b36a2f7d7b6308de7b5afc14f614d7..f9f533196b1338a34499cde48ed423810f90d391 100644 (file)
@@ -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) {}
index 44fb276a53cde8ac7dbe31c5e309334730100561..27257019f4ae4b7a34ca411e55f83081694dae24 100644 (file)
@@ -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 */
index 926e85881eec57eeb666fe6e4fb5bed33097cde9..461218a8c4328c601f5b25f4aa1fcc8d0b3cd814 100644 (file)
@@ -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);
index a6d20754c8f1fe46fc2f5a1aab64608a9dab61a0..ed58a491591f97cf8deac6508b7c090576323b58 100644 (file)
@@ -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) {
index 6e9de4896619a83276d8bcf2106a449aa00f93e0..5208a725ee10ae0cc16d9e8925f664e9714cd254 100644 (file)
@@ -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.
index 779fe41b26876a570f978d549ccdea23aeb9a970..02f3a7847cdfb7c01cb369ada167eeda37593d7f 100644 (file)
@@ -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);
   }