]> git.ipfire.org Git - thirdparty/valgrind.git/commitdiff
Small fixes/improvements post-cfsi_m improvement
authorPhilippe Waroquiers <philippe.waroquiers@skynet.be>
Sat, 5 Jul 2014 14:07:43 +0000 (14:07 +0000)
committerPhilippe Waroquiers <philippe.waroquiers@skynet.be>
Sat, 5 Jul 2014 14:07:43 +0000 (14:07 +0000)
* Avoid printing the size of a null dedup pool
* Avoid warnings of 2 unused variables on some platforms

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14132

coregrind/m_debuginfo/debuginfo.c
coregrind/m_debuginfo/storage.c

index 8c8332e57260e81d0653d3fc8f359bb57c8b30bb..f4d212b2dcc8eda7f8a1ce05d7df96fdffa1ae9e 100644 (file)
@@ -2621,17 +2621,12 @@ Addr ML_(get_CFA) ( Addr ip, Addr sp, Addr fp,
                     Addr min_accessible, Addr max_accessible )
 {
    CFSI_m_CacheEnt* ce;
-   DebugInfo*    di;
-   DiCfSI_m*     cfsi_m __attribute__((unused));
 
    ce = cfsi_m_cache__find(ip);
 
    if (UNLIKELY(ce == NULL))
       return 0; /* no info.  Nothing we can do. */
 
-   di = ce->di;
-   cfsi_m = ce->cfsi_m;
-
    /* Temporary impedance-matching kludge so that this keeps working
       on x86-linux and amd64-linux. */
 #  if defined(VGA_x86) || defined(VGA_amd64)
@@ -2640,7 +2635,7 @@ Addr ML_(get_CFA) ( Addr ip, Addr sp, Addr fp,
      uregs.xsp = sp;
      uregs.xbp = fp;
      return compute_cfa(&uregs,
-                        min_accessible,  max_accessible, di, cfsi_m);
+                        min_accessible,  max_accessible, ce->di, ce->cfsi_m);
    }
 #elif defined(VGA_s390x)
    { D3UnwindRegs uregs;
@@ -2648,7 +2643,7 @@ Addr ML_(get_CFA) ( Addr ip, Addr sp, Addr fp,
      uregs.sp = sp;
      uregs.fp = fp;
      return compute_cfa(&uregs,
-                        min_accessible,  max_accessible, di, cfsi_m);
+                        min_accessible,  max_accessible, ce->di, ce->cfsi_m);
    }
 #elif defined(VGA_mips32) || defined(VGA_mips64)
    { D3UnwindRegs uregs;
@@ -2656,7 +2651,7 @@ Addr ML_(get_CFA) ( Addr ip, Addr sp, Addr fp,
      uregs.sp = sp;
      uregs.fp = fp;
      return compute_cfa(&uregs,
-                        min_accessible,  max_accessible, di, cfsi_m);
+                        min_accessible,  max_accessible, ce->di, ce->cfsi_m);
    }
 
 #  else
index 1d32ebba6af2b38c8cf2faa5fe004eef57c9d439..9d5f4ac06922aa39278545b2da9d905647b6c07c 100644 (file)
@@ -1995,7 +1995,7 @@ void ML_(canonicaliseCFI) ( struct _DebugInfo* di )
       get_cfsi_rd_stats (di, &n_mergeables, &n_holes);
       VG_(dmsg)("CFSI total %lu mergeables %lu holes %lu uniq cfsi_m %u\n",
                 di->cfsi_used, n_mergeables, n_holes,
-                VG_(sizeDedupPA) (di->cfsi_m_pool));
+                di->cfsi_m_pool ? VG_(sizeDedupPA) (di->cfsi_m_pool) : 0);
    }
 }