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]

[Bug translator/5898] adapt stap -c for user probes


------- Additional Comments From jkenisto at us dot ibm dot com  2008-03-10 18:42 -------
Actually, the target process execs twice: staprun execs /bin/sh, then /bin/sh
execs the target program.  E.g.,
--- target2.stp ---
global targets
probe begin {
	printf("target() = %d\n", target());
	targets[target()] = 1
}
probe process.create {
	if (pid() in targets) {
		printf("%d forks %d\n", pid(), new_pid);
		targets[new_pid] = 1
	}
}
probe process.exec {
	if (pid() in targets)
		printf("%d execs %s\n", pid(), filename)
}
---
$ stap -c /bin/true target2.stp
target() = 6517
6517 execs /bin/sh
6517 execs /bin/true
$

-- 


http://sourceware.org/bugzilla/show_bug.cgi?id=5898

------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.


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