mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Peter T. Breuer" <ptb@inv.it.uc3m.es>
To: "linux kernel" <linux-kernel@vger.kernel.org>
Subject: kernel analyser to detect sleep under spinlock
Date: Mon, 8 Nov 2004 00:14:20 +0100 (MET)	[thread overview]
Message-ID: <200411080440.iA84exF32023@inv.it.uc3m.es> (raw)

(corrected url)

 ftp://oboe.it.uc3m.es/pub/Programs/c-1.2.tgz

To use the application, compile and then use "c" in place of
"gcc" on a typical kernel compile line.

This is currently tested only on kernel 2.4 and probably will need some
slight mods to the parser for kernel 2.6 code, as it has to
inverse engineer some of the assembler produced by macros in kernel
headers.

Here's some typical output ...

 % ./c -D__KERNEL__ -DMODULE \
   -I/usr/local/src/linux-2.4.25-xfs/include ../dbr/1/sbull.c
 *************** sleepy functions *******************************
 *       function                line    calls
 *
 * - /usr/local/src/linux-2.4.25-xfs/include/linux/smb_fs_sb.h
 *       smb_lock_server         63      down
 *
 * - /usr/local/src/linux-2.4.25-xfs/include/linux/fs.h
 *       lock_parent             1624    down
 *       double_down             1647    down
 *       triple_down             1668    down
 *       double_lock             1718    double_down
 *
 * - /usr/local/src/linux-2.4.25-xfs/include/linux/locks.h
 *       lock_super              38      down
 *
 * - ../dbr/1/sbull.c
 *       sbull_ioctl             171     interruptible_sleep_on
 *
 * - /usr/local/src/linux-2.4.25-xfs/include/linux/blk.h
 *       sbull_request           358     interruptible_sleep_on
 *
 * - ../dbr/1/sbull.c
 *       sbull_init              431     kmalloc
 *       sbull_init              431     kfree
 *       sbull_cleanup           542     kfree
 *
 ****************************************************************
 *************** sleep_under_spinlock ****************************
 *       function                line    calls
 *
 * - ../dbr/1/sbull.c
 *       sbull_request           420     interruptible_sleep_on
 *
 *
 * *** found 1 instances of sleep under spinlock ***
 *
 ***********************************************

It's GPL/LGPL.

Peter (ptb@inv.it.uc3m.es)


             reply	other threads:[~2004-11-08  4:41 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-11-07 23:14 Peter T. Breuer [this message]
  -- strict thread matches above, loose matches on Subject: below --
2004-11-22 10:06 Peter T. Breuer
2004-11-12 23:45 Peter T. Breuer
2004-11-13 11:09 ` Peter T. Breuer
2004-11-14 15:01   ` Jens Axboe
2004-11-11  4:29 Peter T. Breuer
2004-11-07 23:14 Peter T. Breuer
2004-11-08  1:18 ` Randy.Dunlap
2004-11-08  4:39   ` Peter T. Breuer
2004-11-08  4:43     ` Randy.Dunlap

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=200411080440.iA84exF32023@inv.it.uc3m.es \
    --to=ptb@inv.it.uc3m.es \
    --cc=linux-kernel@vger.kernel.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

all inboxes | Powered by JetHome®