]> git.ipfire.org Git - thirdparty/valgrind.git/commitdiff
Track SysRes change.
authorJulian Seward <jseward@acm.org>
Tue, 17 Oct 2006 02:15:17 +0000 (02:15 +0000)
committerJulian Seward <jseward@acm.org>
Tue, 17 Oct 2006 02:15:17 +0000 (02:15 +0000)
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@6294

cachegrind/cg_main.c
callgrind/command.c
callgrind/dump.c
coregrind/m_commandline.c
coregrind/m_coredump/coredump-elf.c
coregrind/m_transtab.c
massif/ms_main.c

index cc1026d2c9a35fc24deeea20aeea5d53c73d1071..e1ccc41e6d9d0c75d43cbbbad34455573bcde5c0 100644 (file)
@@ -1002,7 +1002,7 @@ static void fprint_CC_table_and_calc_totals(void)
          "       ... so simulation results will be missing.");
       return;
    } else {
-      fd = sres.val;
+      fd = sres.res;
    }
 
    // "desc:" lines (giving I1/D1/L2 cache configuration).  The spaces after
@@ -1347,7 +1347,7 @@ static void cg_pre_clo_init(void)
    VG_(details_copyright_author)(
       "Copyright (C) 2002-2006, and GNU GPL'd, by Nicholas Nethercote et al.");
    VG_(details_bug_reports_to)  (VG_BUGS_TO);
-   VG_(details_avg_translation_sizeB) ( 245 );
+   VG_(details_avg_translation_sizeB) ( 500 );
 
    VG_(basic_tool_funcs)          (cg_post_clo_init,
                                    cg_instrument,
index edbd6d5c80e53d49de64610e9f170eac8451e3a5..a71226d490282d38abd707933fad1252e2353192 100644 (file)
@@ -124,7 +124,7 @@ static void setup_control(void)
     }
   }
   if (!res.isError)
-      fd = (Int) res.val;
+      fd = (Int) res.res;
   if (fd>=0) {
     Char buf[512];
     Int i;
@@ -196,7 +196,7 @@ static Int createRes(Int fd)
      * to not confuse it with our special value -2
      */
     if (res.isError) fd = -1;
-    else fd = (Int) res.val;
+    else fd = (Int) res.res;
 
     return fd;
 }
@@ -403,7 +403,7 @@ void CLG_(check_command)()
     
     res = VG_(open)(current_command_file, VKI_O_RDONLY,0);
     if (!res.isError) {
-       fd = (Int) res.val;
+       fd = (Int) res.res;
        bytesRead = VG_(read)(fd,cmdBuffer,500);
        cmdBuffer[500] = 0; /* no command overrun please */
        VG_(close)(fd);
index f9bc6521c3c8bd866b70b04018e8d0b53c9ce71d..476cbdf05508770fc5ba5ca37fd0881b73c50a34 100644 (file)
@@ -1299,7 +1299,7 @@ static int new_dumpfile(Char buf[BUF_LEN], int tid, Char* trigger)
            file_err();
        }
     }
-    fd = (Int) res.val;
+    fd = (Int) res.res;
 
     CLG_DEBUG(2, "  new_dumpfile '%s'\n", filename);
 
@@ -1557,7 +1557,7 @@ static void print_bbccs_of_thread(thread_info* ti)
     
     p++;
   }
-  
+
   close_dumpfile(print_buf, print_fd, CLG_(current_tid));
   if (array) VG_(free)(array);
   
@@ -1608,7 +1608,6 @@ void CLG_(dump_profile)(Char* trigger, Bool only_current_thread)
 
    print_bbccs(trigger, only_current_thread);
 
-
    bbs_done = CLG_(stat).bb_executions++;
 
    if (VG_(clo_verbosity) > 1)
@@ -1723,7 +1722,7 @@ void CLG_(init_dumps)()
            file_err(); 
        }
     }
-    if (!res.isError) VG_(close)( (Int)res.val );
+    if (!res.isError) VG_(close)( (Int)res.res );
 
     init_cmdbuf();
 
index 2d1a83fec5e1d37e9f6490b433ec521fa64cf4a6..335c4e3d1e1d170061777da3413e9bb45956e4c1 100644 (file)
@@ -81,16 +81,16 @@ static HChar* read_dot_valgrindrc ( HChar* dir )
                            ( NULL == dir ? "" : dir ) );
    fd = VG_(open)(filename, 0, VKI_S_IRUSR);
    if ( !fd.isError ) {
-      size = VG_(fsize)(fd.val);
+      size = VG_(fsize)(fd.res);
       if (size > 0) {
          f_clo = VG_(malloc)(size+1);
          vg_assert(f_clo);
-         n = VG_(read)(fd.val, f_clo, size);
+         n = VG_(read)(fd.res, f_clo, size);
          if (n == -1) n = 0;
          vg_assert(n >= 0 && n <= size+1);
          f_clo[n] = '\0';
       }
-      VG_(close)(fd.val);
+      VG_(close)(fd.res);
    }
    return f_clo;
 }
index 87fad6f2f239bcfae8d6941efda74b3e33eff277..54f0fd807fa10384b92c03c3f12110224eda4ac3 100644 (file)
@@ -290,7 +290,7 @@ void make_elf_coredump(ThreadId tid, const vki_siginfo_t *si, UInt max_size)
    Char *coreext = "";
    Int seq = 0;
    Int core_fd;
-   NSegment *seg;
+   NSegment const * seg;
    ESZ(Ehdr) ehdr;
    ESZ(Phdr) *phdrs;
    Int num_phdrs;
@@ -323,11 +323,11 @@ void make_elf_coredump(ThreadId tid, const vki_siginfo_t *si, UInt max_size)
                        VKI_O_CREAT|VKI_O_WRONLY|VKI_O_EXCL|VKI_O_TRUNC, 
                        VKI_S_IRUSR|VKI_S_IWUSR);
       if (!sres.isError) {
-         core_fd = sres.val;
+         core_fd = sres.res;
         break;
       }
 
-      if (sres.isError && sres.val != VKI_EEXIST)
+      if (sres.isError && sres.err != VKI_EEXIST)
         return;                /* can't create file */
    }
 
index b3a4cc3d80e9de980b95aad7bbff557bd8c5b053..8f115a7fa6ce34514ae12cbce8a536fbf5cd223a 100644 (file)
@@ -667,7 +667,7 @@ static void initialiseSector ( Int sno )
                                      8 * tc_sector_szQ );
         /*NOTREACHED*/
       }
-      sec->tc = (ULong*)sres.val;
+      sec->tc = (ULong*)sres.res;
 
       sres = VG_(am_mmap_anon_float_valgrind)
                 ( N_TTES_PER_SECTOR * sizeof(TTEntry) );
@@ -676,7 +676,7 @@ static void initialiseSector ( Int sno )
                                      N_TTES_PER_SECTOR * sizeof(TTEntry) );
         /*NOTREACHED*/
       }
-      sec->tt = (TTEntry*)sres.val;
+      sec->tt = (TTEntry*)sres.res;
 
       for (i = 0; i < N_TTES_PER_SECTOR; i++) {
          sec->tt[i].status   = Empty;
@@ -791,7 +791,9 @@ void VG_(add_to_transtab)( VexGuestExtents* vge,
 
    vg_assert(init_done);
    vg_assert(vge->n_used >= 1 && vge->n_used <= 3);
-   vg_assert(code_len > 0 && code_len < 20000);
+
+   /* 60000: should agree with N_TMPBUF in m_translate.c. */
+   vg_assert(code_len > 0 && code_len < 60000);
 
    if (0)
       VG_(printf)("add_to_transtab(entry = 0x%llx, len = %d)\n",
@@ -1262,7 +1264,7 @@ static void init_unredir_tt_tc ( void )
          VG_(out_of_memory_NORETURN)("init_unredir_tt_tc", N_UNREDIR_TT * UNREDIR_SZB);
          /*NOTREACHED*/
       }
-      unredir_tc = (ULong *)sres.val;
+      unredir_tc = (ULong *)sres.res;
    }
    unredir_tc_used = 0;
    for (i = 0; i < N_UNREDIR_TT; i++)
@@ -1402,7 +1404,7 @@ void VG_(init_tt_tc) ( void )
 
    /* Ensure the calculated value is not way crazy. */
    vg_assert(tc_sector_szQ >= 2 * N_TTES_PER_SECTOR_USABLE);
-   vg_assert(tc_sector_szQ <= 50 * N_TTES_PER_SECTOR_USABLE);
+   vg_assert(tc_sector_szQ <= 80 * N_TTES_PER_SECTOR_USABLE);
 
    /* Initialise the sectors */
    youngest_sector = 0;
index f34f0cb0bff3826162481723c2c370104543533c..5a0f13274df410e7a10e1a80a8f752984ab066aa 100644 (file)
@@ -1288,7 +1288,7 @@ static void write_hp_file(void)
       file_err( hp_file );
       return;
    } else {
-      fd = sres.val;
+      fd = sres.res;
    }
 
    // File header, including command line
@@ -1601,7 +1601,7 @@ write_text_file(ULong total_ST, ULong heap_ST)
       file_err( text_file );
       return;
    } else {
-      fd = sres.val;
+      fd = sres.res;
    }
 
    // Header