This is the mail archive of the
systemtap@sourceware.org
mailing list for the systemtap project.
jprobe question
- From: "Zhang, Yanmin" <yanmin dot zhang at intel dot com>
- To: <systemtap at sources dot redhat dot com>
- Cc: "Keshavamurthy, Anil S" <anil dot s dot keshavamurthy at intel dot com>, "Mao, Bibo" <bibo dot mao at intel dot com>
- Date: Tue, 29 Nov 2005 11:54:44 +0800
- Subject: jprobe question
Mostly, jprobe handler has parameters. If the parameters are changed in
the jprobe handler, should the original function use the changed values?
For example, function store_online calls cpu_down. If we register a
jprobe at cpu_down, see below function.
int cpu_down_handler(unsigned int cpu)
{
cpu += 1;
return cpu;
}
Assume store_online calls cpu_down with parameter cpu=2, when
cpu_down_handler exits back to original function cpu_down, should
cpu_down use the new parameter value 3(orig_cpu +1) instead of the 2
(the original value)?
My answer is no. Because c compiler might change the parameter values
even though we don't change them in c codes sometimes.
What's your idea?
Yanmin