From: beginner966 <nitin966@gmail.com>
To: systemtap@sourceware.org
Subject: Help required with a script
Date: Mon, 12 Jan 2009 16:49:00 -0000 [thread overview]
Message-ID: <21418350.post@talk.nabble.com> (raw)
Hello,
This is the script which I had written to gather information on migration of
task to other CPU. I also wanted to report the appropriate errors, so I had
used 4 kernel.statement probes. But the problem is that all 4
kernel.statement probes get executed simultaneously, which should not happen
according to the original code. Please help in tracing the problem. Thanks.
Uname -r for the kernel is : 2.6.26.5-rt9
#! /usr/bin/env stap
probe kernel.function("__migrate_task")
{
printf("\n__migrate_task called for process: \npid : %d\nSource CPU
: %d\tDestination CPU : %d",$p->pid,$src_cpu,$dest_cpu);
printf("\nState: %d",task_state(task_current()))
print_stack(backtrace())
}
/*
* 6293: if (unlikely(cpu_is_offline(dest_cpu)))
* 6294: return ret;
*/
probe kernel.statement("*@kernel/sched.c:6294")
{
printf("\nError: Process failed to migrate. Destination CPU
(CPU %d) is offline.\n\n",$dest_cpu);
}
/*
* 6307: if (task_cpu(p) != src_cpu)
* 6308: goto done;
*/
probe kernel.statement("*@kernel/sched.c:6308")
{
printf("\nTask already migrated to CPU %d\n\n",$dest_cpu);
}
/*
* 6310: if (!cpu_isset(dest_cpu, p->cpus_allowed))
* 6311: goto fail;
*/
probe kernel.statement("*@kernel/sched.c:6311")
{
printf("\nError: Process failed to migrate to CPU %d. CPU
affinity of current task has changed.",$dest_cpu);
}
/*
* 6317: set_task_cpu(p, dest_cpu);
*/
probe kernel.statement("*@kernel/sched.c:6317")
{
printf("\nSuccess: Task successfully migrated\n\n");
}
--
View this message in context: http://www.nabble.com/Help-required-with-a-script-tp21418350p21418350.html
Sent from the Sourceware - systemtap mailing list archive at Nabble.com.
next reply other threads:[~2009-01-12 16:49 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-01-12 16:49 beginner966 [this message]
2009-01-12 19:09 ` Frank Ch. Eigler
2009-01-12 19:33 ` beginner966
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=21418350.post@talk.nabble.com \
--to=nitin966@gmail.com \
--cc=systemtap@sourceware.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).