[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <876488zky4.wl%takeuchi_satoru@jp.fujitsu.com>
Date: Sat, 07 Apr 2007 16:45:55 +0900
From: Satoru Takeuchi <takeuchi_satoru@...fujitsu.com>
To: Ingo Molnar <mingo@...e.hu>,
Linux Kernel <linux-kernel@...r.kernel.org>
Cc: Satoru Takeuchi <takeuchi_satoru@...fujitsu.com>
Subject: Re: [BUG] scheduler: first timeslice of the exiting thread
At Sat, 07 Apr 2007 16:31:39 +0900,
Satoru Takeuchi wrote:
> Test programs(attached in the mail):
>
> - satprocess.c: Process model. It creates a child process and wait for it
> several times. Each child process exits immediately.
> - satthread.c: Thread model. It creates a child thread and join it several
> times. Each child thread exits immediately.
> - fork_exit.stp: systemtap script to overlook satprocess/satthread
Oh, I sent a old systemtap script. Correct one is here.
Satoru
/// fork_exit.stp /////////////////////////////////////////////////////////////
/*
* fork_exit.stp - Overlooks sched_fork()/exit_exit() for satprocess/satthread
* and prints some information
*
* Copyright (C) 2007 Satoru Takeuchi <takeuchi_satoru@...fujitsu.com>
*
* This software may be used and distributed according to the terms
* of the GNU General Public License, incorporated herein by reference.
*/
function is_my_testpro(comm)
{
if (comm == "satthread" || comm == "satprocess")
return 1
else
return 0
}
function print_log(name, pid, tgid, ppid, time_slice)
{
printf("%s: pid = %d, tgid = %d, ppid = %d, time_slice = %u\n",
name, pid, tgid, ppid, time_slice);
}
probe kernel.function("sched_fork")
{
if (is_my_testpro(kernel_string($p->comm)))
print_log("fork",
$p->pid, $p->tgid, $p->parent->pid, $p->time_slice);
}
probe kernel.function("sched_exit")
{
if (is_my_testpro(kernel_string($p->comm)))
print_log("exit",
$p->pid, $p->tgid, $p->parent->pid, $p->time_slice);
}
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists