My initial thought was to fork the initial process, so as to exploit the copy-on-write fork implementation on Linux.<br><div><br></div><div>Then the forked process will call the function, and the parent will make the dump, by providing the PID of its child.</div><div><br></div><div>How does this sound to you? I don't know if its feasible, I 'll just try to give it a shot!</div><div><br></div><div>I 'll also have a chat about it with my research advisors, and get back to you!</div><div><br></div><div><br></div><div>Cheers,</div><div>Paschalis</div><br><div class="gmail_quote">On Mon Jan 26 2015 at 2:46:01 PM Pavel Emelyanov <<a href="mailto:xemul@parallels.com">xemul@parallels.com</a>> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><br>
> I would be happy to help, but I don't understand what "function-only" capturing means. Can<br>
> <br>
> you describe your scenario in more details?<br>
><br>
><br>
> Currently, I dump a program before the execution of the function daxpy. Then, I can replay<br>
> the program from that point onwards. That replaying is basically like a resuming from that point, and<br>
> I can do it<br>
> as many times as I want, since I have kept in disk some image files.<br>
><br>
<br>
Great! :)<br>
<br>
> So, dump has captured all information needed not only by the "daxpy" functions, but also for the rest of the program.<br>
><br>
><br>
> What I want, is to execute let's say in isolation the function "daxpy". Then on dump,<br>
> I want t<br>
> he contents of the images to be just the<br>
> necessary information that the function<br>
> "<br>
> daxpy<br>
> "<br>
> needs.<br>
> Such information are<br>
> :<br>
> .the parameters of "daxpy"<br>
> .the code of the functions that are being called by the "daxpy"<br>
> .the global variables that are "touched" by "daxpy", or by the functions that are called by "daxpy"<br>
><br>
> With this information, I will NOT be able to resume the program. But, I will be able to replay just the function "daxpy".<br>
<br>
Oh, I see. That would be an interesting feature indeed. But I'm not an expert in compilers<br>
to say whether it's possible at all to find out the part of the in-memory state of a process<br>
that only "relates" to some function :)<br>
<br>
> Once again, thank you very much Pavel for your prompt and really informative replies!<br>
<br>
You're always welcome!<br>
<br>
Thanks,<br>
Pavel<br>
<br>
<br>
</blockquote></div>