Take into account TCEntry and alignment overheads when calculating TC
sector sizes.  Also, recalibrate all skins against mozilla-1.0.1.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@1341 a5019735-40e9-0310-863c-91ae7b9d1cf9
diff --git a/addrcheck/ac_main.c b/addrcheck/ac_main.c
index d9e7238..38c5319 100644
--- a/addrcheck/ac_main.c
+++ b/addrcheck/ac_main.c
@@ -1222,7 +1222,7 @@
    VG_(details_copyright_author)(
       "Copyright (C) 2002, and GNU GPL'd, by Julian Seward.");
    VG_(details_bug_reports_to)  ("jseward@acm.org");
-   VG_(details_avg_translation_sizeB) ( 106 );
+   VG_(details_avg_translation_sizeB) ( 135 );
 
    VG_(needs_core_errors)         ();
    VG_(needs_skin_errors)         ();
diff --git a/cachegrind/cg_main.c b/cachegrind/cg_main.c
index f6a12cb..cca46f0 100644
--- a/cachegrind/cg_main.c
+++ b/cachegrind/cg_main.c
@@ -1924,7 +1924,7 @@
    VG_(details_copyright_author)(
       "Copyright (C) 2002, and GNU GPL'd, by Nicholas Nethercote.");
    VG_(details_bug_reports_to)  ("njn25@cam.ac.uk");
-   VG_(details_avg_translation_sizeB) ( 143 );
+   VG_(details_avg_translation_sizeB) ( 155 );
 
    VG_(needs_basic_block_discards)();
    VG_(needs_command_line_options)();
diff --git a/coregrind/vg_transtab.c b/coregrind/vg_transtab.c
index 630e48a..c8f38d7 100644
--- a/coregrind/vg_transtab.c
+++ b/coregrind/vg_transtab.c
@@ -59,7 +59,7 @@
 
 /*------------------ TYPES ------------------*/
 
-#define CODE_ALIGNMENT	16	/* alignment of TCEntries */
+#define CODE_ALIGNMENT	4	/* alignment of TCEntries */
 #define CODE_ALIGN(a)	(((a)+CODE_ALIGNMENT-1) & ~(CODE_ALIGNMENT-1))
 #define IS_ALIGNED(a)	(((a) & (CODE_ALIGNMENT-1)) == 0)
 
@@ -506,7 +506,10 @@
    vg_assert(IS_ALIGNED(nBytes));
 
    tce = (TCEntry*)allocate(nBytes);
-   /* VG_(printf)("allocate returned %p\n", tce); */
+   /*
+   VG_(printf)("allocate returned %p (code start %p)\n", 
+               tce, &tce->payload[0]);
+   */
    vg_assert(vg_tc_current >= 0 && vg_tc_current < VG_TC_N_SECTORS);
 
    tce->orig_addr  = orig_addr;
@@ -631,7 +634,10 @@
    /* Figure out how big each sector should be.  */
    vg_tc_sector_szB 
       = (VG_TT_LIMIT /* max TT entries we expect */
-         * VG_(details).avg_translation_sizeB)
+         * (VG_(details).avg_translation_sizeB 
+            + sizeof(TCEntry)
+            + (CODE_ALIGNMENT/2) /* avg alignment loss */)
+        )
         / VG_TC_N_SECTORS;
    /* Ensure the calculated value is not way crazy. */
    vg_assert(vg_tc_sector_szB >= 200000);
diff --git a/helgrind/hg_main.c b/helgrind/hg_main.c
index 3e9de66..60b5a48 100644
--- a/helgrind/hg_main.c
+++ b/helgrind/hg_main.c
@@ -3077,7 +3077,7 @@
    VG_(details_copyright_author)(
       "Copyright (C) 2002, and GNU GPL'd, by Nicholas Nethercote.");
    VG_(details_bug_reports_to)  ("njn25@cam.ac.uk");
-   VG_(details_avg_translation_sizeB) ( 89 );
+   VG_(details_avg_translation_sizeB) ( 115 );
 
    VG_(needs_core_errors)();
    VG_(needs_skin_errors)();
diff --git a/memcheck/mc_main.c b/memcheck/mc_main.c
index 742cb58..a3c8abd 100644
--- a/memcheck/mc_main.c
+++ b/memcheck/mc_main.c
@@ -1535,7 +1535,7 @@
    VG_(details_copyright_author)(
       "Copyright (C) 2002, and GNU GPL'd, by Julian Seward.");
    VG_(details_bug_reports_to)  ("jseward@acm.org");
-   VG_(details_avg_translation_sizeB) ( 200 );
+   VG_(details_avg_translation_sizeB) ( 228 );
 
    VG_(needs_core_errors)         ();
    VG_(needs_skin_errors)         ();
diff --git a/none/nl_main.c b/none/nl_main.c
index b31fa5a..2f236d6 100644
--- a/none/nl_main.c
+++ b/none/nl_main.c
@@ -40,7 +40,7 @@
    VG_(details_copyright_author)(
       "Copyright (C) 2002, and GNU GPL'd, by Nicholas Nethercote.");
    VG_(details_bug_reports_to)  ("njn25@cam.ac.uk");
-   VG_(details_avg_translation_sizeB) ( 76 );
+   VG_(details_avg_translation_sizeB) ( 100 );
 
    /* No needs, no core events to track */
 }