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]

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


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