You can subscribe to this list here.
| 2002 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
(1) |
Oct
(122) |
Nov
(152) |
Dec
(69) |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 2003 |
Jan
(6) |
Feb
(25) |
Mar
(73) |
Apr
(82) |
May
(24) |
Jun
(25) |
Jul
(10) |
Aug
(11) |
Sep
(10) |
Oct
(54) |
Nov
(203) |
Dec
(182) |
| 2004 |
Jan
(307) |
Feb
(305) |
Mar
(430) |
Apr
(312) |
May
(187) |
Jun
(342) |
Jul
(487) |
Aug
(637) |
Sep
(336) |
Oct
(373) |
Nov
(441) |
Dec
(210) |
| 2005 |
Jan
(385) |
Feb
(480) |
Mar
(636) |
Apr
(544) |
May
(679) |
Jun
(625) |
Jul
(810) |
Aug
(838) |
Sep
(634) |
Oct
(521) |
Nov
(965) |
Dec
(543) |
| 2006 |
Jan
(494) |
Feb
(431) |
Mar
(546) |
Apr
(411) |
May
(406) |
Jun
(322) |
Jul
(256) |
Aug
(401) |
Sep
(345) |
Oct
(542) |
Nov
(308) |
Dec
(481) |
| 2007 |
Jan
(427) |
Feb
(326) |
Mar
(367) |
Apr
(255) |
May
(244) |
Jun
(204) |
Jul
(223) |
Aug
(231) |
Sep
(354) |
Oct
(374) |
Nov
(497) |
Dec
(362) |
| 2008 |
Jan
(322) |
Feb
(482) |
Mar
(658) |
Apr
(422) |
May
(476) |
Jun
(396) |
Jul
(455) |
Aug
(267) |
Sep
(280) |
Oct
(253) |
Nov
(232) |
Dec
(304) |
| 2009 |
Jan
(486) |
Feb
(470) |
Mar
(458) |
Apr
(423) |
May
(696) |
Jun
(461) |
Jul
(551) |
Aug
(575) |
Sep
(134) |
Oct
(110) |
Nov
(157) |
Dec
(102) |
| 2010 |
Jan
(226) |
Feb
(86) |
Mar
(147) |
Apr
(117) |
May
(107) |
Jun
(203) |
Jul
(193) |
Aug
(238) |
Sep
(300) |
Oct
(246) |
Nov
(23) |
Dec
(75) |
| 2011 |
Jan
(133) |
Feb
(195) |
Mar
(315) |
Apr
(200) |
May
(267) |
Jun
(293) |
Jul
(353) |
Aug
(237) |
Sep
(278) |
Oct
(611) |
Nov
(274) |
Dec
(260) |
| 2012 |
Jan
(303) |
Feb
(391) |
Mar
(417) |
Apr
(441) |
May
(488) |
Jun
(655) |
Jul
(590) |
Aug
(610) |
Sep
(526) |
Oct
(478) |
Nov
(359) |
Dec
(372) |
| 2013 |
Jan
(467) |
Feb
(226) |
Mar
(391) |
Apr
(281) |
May
(299) |
Jun
(252) |
Jul
(311) |
Aug
(352) |
Sep
(481) |
Oct
(571) |
Nov
(222) |
Dec
(231) |
| 2014 |
Jan
(185) |
Feb
(329) |
Mar
(245) |
Apr
(238) |
May
(281) |
Jun
(399) |
Jul
(382) |
Aug
(500) |
Sep
(579) |
Oct
(435) |
Nov
(487) |
Dec
(256) |
| 2015 |
Jan
(338) |
Feb
(357) |
Mar
(330) |
Apr
(294) |
May
(191) |
Jun
(108) |
Jul
(142) |
Aug
(261) |
Sep
(190) |
Oct
(54) |
Nov
(83) |
Dec
(22) |
| 2016 |
Jan
(49) |
Feb
(89) |
Mar
(33) |
Apr
(50) |
May
(27) |
Jun
(34) |
Jul
(53) |
Aug
(53) |
Sep
(98) |
Oct
(206) |
Nov
(93) |
Dec
(53) |
| 2017 |
Jan
(65) |
Feb
(82) |
Mar
(102) |
Apr
(86) |
May
(187) |
Jun
(67) |
Jul
(23) |
Aug
(93) |
Sep
(65) |
Oct
(45) |
Nov
(35) |
Dec
(17) |
| 2018 |
Jan
(26) |
Feb
(35) |
Mar
(38) |
Apr
(32) |
May
(8) |
Jun
(43) |
Jul
(27) |
Aug
(30) |
Sep
(43) |
Oct
(42) |
Nov
(38) |
Dec
(67) |
| 2019 |
Jan
(32) |
Feb
(37) |
Mar
(53) |
Apr
(64) |
May
(49) |
Jun
(18) |
Jul
(14) |
Aug
(53) |
Sep
(25) |
Oct
(30) |
Nov
(49) |
Dec
(31) |
| 2020 |
Jan
(87) |
Feb
(45) |
Mar
(37) |
Apr
(51) |
May
(99) |
Jun
(36) |
Jul
(11) |
Aug
(14) |
Sep
(20) |
Oct
(24) |
Nov
(40) |
Dec
(23) |
| 2021 |
Jan
(14) |
Feb
(53) |
Mar
(85) |
Apr
(15) |
May
(19) |
Jun
(3) |
Jul
(14) |
Aug
(1) |
Sep
(57) |
Oct
(73) |
Nov
(56) |
Dec
(22) |
| 2022 |
Jan
(3) |
Feb
(22) |
Mar
(6) |
Apr
(55) |
May
(46) |
Jun
(39) |
Jul
(15) |
Aug
(9) |
Sep
(11) |
Oct
(34) |
Nov
(20) |
Dec
(36) |
| 2023 |
Jan
(79) |
Feb
(41) |
Mar
(99) |
Apr
(169) |
May
(48) |
Jun
(16) |
Jul
(16) |
Aug
(57) |
Sep
(19) |
Oct
|
Nov
|
Dec
|
| S | M | T | W | T | F | S |
|---|---|---|---|---|---|---|
|
|
|
|
1
(26) |
2
(35) |
3
(18) |
4
(14) |
|
5
(12) |
6
(13) |
7
(11) |
8
(15) |
9
(8) |
10
(13) |
11
(25) |
|
12
(13) |
13
(24) |
14
(7) |
15
(6) |
16
(8) |
17
(6) |
18
(7) |
|
19
(8) |
20
(7) |
21
(5) |
22
(7) |
23
(6) |
24
(7) |
25
(6) |
|
26
(7) |
27
(7) |
28
(5) |
29
(5) |
30
(5) |
|
|
|
From: Nicholas N. <nj...@ca...> - 2004-09-10 22:55:46
|
CVS commit by nethercote: Whoops, file should be called ".cvsignore", not ".cvgsigore". A .cvsignore 1.1 R .cvgsigore 1.1 |
|
From: Nicholas N. <nj...@ca...> - 2004-09-10 17:42:25
|
CVS commit by nethercote:
Arch-abstraction:
- added x86-linux/core_platform.h
- factored out getting/setting of system call arguments, put it in
platform-specific part.
A x86-linux/core_platform.h 1.1 [GPL (v2+)]
M +3 -1 core.h 1.22
M +9 -8 vg_proxylwp.c 1.21
M +10 -10 vg_scheduler.c 1.178
M +7 -7 vg_signals.c 1.84
M +8 -8 vg_syscalls.c 1.135
M +1 -1 x86/core_arch.h 1.6
M +1 -0 x86-linux/Makefile.am 1.2
--- valgrind/coregrind/core.h #1.21:1.22
@@ -86,5 +86,7 @@
#include "core_asm.h" // asm stuff
#include "tool.h" // tool stuff
-#include "core_arch.h" // arch-specific stuff; eg. x86/arch.h
+#include "core_arch.h" // arch-specific stuff, eg. x86/core_arch.h
+#include "core_platform.h" // platform-specific stuff,
+ // eg. x86-linux/core_platform.h
#include "valgrind.h"
--- valgrind/coregrind/vg_proxylwp.c #1.20:1.21
@@ -431,5 +431,5 @@ void VG_(proxy_handlesig)(const vki_ksig
the proxy and machine state here. */
vg_assert(px->state == PXS_RunSyscall);
- vg_assert(px->tst->arch.m_eax == -VKI_ERESTARTSYS);
+ vg_assert(PLATFORM_SYSCALL_RET(px->tst->arch) == -VKI_ERESTARTSYS);
} else if (sys_after <= eip && eip <= sys_done) {
/* We're after the syscall. Either it was interrupted by the
@@ -440,5 +440,5 @@ void VG_(proxy_handlesig)(const vki_ksig
px->state == PXS_SysDone);
px->state = PXS_SysDone;
- px->tst->arch.m_eax = eax;
+ PLATFORM_SYSCALL_RET(px->tst->arch) = eax;
}
px_printf(" signalled in state %s\n", pxs_name(px->state));
@@ -557,5 +557,5 @@ static Int proxylwp(void *v)
reply.u.syscallno = tst->syscallno;
- tst->arch.m_eax = -VKI_ERESTARTSYS;
+ PLATFORM_SYSCALL_RET(tst->arch) = -VKI_ERESTARTSYS;
px->state = PXS_IntReply;
break;
@@ -727,5 +727,5 @@ static Int proxylwp(void *v)
px_printf("RunSyscall in SigACK: rejecting syscall %d with ERESTARTSYS\n",
reply.u.syscallno);
- tst->arch.m_eax = -VKI_ERESTARTSYS;
+ PLATFORM_SYSCALL_RET(tst->arch) = -VKI_ERESTARTSYS;
} else {
Int syscallno = tst->syscallno;
@@ -734,5 +734,5 @@ static Int proxylwp(void *v)
/* If we're interrupted before we get to the syscall
itself, we want the syscall restarted. */
- tst->arch.m_eax = -VKI_ERESTARTSYS;
+ PLATFORM_SYSCALL_RET(tst->arch) = -VKI_ERESTARTSYS;
/* set our process group ID to match parent */
@@ -1143,5 +1143,6 @@ static void sys_wait_results(Bool block,
if (VG_(clo_trace_syscalls))
VG_(message)(Vg_DebugMsg, "sys_wait_results: got PX_RunSyscall for TID %d: syscall %d result %d",
- res.tid, tst->syscallno, tst->arch.m_eax);
+ res.tid, tst->syscallno,
+ PLATFORM_SYSCALL_RET(tst->arch));
if (tst->status != VgTs_WaitSys)
@@ -1302,6 +1303,6 @@ Int VG_(sys_issue)(int tid)
req.request = PX_RunSyscall;
- tst->syscallno = tst->arch.m_eax;
- tst->arch.m_eax = -VKI_ERESTARTSYS;
+ tst->syscallno = PLATFORM_SYSCALL_NUM(tst->arch);
+ PLATFORM_SYSCALL_RET(tst->arch) = -VKI_ERESTARTSYS;
res = VG_(write)(proxy->topx, &req, sizeof(req));
--- valgrind/coregrind/vg_scheduler.c #1.177:1.178
@@ -468,10 +468,10 @@ void handle_signal_return ( ThreadId tid
if (VG_(threads)[tid].status == VgTs_Sleeping
- && VG_(threads)[tid].arch.m_eax == __NR_nanosleep) {
+ && PLATFORM_SYSCALL_NUM(VG_(threads)[tid].arch) == __NR_nanosleep) {
/* We interrupted a nanosleep(). The right thing to do is to
write the unused time to nanosleep's second param, but that's
too much effort ... we just say that 1 nanosecond was not
used, and return EINTR. */
- rem = (struct vki_timespec *)VG_(threads)[tid].arch.m_ecx; /* arg2 */
+ rem = (struct vki_timespec*)PLATFORM_SYSCALL_ARG2(VG_(threads)[tid].arch);
if (rem != NULL) {
rem->tv_sec = 0;
@@ -527,5 +527,5 @@ void sched_do_syscall ( ThreadId tid )
vg_assert(VG_(threads)[tid].status == VgTs_Runnable);
- syscall_no = VG_(threads)[tid].arch.m_eax; /* syscall number */
+ syscall_no = PLATFORM_SYSCALL_NUM(VG_(threads)[tid].arch);
/* Special-case nanosleep because we can. But should we?
@@ -537,5 +537,5 @@ void sched_do_syscall ( ThreadId tid )
UInt t_now, t_awaken;
struct vki_timespec* req;
- req = (struct vki_timespec*)VG_(threads)[tid].arch.m_ebx; /* arg1 */
+ req = (struct vki_timespec*)PLATFORM_SYSCALL_ARG1(VG_(threads)[tid].arch);
if (req->tv_sec < 0 || req->tv_nsec < 0 || req->tv_nsec >= 1000000000) {
@@ -925,10 +925,10 @@ VgSchedReturnCode do_scheduler ( Int* ex
the unprotected malloc/free system. */
- if (VG_(threads)[tid].arch.m_eax == __NR_exit
- || VG_(threads)[tid].arch.m_eax == __NR_exit_group
+ if (PLATFORM_SYSCALL_NUM(VG_(threads)[tid].arch) == __NR_exit
+ || PLATFORM_SYSCALL_NUM(VG_(threads)[tid].arch) == __NR_exit_group
) {
/* If __NR_exit, remember the supplied argument. */
- *exitcode = VG_(threads)[tid].arch.m_ebx; /* syscall arg1 */
+ *exitcode = PLATFORM_SYSCALL_ARG1(VG_(threads)[tid].arch);
/* Only run __libc_freeres if the tool says it's ok and
@@ -963,11 +963,11 @@ VgSchedReturnCode do_scheduler ( Int* ex
/* We've dealt with __NR_exit at this point. */
- vg_assert(VG_(threads)[tid].arch.m_eax != __NR_exit &&
- VG_(threads)[tid].arch.m_eax != __NR_exit_group);
+ vg_assert(PLATFORM_SYSCALL_NUM(VG_(threads)[tid].arch) != __NR_exit &&
+ PLATFORM_SYSCALL_NUM(VG_(threads)[tid].arch) != __NR_exit_group);
/* Trap syscalls to __NR_sched_yield and just have this
thread yield instead. Not essential, just an
optimisation. */
- if (VG_(threads)[tid].arch.m_eax == __NR_sched_yield) {
+ if (PLATFORM_SYSCALL_NUM(VG_(threads)[tid].arch) == __NR_sched_yield) {
SET_SYSCALL_RETVAL(tid, 0); /* syscall returns with success */
goto stage1; /* find a new thread to run */
--- valgrind/coregrind/vg_signals.c #1.83:1.84
@@ -490,6 +490,6 @@ void VG_(do__NR_sigaltstack) ( ThreadId
vg_assert(VG_(is_valid_tid)(tid));
- ss = (vki_kstack_t*)(VG_(threads)[tid].arch.m_ebx);
- oss = (vki_kstack_t*)(VG_(threads)[tid].arch.m_ecx);
+ ss = (vki_kstack_t*)(PLATFORM_SYSCALL_ARG1(VG_(threads)[tid].arch));
+ oss = (vki_kstack_t*)(PLATFORM_SYSCALL_ARG2(VG_(threads)[tid].arch));
m_esp = VG_(threads)[tid].arch.m_esp;
@@ -543,7 +543,7 @@ void VG_(do__NR_sigaction) ( ThreadId ti
vg_assert(VG_(is_valid_tid)(tid));
- signo = VG_(threads)[tid].arch.m_ebx; /* int sigNo */
- new_act = (vki_ksigaction*)(VG_(threads)[tid].arch.m_ecx);
- old_act = (vki_ksigaction*)(VG_(threads)[tid].arch.m_edx);
+ signo = PLATFORM_SYSCALL_ARG1(VG_(threads)[tid].arch);
+ new_act = (vki_ksigaction*)PLATFORM_SYSCALL_ARG2(VG_(threads)[tid].arch);
+ old_act = (vki_ksigaction*)PLATFORM_SYSCALL_ARG3(VG_(threads)[tid].arch);
if (VG_(clo_trace_signals))
@@ -1868,6 +1868,6 @@ void VG_(deliver_signal) ( ThreadId tid,
if (tst->status == VgTs_WaitSys) {
/* blocked in a syscall; we assume it should be interrupted */
- if (tst->arch.m_eax == -VKI_ERESTARTSYS)
- tst->arch.m_eax = -VKI_EINTR;
+ if (PLATFORM_SYSCALL_RET(tst->arch) == -VKI_ERESTARTSYS)
+ PLATFORM_SYSCALL_RET(tst->arch) = -VKI_EINTR;
}
--- valgrind/coregrind/vg_syscalls.c #1.134:1.135
@@ -1011,12 +1011,12 @@ static Bool fd_allowed(Int fd, const Cha
POST(new) __attribute__((alias(STR(after_##old))))
-#define SYSNO (tst->arch.m_eax) /* in PRE(x) */
-#define res (tst->arch.m_eax) /* in POST(x) */
-#define arg1 (tst->arch.m_ebx)
-#define arg2 (tst->arch.m_ecx)
-#define arg3 (tst->arch.m_edx)
-#define arg4 (tst->arch.m_esi)
-#define arg5 (tst->arch.m_edi)
-#define arg6 (tst->arch.m_ebp)
+#define SYSNO PLATFORM_SYSCALL_NUM(tst->arch) // in PRE(x)
+#define res PLATFORM_SYSCALL_RET(tst->arch) // in POST(x)
+#define arg1 PLATFORM_SYSCALL_ARG1(tst->arch)
+#define arg2 PLATFORM_SYSCALL_ARG2(tst->arch)
+#define arg3 PLATFORM_SYSCALL_ARG3(tst->arch)
+#define arg4 PLATFORM_SYSCALL_ARG4(tst->arch)
+#define arg5 PLATFORM_SYSCALL_ARG5(tst->arch)
+#define arg6 PLATFORM_SYSCALL_ARG6(tst->arch)
PRE(exit_group)
--- valgrind/coregrind/x86/core_arch.h #1.5:1.6
@@ -1,5 +1,5 @@
/*--------------------------------------------------------------------*/
-/*--- Arch-specific stuff for the core. x86/core_arch.h ---*/
+/*--- x86-specific stuff for the core. x86/core_arch.h ---*/
/*--------------------------------------------------------------------*/
--- valgrind/coregrind/x86-linux/Makefile.am #1.1:1.2
@@ -5,3 +5,4 @@
noinst_HEADERS = \
+ core_platform.h \
vki_unistd.h
|
|
From: Nicholas N. <nj...@ca...> - 2004-09-10 16:33:49
|
CVS commit by nethercote:
Arch-abstraction:
- add a new file x86/x86_private.h, a header for the x86-specific stuff that is
not seen by the core.
- move some LDT function decls into x86_private.h.
A x86/x86_private.h 1.1 [GPL (v2+)]
M +0 -5 core.h 1.21
M +2 -1 x86/Makefile.am 1.10
M +1 -0 x86/state.c 1.7
--- valgrind/coregrind/core.h #1.20:1.21
@@ -610,9 +610,4 @@ extern Bool VG_(sk_malloc_called_by_sche
------------------------------------------------------------------ */
-/* Alloc & copy, and dealloc. */
-extern VgLdtEntry* VG_(allocate_LDT_for_thread) ( VgLdtEntry* parent_ldt );
-extern void VG_(deallocate_LDT_for_thread) ( VgLdtEntry* ldt );
-extern void VG_(clear_TLS_for_thread) ( VgLdtEntry* tls );
-
/* Simulate the modify_ldt syscall. */
extern Int VG_(sys_modify_ldt) ( ThreadId tid,
--- valgrind/coregrind/x86/Makefile.am #1.9:1.10
@@ -6,5 +6,6 @@
noinst_HEADERS = \
core_arch.h \
- core_arch_asm.h
+ core_arch_asm.h \
+ x86_private.h
noinst_LIBRARIES = libarch.a
--- valgrind/coregrind/x86/state.c #1.6:1.7
@@ -30,4 +30,5 @@
#include "core.h"
+#include "x86_private.h"
#include <sys/ptrace.h>
|
|
From: Nicholas N. <nj...@ca...> - 2004-09-10 15:37:04
|
CVS commit by nethercote:
Arch-abstraction:
- move some LDT constants into the x86-specific code.
- abstract out uses of LDT and TLS in vg_scheduler into the x86-specific code.
M +8 -5 core.h 1.20
M +8 -0 vg_ldt.c 1.19
M +6 -25 vg_scheduler.c 1.177
M +42 -0 x86/state.c 1.6
--- valgrind/coregrind/core.h #1.19:1.20
@@ -606,9 +606,7 @@ struct vg_mallocfunc_info {
extern Bool VG_(sk_malloc_called_by_scheduler);
-
-/* Maximum number of LDT entries supported (by the x86). */
-#define VG_M_LDT_ENTRIES 8192
-/* The size of each LDT entry == sizeof(VgLdtEntry) */
-#define VG_LDT_ENTRY_SIZE 8
+/* ---------------------------------------------------------------------
+ Exports of vg_ldt.c
+ ------------------------------------------------------------------ */
/* Alloc & copy, and dealloc. */
@@ -1500,4 +1498,9 @@ extern void VGA_(load_state) ( arch_thre
extern void VGA_(save_state) ( arch_thread_t*, ThreadId tid );
+extern void VGA_(clear_thread) ( arch_thread_t * );
+extern void VGA_(init_thread) ( arch_thread_t * );
+extern void VGA_(cleanup_thread) ( arch_thread_t* );
+extern void VGA_(setup_child) ( arch_thread_t*, arch_thread_t* );
+
extern Bool VGA_(setup_pointercheck) ( void );
--- valgrind/coregrind/vg_ldt.c #1.18:1.19
@@ -85,4 +85,12 @@
#include "core.h"
+
+
+/* Maximum number of LDT entries supported (by the x86). */
+#define VG_M_LDT_ENTRIES 8192
+/* The size of each LDT entry == sizeof(VgLdtEntry) */
+#define VG_LDT_ENTRY_SIZE 8
+
+
/* Allocate and deallocate LDTs for threads. */
--- valgrind/coregrind/vg_scheduler.c #1.176:1.177
@@ -357,6 +357,5 @@ void mostly_clear_thread_record ( Thread
{
vg_assert(tid >= 0 && tid < VG_N_THREADS);
- VG_(threads)[tid].arch.ldt = NULL;
- VG_(clear_TLS_for_thread)(VG_(threads)[tid].arch.tls);
+ VGA_(clear_thread)(&VG_(threads)[tid].arch);
VG_(threads)[tid].tid = tid;
VG_(threads)[tid].status = VgTs_Empty;
@@ -423,5 +422,6 @@ void VG_(scheduler_init) ( void )
vg_tid_currently_in_baseBlock = tid_main;
vg_tid_last_in_baseBlock = tid_main;
- VG_(baseBlock)[VGOFF_(tls_ptr)] = (UInt)VG_(threads)[tid_main].arch.tls;
+
+ VGA_(init_thread)(&VG_(threads)[tid_main].arch);
save_thread_state ( tid_main );
@@ -1253,10 +1253,5 @@ void cleanup_after_thread_exited ( Threa
VG_(threads)[tid].stack_size );
- /* Deallocate its LDT, if it ever had one. */
- VG_(deallocate_LDT_for_thread)( VG_(threads)[tid].arch.ldt );
- VG_(threads)[tid].arch.ldt = NULL;
-
- /* Clear its TLS array. */
- VG_(clear_TLS_for_thread)( VG_(threads)[tid].arch.tls );
+ VGA_(cleanup_thread)( &VG_(threads)[tid].arch );
/* Not interested in the timeout anymore */
@@ -1758,20 +1753,6 @@ void do__apply_in_new_thread ( ThreadId
way (via baseBlock). */
load_thread_state(parent_tid);
-
- /* We inherit our parent's LDT. */
- if (VG_(threads)[parent_tid].arch.ldt == NULL) {
- /* We hope this is the common case. */
- VG_(baseBlock)[VGOFF_(ldt)] = 0;
- } else {
- /* No luck .. we have to take a copy of the parent's. */
- VG_(threads)[tid].arch.ldt
- = VG_(allocate_LDT_for_thread)( VG_(threads)[parent_tid].arch.ldt );
- VG_(baseBlock)[VGOFF_(ldt)] = (UInt)VG_(threads)[tid].arch.ldt;
- }
-
- /* Initialise the thread's TLS array */
- VG_(clear_TLS_for_thread)( VG_(threads)[tid].arch.tls );
- VG_(baseBlock)[VGOFF_(tls_ptr)] = (UInt)VG_(threads)[tid].arch.tls;
-
+ VGA_(setup_child)( &VG_(threads)[tid].arch,
+ &VG_(threads)[parent_tid].arch );
save_thread_state(tid);
vg_tid_last_in_baseBlock = tid;
--- valgrind/coregrind/x86/state.c #1.5:1.6
@@ -449,4 +449,46 @@ n",
/*------------------------------------------------------------*/
+/*--- Thread stuff ---*/
+/*------------------------------------------------------------*/
+
+void VGA_(clear_thread)( arch_thread_t *arch )
+{
+ arch->ldt = NULL;
+ VG_(clear_TLS_for_thread)(arch->tls);
+}
+
+void VGA_(init_thread)( arch_thread_t *arch )
+{
+ VG_(baseBlock)[VGOFF_(tls_ptr)] = (UInt)arch->tls;
+}
+
+void VGA_(cleanup_thread) ( arch_thread_t *arch )
+{
+ /* Deallocate its LDT, if it ever had one. */
+ VG_(deallocate_LDT_for_thread)( arch->ldt );
+ arch->ldt = NULL;
+
+ /* Clear its TLS array. */
+ VG_(clear_TLS_for_thread)( arch->tls );
+}
+
+void VGA_(setup_child) ( arch_thread_t *regs, arch_thread_t *parent_regs )
+{
+ /* We inherit our parent's LDT. */
+ if (parent_regs->ldt == NULL) {
+ /* We hope this is the common case. */
+ VG_(baseBlock)[VGOFF_(ldt)] = 0;
+ } else {
+ /* No luck .. we have to take a copy of the parent's. */
+ regs->ldt = VG_(allocate_LDT_for_thread)( parent_regs->ldt );
+ VG_(baseBlock)[VGOFF_(ldt)] = (UInt) regs->ldt;
+ }
+
+ /* Initialise the thread's TLS array */
+ VG_(clear_TLS_for_thread)( regs->tls );
+ VG_(baseBlock)[VGOFF_(tls_ptr)] = (UInt) regs->tls;
+}
+
+/*------------------------------------------------------------*/
/*--- pointercheck ---*/
/*------------------------------------------------------------*/
|
|
From: Nicholas N. <nj...@ca...> - 2004-09-10 14:24:16
|
CVS commit by nethercote:
Arch-abstraction:
- create coregrind/x86-linux/ directory.
- move vg_unistd.h into x86-linux/, because it's platform-dependent. Also
rename it as vki_unistd.h to make clear it's a kernel interface thing.
A coregrind/x86-linux/.cvgsigore 1.1
A coregrind/x86-linux/Makefile.am 1.1
A coregrind/x86-linux/vki_unistd.h 1.1 [GPL (v2+)]
M +1 -0 Makefile.core-AM_CPPFLAGS.am 1.3
M +1 -1 README_MISSING_SYSCALL_OR_IOCTL 1.8
M +1 -0 configure.in 1.125
M +1 -2 coregrind/Makefile.am 1.84
M +1 -1 coregrind/core.h 1.19
M +1 -1 coregrind/vg_cpuid.S 1.4
M +1 -1 coregrind/vg_syscall.S 1.15
M +1 -1 coregrind/vg_unsafe.h 1.35
R coregrind/vg_unistd.h 1.3
--- valgrind/Makefile.core-AM_CPPFLAGS.am #1.2:1.3
@@ -1,4 +1,5 @@
add_includes = -I$(top_builddir)/coregrind -I$(top_srcdir)/coregrind \
-I$(top_srcdir)/coregrind/$(VG_ARCH) \
+ -I$(top_srcdir)/coregrind/$(VG_PLATFORM) \
-I$(top_builddir)/include -I$(top_srcdir)/include \
-I$(top_srcdir)/include/$(VG_ARCH)
--- valgrind/README_MISSING_SYSCALL_OR_IOCTL #1.7:1.8
@@ -97,5 +97,5 @@
This should tell you something like __NR_mysyscallname.
- Copy this entry to coregrind/vg_unistd.h.
+ Copy this entry to coregrind/$(VG_PLATFORM)/vki_unistd.h.
2. Do 'man 2 mysyscallname' to get some idea of what the syscall
--- valgrind/configure.in #1.124:1.125
@@ -398,4 +398,5 @@
coregrind/docs/Makefile
coregrind/x86/Makefile
+ coregrind/x86-linux/Makefile
addrcheck/Makefile
addrcheck/tests/Makefile
--- valgrind/coregrind/Makefile.am #1.83:1.84
@@ -2,5 +2,5 @@
include $(top_srcdir)/Makefile.core-AM_CPPFLAGS.am
-SUBDIRS = $(VG_ARCH) demangle . docs
+SUBDIRS = $(VG_ARCH) $(VG_PLATFORM) demangle . docs
AM_CPPFLAGS += -DVG_LIBDIR="\"$(valdir)"\" -I$(srcdir)/demangle \
@@ -146,5 +146,4 @@
ume_arch.h \
vg_symtab2.h \
- vg_unistd.h \
vg_symtypes.h \
vg_toolint.h \
--- valgrind/coregrind/core.h #1.18:1.19
@@ -82,5 +82,5 @@
/* For system call numbers __NR_... */
-#include "vg_unistd.h"
+#include "vki_unistd.h"
#include "core_asm.h" // asm stuff
--- valgrind/coregrind/vg_cpuid.S #1.3:1.4
@@ -31,5 +31,5 @@
#include "core_asm.h"
-#include "vg_unistd.h"
+#include "vki_unistd.h"
/*
--- valgrind/coregrind/vg_syscall.S #1.14:1.15
@@ -31,5 +31,5 @@
#include "core_asm.h"
-#include "vg_unistd.h"
+#include "vki_unistd.h"
.globl VG_(do_syscall)
--- valgrind/coregrind/vg_unsafe.h #1.34:1.35
@@ -34,5 +34,5 @@
/* These includes are only used for making sense of the args for
system calls. */
-#include "vg_unistd.h" /* for system call numbers */
+#include "vki_unistd.h" /* for system call numbers */
#include <sys/mman.h> /* for PROT_* */
#include <sys/utsname.h> /* for uname */
|
|
From: Nicholas N. <nj...@ca...> - 2004-09-10 13:59:40
|
CVS commit by nethercote:
To get 32-bit programs working on Opteron, VG_(valgrind_end) was recently
changed to name the last byte in Valgrind's section, rather than one past the
last byte. This was because the last byte is 0xffffffff, and so one past gave
0x0, which screwed things up.
However, when this change was made, all the places where VG_(valgrind_end) is
used weren't adjusted appropriately. So this commit makes those adjustments.
It also renames the variable as VG_(valgrind_last), which makes the difference
between it and the other VG_(*_end) variables much clearer.
MERGED FROM HEAD
M +1 -1 vg_include.h 1.235.2.1
M +10 -17 vg_main.c 1.198.2.1
M +10 -10 vg_memory.c 1.66.2.1
M +3 -3 vg_mylibc.c 1.85.2.1
--- valgrind/coregrind/vg_include.h #1.235:1.235.2.1
@@ -1275,5 +1275,5 @@ extern Addr VG_(shadow_base); /* tool's
extern Addr VG_(shadow_end);
extern Addr VG_(valgrind_base); /* valgrind's address range */
-extern Addr VG_(valgrind_end);
+extern Addr VG_(valgrind_last); // Nb: last byte, rather than one past the end
extern vki_rlimit VG_(client_rlimit_data); /* client's original rlimit data */
--- valgrind/coregrind/vg_main.c #1.198:1.198.2.1
@@ -110,9 +110,7 @@ Addr VG_(shadow_end);
Addr VG_(valgrind_base); /* valgrind's address range */
-// VG_(valgrind_end) has a slightly different meaning to all the other
-// VG_(*_end) vars -- ie. it names the last byte, whereas the others
-// go one byte past the end.
-
-Addr VG_(valgrind_end);
+// Note that VG_(valgrind_last) names the last byte of the section, whereas
+// the VG_(*_end) vars name the byte one past the end of the section.
+Addr VG_(valgrind_last);
vki_rlimit VG_(client_rlimit_data);
@@ -438,10 +436,5 @@ static void layout_remaining_space(Addr
VG_(valgrind_base) = (addr_t)&kickstart_base;
-
- // VG_(valgrind_end) has a slightly different meaning to all the other
- // VG_(*_end) vars -- ie. it names the last byte, whereas the others
- // go one byte past the end.
-
- VG_(valgrind_end) = ROUNDUP(argc_addr, 0x10000) - 1; // stack
+ VG_(valgrind_last) = ROUNDUP(argc_addr, 0x10000) - 1; // stack
// This gives the client the largest possible address space while
@@ -469,5 +462,5 @@ static void layout_remaining_space(Addr
"shadow_end %8x (%dMB)\n"
"valgrind_base %8x (%dMB)\n"
- "valgrind_end %8x\n",
+ "valgrind_last %8x\n",
VG_(client_base), SEGSIZE(client_base, client_mapbase),
VG_(client_mapbase), SEGSIZE(client_mapbase, client_end),
@@ -475,6 +468,6 @@ static void layout_remaining_space(Addr
VG_(shadow_base), SEGSIZE(shadow_base, shadow_end),
VG_(shadow_end), SEGSIZE(shadow_end, valgrind_base),
- VG_(valgrind_base), SEGSIZE(valgrind_base, valgrind_end),
- VG_(valgrind_end)
+ VG_(valgrind_base), SEGSIZE(valgrind_base, valgrind_last),
+ VG_(valgrind_last)
);
@@ -2565,5 +2558,5 @@ static void build_valgrind_map_callback
start allocating more memory (note: heap is OK, it's just mmap
which is the problem here). */
- if (start >= VG_(valgrind_base) && (start+size) <= VG_(valgrind_end)) {
+ if (start >= VG_(valgrind_base) && (start+size-1) <= VG_(valgrind_last)) {
flags |= SF_VALGRIND;
VG_(map_file_segment)(start, size, prot, flags, dev, ino, foffset, filename);
@@ -2598,5 +2591,5 @@ static void build_segment_map_callback
flags |= SF_FILE;
- if (start >= VG_(valgrind_base) && (start+size) <= VG_(valgrind_end))
+ if (start >= VG_(valgrind_base) && (start+size-1) <= VG_(valgrind_last))
flags |= SF_VALGRIND;
@@ -2727,5 +2720,5 @@ void VG_(sanity_check_general) ( Bool fo
- -
| valgrind stack ^^^^^^^^^|
- valgrind_end +-------------------------+
+ valgrind_last +-------------------------+
: kernel :
--- valgrind/coregrind/vg_memory.c #1.66:1.66.2.1
@@ -494,5 +494,5 @@ Addr VG_(find_map_space)(Addr addr, UInt
Segment *s;
Addr ret;
- Addr limit = (for_client ? VG_(client_end) : VG_(valgrind_end));
+ Addr limit = (for_client ? VG_(client_end)-1 : VG_(valgrind_last));
if (addr == 0)
@@ -538,5 +538,5 @@ Addr VG_(find_map_space)(Addr addr, UInt
}
- if ((limit - len) < ret)
+ if (((limit - len)+1) < ret)
ret = 0; /* no space */
else
@@ -551,5 +551,5 @@ Addr VG_(find_map_space)(Addr addr, UInt
/* Pad the entire process address space, from VG_(client_base)
- to VG_(valgrind_end) by creating an anonymous and inaccessible
+ to VG_(valgrind_last) by creating an anonymous and inaccessible
mapping over any part of the address space which is not covered
by an entry in the segment list.
@@ -573,5 +573,5 @@ void VG_(pad_address_space)(void)
args[5] = 0;
- while (s && addr < VG_(valgrind_end)) {
+ while (s && addr <= VG_(valgrind_last)) {
if (addr < s->addr) {
args[0] = (UInt)addr;
@@ -585,7 +585,7 @@ void VG_(pad_address_space)(void)
}
- if (addr < VG_(valgrind_end)) {
+ if (addr <= VG_(valgrind_last)) {
args[0] = (UInt)addr;
- args[1] = VG_(valgrind_end) - addr;
+ args[1] = VG_(valgrind_last) - addr + 1;
ret = VG_(do_syscall)(__NR_mmap, (UInt)args);
@@ -603,5 +603,5 @@ void VG_(unpad_address_space)(void)
Int ret;
- while (s && addr < VG_(valgrind_end)) {
+ while (s && addr <= VG_(valgrind_last)) {
if (addr < s->addr) {
ret = VG_(do_syscall)(__NR_munmap, (UInt)addr, s->addr - addr);
@@ -612,6 +612,6 @@ void VG_(unpad_address_space)(void)
}
- if (addr < VG_(valgrind_end)) {
- ret = VG_(do_syscall)(__NR_munmap, (UInt)addr, VG_(valgrind_end) - addr);
+ if (addr <= VG_(valgrind_last)) {
+ ret = VG_(do_syscall)(__NR_munmap, addr, (VG_(valgrind_last) - addr) + 1);
}
@@ -794,5 +794,5 @@ Bool VG_(is_shadow_addr)(Addr a)
Bool VG_(is_valgrind_addr)(Addr a)
{
- return a >= VG_(valgrind_base) && a < VG_(valgrind_end);
+ return a >= VG_(valgrind_base) && a <= VG_(valgrind_last);
}
--- valgrind/coregrind/vg_mylibc.c #1.85:1.85.2.1
@@ -285,5 +285,5 @@ void* VG_(mmap)( void* start, UInt lengt
vg_assert(VG_(client_base) <= res && res+length < VG_(client_end));
} else {
- vg_assert(VG_(valgrind_base) <= res && res+length < VG_(valgrind_end));
+ vg_assert(VG_(valgrind_base) <= res && res+length-1 <= VG_(valgrind_last));
}
@@ -1093,5 +1093,5 @@ static inline ExeContext *get_real_execo
asm("movl %%ebp, %0; movl %%esp, %1" : "=r" (ebp), "=r" (esp));
- stacktop = VG_(valgrind_end);
+ stacktop = VG_(valgrind_last);
VG_(get_sigstack_bounds)( &sigstack_low, &sigstack_high );
if (esp >= sigstack_low && esp < sigstack_high)
@@ -1664,5 +1664,5 @@ void* VG_(get_memory_from_mmap) ( Int nB
if (p != ((void*)(-1))) {
- vg_assert(p >= (void*)VG_(valgrind_base) && p < (void*)VG_(valgrind_end));
+ vg_assert((void*)VG_(valgrind_base) <= p && p <= (void*)VG_(valgrind_last));
tot_alloc += (UInt)nBytes;
if (0)
|
|
From: Brett C. <bc...@tu...> - 2004-09-10 04:33:52
|
Hi valgrind-developers, I've been using valgrind with memcheck to monitor the memory use of my PVM programs. Currently, spawning PVM children under valgrind requires recompiling my PVM code with a debug flag set on pvm_spawn calls. As one would imagine this can be annoying. I'd like to avoid having to recompile code and redistribute it around my cluster every time I wanted to use valgrind. It would be nicer to just be able to run valgrind in the usual manner, perhaps with new flags, such that the parent PVM task will automatically spawn the children as valgrind tasks. I was thinking that writing a skin would be the best way to do this, so I could intercept a pvm_spawn call and alter its arguments. Then I could specify which tool I'd want to use with valgrind on the children being spawned. There seem to be at least three approaches: 1. Develop a PVM skin, say pvmgrind, that can intercept pvm_spawns and spawn them under valgrind using a specified skin. For example: valgrind --tool=pvmgrind --tasktool=memcheck pvm_master <args> pvmgrind would then intercept a pvm_spawn call in pvm_master, spawning children like so: valgrind --tool=memcheck pvm_child <args> 2. PVMize an existing skin, such as memcheck, to pvmmemcheck say, and in this case pvm_spawns too would be intercepted and run under valgrind with the PVMized skin. For example: valgrind --tool=pvmmemcheck pvm_master <args> valgrind would then intercept a pvm_spawn call in any descendant task, including the pvm_master, and spawn the task like so: valgrind --tool=pvmmemcheck pvm_descendant <args> 3. PVMize valgrind itself. The problem with the first alternative is that PVM tasks spawned by a child PVM task do not get intercepted. So one would have to debug tasks according to their generation. The second has the problem that for each existing skin, one would have to produce a corresponding PVMized skin. The third is perhaps a gargantuan undertaking. Plus, this skin could be extended to monitor other PVM functions, like sends and receives etc. Hopefully the above makes sense, so if any one could answer the following I'd be grateful: 0) Which of these alternative seem the most plausible? 1) Does anything that valgrinds PVM already exist? My searches on the valgrind-developers and valgrind-users lists have yielded no results. 2) Would the method I explained be the best way to go about doing this, or am I way off track? 3) If so, how would I go about altering the function arguments? Thanks for your time. -- Brett Carson School of Mathematics, Statistics and Computer Science University of New England, Armidale, NSW 2351 Australia bc...@tu... Phone: +61 2 67732633 Please avoid sending me Word or PowerPoint attachments. See http://www.fsf.org/philosophy/no-word-attachments.html Don't send me emails in HTML, HTML is for web pages. |
|
From: Tom H. <th...@cy...> - 2004-09-10 03:34:57
|
Nightly build on standard ( Red Hat 7.2 ) started at 2004-09-10 02:00:03 BST Checking out source tree ... done Configuring ... done Building ... done Running regression tests ... done Last 20 lines of log.verbose follow int: valgrind ./int map_unmap: valgrind ./map_unmap mq: valgrind ./mq mremap: valgrind ./mremap munmap_exe: valgrind ./munmap_exe pth_blockedsig: valgrind ./pth_blockedsig pushpopseg: valgrind ./pushpopseg rcl_assert: valgrind ./rcl_assert rcrl: valgrind ./rcrl readline1: valgrind ./readline1 resolv: valgrind ./resolv rlimit_nofile: valgrind ./rlimit_nofile seg_override: valgrind ./seg_override sem: valgrind ./sem semlimit: valgrind ./semlimit sha1_test: valgrind ./sha1_test shortpush: valgrind ./shortpush shorts: valgrind ./shorts Could not read `shorts.stderr.exp' make: *** [regtest] Error 2 |
|
From: <js...@ac...> - 2004-09-10 02:55:51
|
Nightly build on phoenix ( SuSE 9.1 ) started at 2004-09-10 03:50:00 BST Checking out source tree ... done Configuring ... done Building ... done Running regression tests ... done Last 20 lines of log.verbose follow sem: valgrind ./sem semlimit: valgrind ./semlimit sha1_test: valgrind ./sha1_test shortpush: valgrind ./shortpush shorts: valgrind ./shorts smc1: valgrind ./smc1 susphello: valgrind ./susphello syscall-restart1: valgrind ./syscall-restart1 syscall-restart2: valgrind ./syscall-restart2 system: valgrind ./system yield: valgrind ./yield -- Finished tests in none/tests ---------------------------------------- == 174 tests, 4 stderr failures, 0 stdout failures ================= corecheck/tests/as_mmap (stderr) corecheck/tests/fdleak_fcntl (stderr) memcheck/tests/writev (stderr) memcheck/tests/zeropage (stderr) make: *** [regtest] Error 1 |
|
From: Tom H. <to...@co...> - 2004-09-10 02:26:44
|
Nightly build on dunsmere ( Fedora Core 2 ) started at 2004-09-10 03:20:01 BST Checking out source tree ... done Configuring ... done Building ... done Running regression tests ... done Last 20 lines of log.verbose follow smc1: valgrind ./smc1 susphello: valgrind ./susphello syscall-restart1: valgrind ./syscall-restart1 syscall-restart2: valgrind ./syscall-restart2 system: valgrind ./system yield: valgrind ./yield -- Finished tests in none/tests ---------------------------------------- == 179 tests, 8 stderr failures, 1 stdout failure ================= corecheck/tests/fdleak_cmsg (stderr) corecheck/tests/fdleak_fcntl (stderr) corecheck/tests/fdleak_ipv4 (stderr) corecheck/tests/fdleak_socketpair (stderr) memcheck/tests/buflen_check (stderr) memcheck/tests/execve (stderr) memcheck/tests/execve2 (stderr) memcheck/tests/writev (stderr) none/tests/exec-sigmask (stdout) make: *** [regtest] Error 1 |
|
From: Tom H. <th...@cy...> - 2004-09-10 02:20:37
|
Nightly build on audi ( Red Hat 9 ) started at 2004-09-10 03:15:05 BST Checking out source tree ... done Configuring ... done Building ... done Running regression tests ... done Last 20 lines of log.verbose follow smc1: valgrind ./smc1 susphello: valgrind ./susphello syscall-restart1: valgrind ./syscall-restart1 syscall-restart2: valgrind ./syscall-restart2 system: valgrind ./system yield: valgrind ./yield -- Finished tests in none/tests ---------------------------------------- == 179 tests, 9 stderr failures, 0 stdout failures ================= corecheck/tests/fdleak_cmsg (stderr) corecheck/tests/fdleak_fcntl (stderr) corecheck/tests/fdleak_ipv4 (stderr) corecheck/tests/fdleak_socketpair (stderr) corecheck/tests/pth_cancel2 (stderr) memcheck/tests/buflen_check (stderr) memcheck/tests/execve (stderr) memcheck/tests/execve2 (stderr) memcheck/tests/writev (stderr) make: *** [regtest] Error 1 |
|
From: Tom H. <th...@cy...> - 2004-09-10 02:13:29
|
Nightly build on ginetta ( Red Hat 8.0 ) started at 2004-09-10 03:10:02 BST Checking out source tree ... done Configuring ... done Building ... done Running regression tests ... done Last 20 lines of log.verbose follow seg_override: valgrind ./seg_override sem: valgrind ./sem semlimit: valgrind ./semlimit sha1_test: valgrind ./sha1_test shortpush: valgrind ./shortpush shorts: valgrind ./shorts smc1: valgrind ./smc1 susphello: valgrind ./susphello syscall-restart1: valgrind ./syscall-restart1 syscall-restart2: valgrind ./syscall-restart2 system: valgrind ./system yield: valgrind ./yield -- Finished tests in none/tests ---------------------------------------- == 179 tests, 3 stderr failures, 0 stdout failures ================= helgrind/tests/race (stderr) helgrind/tests/race2 (stderr) memcheck/tests/writev (stderr) make: *** [regtest] Error 1 |
|
From: Tom H. <th...@cy...> - 2004-09-10 02:08:34
|
Nightly build on alvis ( Red Hat 7.3 ) started at 2004-09-10 03:05:02 BST Checking out source tree ... done Configuring ... done Building ... done Running regression tests ... done Last 20 lines of log.verbose follow -- Finished tests in none/tests ---------------------------------------- == 179 tests, 14 stderr failures, 1 stdout failure ================= addrcheck/tests/toobig-allocs (stderr) helgrind/tests/deadlock (stderr) helgrind/tests/race (stderr) helgrind/tests/race2 (stderr) memcheck/tests/badjump (stderr) memcheck/tests/brk (stderr) memcheck/tests/brk2 (stderr) memcheck/tests/error_counts (stdout) memcheck/tests/mismatches (stderr) memcheck/tests/new_nothrow (stderr) memcheck/tests/new_override (stderr) memcheck/tests/toobig-allocs (stderr) memcheck/tests/writev (stderr) none/tests/coolo_sigaction (stderr) none/tests/gxx304 (stderr) make: *** [regtest] Error 1 |