This is the mail archive of the systemtap@sourceware.org mailing list for the systemtap project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

multip register_uprobe


Hi,

I am creating some test scripts based on sarikar's framework.
There is one problem about register multiple times.
.................
probes->vaddr = vaddr;
probes->pid = pid;
probes->handler = handler;
for (i=0; i < 3; i++) {
ret = register_uprobe(probes);
if (ret!=0) //of course, the first time should succeed and will failed in second time, ret = -16
{
I tried several possibilities:
* return ret; //RESULT: the module can't be removed, the probed process will hang, can't be killed/continued
* return 0; //RESULT: same as above
* unregister_uprobe(probes);kfree(probes);break; //RESULT: same as above
* kfree(probes);break; //RESULT: the module can be removed, the probed process will hang, can't be killed/continued
}
}
return 0;
.................


But, no problem in "register once and unregister multiple times".

 Environment:
   kernel: 2.6.21
   utrace: http://people.redhat.com/roland/utrace/2.6.21/
   uprobe: mail by Jim, on 2007/05/26
   All the tests in srikar's testsuite passed in the box.

Any analysis? or need to update utrace/uprobe? Is there any website or cvs to get the resource?

Regards, --
***Wenji Huang
*



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]