From: Ingo Molnar <mingo@elte.hu>
To: Vegard Nossum <vegard.nossum@gmail.com>
Cc: Andrew Morton <akpm@linux-foundation.org>,
Arjan van de Ven <arjan@infradead.org>,
linux-kernel@vger.kernel.org
Subject: Re: [RESEND][PATCH 1/2] stacktrace: add saved stack traces to backtrace self-test
Date: Mon, 30 Jun 2008 09:01:35 +0200 [thread overview]
Message-ID: <20080630070135.GC9561@elte.hu> (raw)
In-Reply-To: <19f34abd0806271229v6119e6f8ub9fb1b6e231abebf@mail.gmail.com>
* Vegard Nossum <vegard.nossum@gmail.com> wrote:
> On Fri, Jun 27, 2008 at 9:20 PM, Ingo Molnar <mingo@elte.hu> wrote:
> >
> > FYI, it needed the fixlet below.
> >
> > Ingo
> >
>
> Oh. I'm sorry :-(
>
> (I'll admit that I've never worked with modules before. I'll try to
> remember now.)
i too work with bzImages most of the time. They are convenient
single-file objects that are easy to distribute and easy to use, and
they also have no Linux-distribution-flavor dependencies. (module load
order can be influenced by things like /etc/modprobe.conf and other
details - make reproduction harder and testing less conclusive, etc.)
> > ------------->
> > commit 7bcebd2e3ee8435e2ff0f674a409f46961fda3cc
> > Author: Ingo Molnar <mingo@elte.hu>
> > Date: Fri Jun 27 21:20:17 2008 +0200
> >
> > stacktrace: export print_stack_trace and save_stack_trace
> >
> > fix:
> >
> > ERROR: "print_stack_trace" [kernel/backtracetest.ko] undefined!
> > ERROR: "save_stack_trace" [kernel/backtracetest.ko] undefined!
> >
> > Signed-off-by: Ingo Molnar <mingo@elte.hu>
> >
> > Conflicts:
> >
> > Signed-off-by: Ingo Molnar <mingo@elte.hu>
> >
> > diff --git a/arch/x86/kernel/stacktrace.c b/arch/x86/kernel/stacktrace.c
> > index c28c342..b7b483b 100644
> > --- a/arch/x86/kernel/stacktrace.c
> > +++ b/arch/x86/kernel/stacktrace.c
> > @@ -74,10 +74,4 @@ void save_stack_trace(struct stack_trace *trace)
> > if (trace->nr_entries < trace->max_entries)
> > trace->entries[trace->nr_entries++] = ULONG_MAX;
> > }
> > -
> > -void save_stack_trace_tsk(struct task_struct *tsk, struct stack_trace *trace)
> > -{
> > - dump_trace(tsk, NULL, NULL, 0, &save_stack_ops_nosched, trace);
> > - if (trace->nr_entries < trace->max_entries)
> > - trace->entries[trace->nr_entries++] = ULONG_MAX;
> > -}
>
> Why is this removed, though? (It seems unrelated, and that's a useful
> function.)
that was an oversight - thanks - fixed it - updated commit below.
Ingo
---------------->
commit a73d1be0974856741a258928966b8a03ae6bb74f
Author: Ingo Molnar <mingo@elte.hu>
Date: Fri Jun 27 21:20:17 2008 +0200
stacktrace: fix modular build, export print_stack_trace and save_stack_trace
fix:
ERROR: "print_stack_trace" [kernel/backtracetest.ko] undefined!
ERROR: "save_stack_trace" [kernel/backtracetest.ko] undefined!
Signed-off-by: Ingo Molnar <mingo@elte.hu>
and fix:
Building modules, stage 2.
MODPOST 376 modules
ERROR: "print_stack_trace" [kernel/backtracetest.ko] undefined!
make[1]: *** [__modpost] Error 1
Signed-off-by: Ingo Molnar <mingo@elte.hu>
diff --git a/arch/x86/kernel/stacktrace.c b/arch/x86/kernel/stacktrace.c
index c28c342..a03e7f6 100644
--- a/arch/x86/kernel/stacktrace.c
+++ b/arch/x86/kernel/stacktrace.c
@@ -74,6 +74,7 @@ void save_stack_trace(struct stack_trace *trace)
if (trace->nr_entries < trace->max_entries)
trace->entries[trace->nr_entries++] = ULONG_MAX;
}
+EXPORT_SYMBOL_GPL(save_stack_trace);
void save_stack_trace_tsk(struct task_struct *tsk, struct stack_trace *trace)
{
@@ -81,3 +82,4 @@ void save_stack_trace_tsk(struct task_struct *tsk, struct stack_trace *trace)
if (trace->nr_entries < trace->max_entries)
trace->entries[trace->nr_entries++] = ULONG_MAX;
}
+EXPORT_SYMBOL_GPL(save_stack_trace_tsk);
diff --git a/kernel/stacktrace.c b/kernel/stacktrace.c
index 7eaea9d..94b527e 100644
--- a/kernel/stacktrace.c
+++ b/kernel/stacktrace.c
@@ -6,6 +6,7 @@
* Copyright (C) 2006 Red Hat, Inc., Ingo Molnar <mingo@redhat.com>
*/
#include <linux/sched.h>
+#include <linux/module.h>
#include <linux/kallsyms.h>
#include <linux/stacktrace.h>
@@ -21,4 +22,5 @@ void print_stack_trace(struct stack_trace *trace, int spaces)
print_ip_sym(trace->entries[i]);
}
}
+EXPORT_SYMBOL_GPL(print_stack_trace);
prev parent reply other threads:[~2008-06-30 7:02 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-06-27 16:04 [RESEND][PATCH 1/2] stacktrace: add saved stack traces to backtrace self-test Vegard Nossum
2008-06-27 16:08 ` Ingo Molnar
2008-06-27 19:20 ` Ingo Molnar
2008-06-27 19:29 ` Vegard Nossum
2008-06-30 7:01 ` Ingo Molnar [this message]
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=20080630070135.GC9561@elte.hu \
--to=mingo@elte.hu \
--cc=akpm@linux-foundation.org \
--cc=arjan@infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=vegard.nossum@gmail.com \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.