|
From: Shahriyar A. <sm...@co...> - 2007-11-07 00:19:06
|
Shahriyar Amini wrote: > Nicholas Nethercote wrote: > >> On Sat, 27 Oct 2007, Shahriyar Amini wrote: >> >> >>> Is it possible to have on demand instrumentation through Valgrind? What >>> I am looking for is to be able to turn on Valgrind while in middle of a >>> process, or start the process on Valgrind, but only start instrumenting >>> on some external input to Valgrind. >>> >> You cannot start the program natively and then attach Valgrind. Tools >> can be written so that they do no instrumentation to begin with (which >> results in a typical 4--5x slowdown) and then start instrumenting code >> on some kind of external event. The Callgrind tool allows this, but >> no others currently do. >> >> Nick >> > Hi, > > How does Callgrind support instrumentation on external input? What is > this current external input? I am looking at the pre_syscall and > post_syscall handlers for Callgrind, but did not find anything specific. > > Thanks, > Shahriyar > > ------------------------------------------------------------------------- > This SF.net email is sponsored by: Splunk Inc. > Still grepping through log files to find problems? Stop. > Now Search log events and configuration files using AJAX and a browser. > Download your FREE copy of Splunk now >> http://get.splunk.com/ > _______________________________________________ > Valgrind-users mailing list > Val...@li... > https://lists.sourceforge.net/lists/listinfo/valgrind-users > I believe I found the answer to my question. The external input is handled as a client request: case VG_USERREQ__START_INSTRUMENTATION: CLG_(set_instrument_state)("Client Request", True); *ret = 0; /* meaningless */ break; case VG_USERREQ__STOP_INSTRUMENTATION: CLG_(set_instrument_state)("Client Request", False); *ret = 0; /* meaningless */ break; which then sets the instrumentation state. Thanks, Shahriyar |