drd_stop_tracing_address_range(arg[1], arg[1] + arg[2]);
break;
+ case VG_USERREQ__DRD_STOP_RECORDING:
+ thread_stop_recording(drd_tid);
+ break;
+
+ case VG_USERREQ__DRD_START_RECORDING:
+ thread_start_recording(drd_tid);
+ break;
+
case VG_USERREQ__SET_PTHREADID:
thread_set_pthreadid(drd_tid, arg[1]);
break;
/* To ask the drd tool to stop tracing accesses to the specified range. */
VG_USERREQ__DRD_STOP_TRACE_ADDR,
/* args: Addr, SizeT. */
+ /* Let the drd tool stop recording memory accesses in the calling thread. */
+ VG_USERREQ__DRD_STOP_RECORDING,
+ /* args: none. */
+ /* Let the drd tool start recording memory accesses in the calling thread. */
+ VG_USERREQ__DRD_START_RECORDING,
+ /* args: none. */
/* Tell the core the pthread_t of the running thread */
VG_USERREQ__SET_PTHREADID,
pthread_t *thread, const pthread_attr_t *attr,
void *(*start) (void *), void *arg)
{
+ int res;
int ret;
OrigFn fn;
VgPosixThreadArgs vgargs;
pthread_cond_init(&vgargs.cond, 0);
pthread_mutex_lock(&vgargs.mutex);
#endif
+ /* Suppress NPTL-specific conflicts between creator and created thread. */
+ VALGRIND_DO_CLIENT_REQUEST(res, -1, VG_USERREQ__DRD_STOP_RECORDING,
+ 0, 0, 0, 0, 0);
CALL_FN_W_WWWW(ret, fn, thread, attr, vg_thread_wrapper, &vgargs);
+ VALGRIND_DO_CLIENT_REQUEST(res, -1, VG_USERREQ__DRD_START_RECORDING,
+ 0, 0, 0, 0, 0);
#if 0
pthread_cond_wait(&vgargs.cond, &vgargs.mutex);
pthread_mutex_unlock(&vgargs.mutex);