mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Keith Owens <kaos@ocs.com.au>
To: Andrea Arcangeli <andrea@suse.de>
Cc: linux-kernel@vger.kernel.org
Subject: Re: module oops tracking [Re: [PATCH] cheap lookup of symbol names on oops()]
Date: Sat, 27 Jul 2002 10:19:31 +1000	[thread overview]
Message-ID: <18391.1027729171@ocs3.intra.ocs.com.au> (raw)
In-Reply-To: Your message of "Sat, 27 Jul 2002 00:37:50 +0200." <20020726223750.GA1151@dualathlon.random>

On Sat, 27 Jul 2002 00:37:50 +0200, 
Andrea Arcangeli <andrea@suse.de> wrote:
>I implemented what I need to track down oopses with modules. ksymoops
>should learn about it too. This will also allow us to recognize
>immediatly the kernel image used.
>+#define MODULE_OOPS_TRACKING_NR_LONGS 10
>+#define MODULE_OOPS_TRACKING_NR_BITS (BITS_PER_LONG * MODULE_OOPS_TRACKING_NR_LONGS)
>+static unsigned long module_oops_tracking[MODULE_OOPS_TRACKING_NR_LONGS];
>+void module_oops_tracking_mark(int nr)
>+{
>+	if (nr < MODULE_OOPS_TRACKING_NR_BITS)
>+		set_bit(nr, module_oops_tracking);
>+}
>+
>+static void __module_oops_tracking_print(int nr)
>+{
>+	struct module *mod;
>+
>+	for (mod = module_list; mod != &kernel_module; mod = mod->next) {
>+		if (!nr--)
>+			printk("	[(%s:<%p>:<%p>)]\n",
>+			       mod->name,
>+			       (char *) mod + mod->size_of_struct,
>+			       (char *) mod + mod->size);
>+	}
>+	
>+}

Instead of adding a separate bit map and scanning the module chain to
convert a bit number to a module entry, add a new entry to mod->flags.

  #define MOD_OOPS_PRINTED 128

That simplifies the code and reduces the number of times you have to
scan the module list.

Beware if Rusty's idea of discarding init code/data from modules ever
takes off.  Then the text will not be contiguous, nor will it be at the
start of the module.


  parent reply	other threads:[~2002-07-27  0:16 UTC|newest]

Thread overview: 38+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-07-25 17:00 [PATCH] cheap lookup of symbol names on oops() Cort Dougan
2002-07-25 17:11 ` Christoph Hellwig
2002-07-25 17:21   ` Cort Dougan
2002-07-25 18:49     ` Benjamin LaHaise
2002-07-25 20:16       ` Cort Dougan
2002-07-25 19:04     ` Andrea Arcangeli
2002-07-25 20:27       ` Cort Dougan
2002-07-25 20:59         ` Andrea Arcangeli
2002-07-25 21:05           ` Cort Dougan
2002-07-25 22:06             ` Andrea Arcangeli
2002-07-25 22:05               ` Cort Dougan
2002-07-25 22:56                 ` Andrea Arcangeli
2002-07-25 23:01                   ` Cort Dougan
2002-07-26 22:37                     ` module oops tracking [Re: [PATCH] cheap lookup of symbol names on oops()] Andrea Arcangeli
2002-07-26 22:55                       ` Cort Dougan
2002-07-26 23:28                         ` Andrea Arcangeli
2002-07-26 23:31                           ` Cort Dougan
2002-07-27  0:10                             ` Andrea Arcangeli
2002-07-27  2:15                               ` cort
2002-07-27  0:19                       ` Keith Owens [this message]
2002-07-27  0:31                         ` Andrea Arcangeli
2002-07-27  1:19                           ` Andrea Arcangeli
2002-07-27  1:33                             ` Keith Owens
2002-07-27  1:47                               ` Andrea Arcangeli
2002-07-25 21:12           ` [PATCH] cheap lookup of symbol names on oops() Lars Marowsky-Bree
2002-07-25 22:13             ` Andrea Arcangeli
2002-07-25 22:41           ` Rik van Riel
2002-07-25 23:01             ` Andrea Arcangeli
2002-07-26  7:57             ` Lars Marowsky-Bree
     [not found]           ` <Pine.LNX.4.44L.0207251941120.3086-100000@imladris.surriel. com>
2002-07-27  2:34             ` Stevie O
2002-07-25 22:39         ` Rik van Riel
2002-07-26  1:01   ` Marcin Dalecki
2002-07-25 22:46 ` Alan Cox
2002-07-25 21:44   ` Cort Dougan
2002-07-25 22:18     ` Russell King
2002-07-25 22:23       ` Cort Dougan
2002-07-25 22:44   ` Rik van Riel
2003-10-13 21:09 module oops tracking [Re: [PATCH] cheap lookup of symbol names on oops()] Dan Kegel

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=18391.1027729171@ocs3.intra.ocs.com.au \
    --to=kaos@ocs.com.au \
    --cc=andrea@suse.de \
    --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®