From: Ingo Molnar <mingo@elte.hu>
To: Jan Beulich <jbeulich@novell.com>
Cc: Andreas Kleen <ak@suse.de>,
linux-kernel@vger.kernel.org, discuss@x86-64.org
Subject: Re: [PATCH 1/3] reliable stack trace support
Date: Tue, 16 May 2006 17:05:55 +0200 [thread overview]
Message-ID: <20060516150555.GB10760@elte.hu> (raw)
In-Reply-To: <4469FC07.76E4.0078.0@novell.com>
* Jan Beulich <jbeulich@novell.com> wrote:
> These are the generic bits needed to enable reliable stack traces
> based on Dwarf2-like (.eh_frame) unwind information. Subsequent
> patches will enable x86-64 and i386 to make use of this.
some more detailed review:
> +#ifdef CONFIG_STACK_UNWIND
> +#include <asm/unwind.h>
> +#else
> +#include <asm-generic/unwind.h>
> +#endif
this wants to become include/linux/unwind.h?
> +#ifdef MODULE_UNWIND_INFO
> +#include <asm/unwind.h>
> +#endif
this too could then include <linux/unwind.h>
> +DEFINE_SPINLOCK(table_lock);
static?
> +static struct unwind_table *
> +find_table(unsigned long pc)
> +{
> + int old_removals;
> + struct unwind_table *table = NULL;
> +
> + do {
> + if (table)
> + atomic_dec(&table->users);
> + old_removals = atomic_read(&removals);
racy? wants to become rcu?
> + spin_lock(&table_lock);
spin_lock_irq?
> + if (init_only && table == last_table) {
> + table->init.pc = 0;
> + table->init.range = 0;
> + return;
> + }
SMP and PREEMPT unsafe.
> + spin_lock(&table_lock);
spin_lock_irq().
> + if (table) {
> + while (atomic_read(&table->users) || atomic_read(&lookups))
> + msleep(1);
> + kfree(table);
> + }
ugh!
> +//todo case DW_CFA_def_cfa_expression:
> +//todo case DW_CFA_expression:
> +//todo case DW_CFA_val_expression:
hm?
> +{
> + info->task = current;
> + arch_unwind_init_running(info, callback, arg);
> + return 0;
newline before the return. (this happens in a couple of other places
too)
Ingo
next prev parent reply other threads:[~2006-05-16 15:05 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-05-16 14:21 Jan Beulich
2006-05-16 14:39 ` Ingo Molnar
2006-05-16 15:22 ` Jan Beulich
2006-05-16 15:25 ` Ingo Molnar
2006-05-16 15:04 ` Andi Kleen
2006-05-18 13:42 ` Jan Beulich
2006-05-18 15:32 ` [discuss] " Andi Kleen
2006-05-16 15:05 ` Ingo Molnar [this message]
2006-05-16 16:01 ` Jan Beulich
2006-05-18 11:16 ` Pavel Machek
2006-05-18 12:04 ` Jan Beulich
2006-05-18 12:14 ` Pavel Machek
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=20060516150555.GB10760@elte.hu \
--to=mingo@elte.hu \
--cc=ak@suse.de \
--cc=discuss@x86-64.org \
--cc=jbeulich@novell.com \
--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®