From: Julian Seward Date: Tue, 17 Oct 2006 02:15:17 +0000 (+0000) Subject: Track SysRes change. X-Git-Tag: svn/VALGRIND_3_3_0~582 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=12ef34f623f74f060c4f1561d2d93dd5c7c7ffd2;p=thirdparty%2Fvalgrind.git Track SysRes change. git-svn-id: svn://svn.valgrind.org/valgrind/trunk@6294 --- diff --git a/cachegrind/cg_main.c b/cachegrind/cg_main.c index cc1026d2c9..e1ccc41e6d 100644 --- a/cachegrind/cg_main.c +++ b/cachegrind/cg_main.c @@ -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, diff --git a/callgrind/command.c b/callgrind/command.c index edbd6d5c80..a71226d490 100644 --- a/callgrind/command.c +++ b/callgrind/command.c @@ -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); diff --git a/callgrind/dump.c b/callgrind/dump.c index f9bc6521c3..476cbdf055 100644 --- a/callgrind/dump.c +++ b/callgrind/dump.c @@ -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(); diff --git a/coregrind/m_commandline.c b/coregrind/m_commandline.c index 2d1a83fec5..335c4e3d1e 100644 --- a/coregrind/m_commandline.c +++ b/coregrind/m_commandline.c @@ -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; } diff --git a/coregrind/m_coredump/coredump-elf.c b/coregrind/m_coredump/coredump-elf.c index 87fad6f2f2..54f0fd807f 100644 --- a/coregrind/m_coredump/coredump-elf.c +++ b/coregrind/m_coredump/coredump-elf.c @@ -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 */ } diff --git a/coregrind/m_transtab.c b/coregrind/m_transtab.c index b3a4cc3d80..8f115a7fa6 100644 --- a/coregrind/m_transtab.c +++ b/coregrind/m_transtab.c @@ -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; diff --git a/massif/ms_main.c b/massif/ms_main.c index f34f0cb0bf..5a0f13274d 100644 --- a/massif/ms_main.c +++ b/massif/ms_main.c @@ -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