This is the mail archive of the
systemtap@sourceware.org
mailing list for the systemtap project.
cpu() in context.stp
- From: Wenji Huang <wenji dot huang at oracle dot com>
- To: systemTAP <systemtap at sources dot redhat dot com>
- Date: Wed, 15 Aug 2007 17:08:47 +0800
- Subject: cpu() in context.stp
Hi,
Because thread_info is renamed to stack since kernel 2.6.22, cpu() and
cpuid() fail in compiling.
So need to update them. Currently inline function task_cpu() could be
a candidate.
If error or objections, please correct me for good committing.
Regards,
Wenji
<http://www.oracle.com/cdc/>
--- src/tapset/context.stp 2007-08-15 04:32:05.000000000 -0400
+++ src.new/tapset/context.stp 2007-08-15 04:30:56.000000000 -0400
@@ -65,11 +65,11 @@ function euid:long () %{ /* pure */
%}
function cpuid:long () %{ /* pure */
- THIS->__retvalue = current->thread_info->cpu;
+ THIS->__retvalue = task_cpu(current);
%}
function cpu:long () %{ /* pure */
- THIS->__retvalue = current->thread_info->cpu; /* smp_processor_id()? */
+ THIS->__retvalue = task_cpu(current);
%}
function print_stack(stk:string) %{