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]

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) %{

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