public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: "Pallipadi, Venkatesh" <venkatesh.pallipadi@intel.com>
To: Ingo Molnar <mingo@elte.hu>, Markus Metzger <markus.t.metzger@intel.com>
Cc: linux-kernel <linux-kernel@vger.kernel.org>,
	Thomas Gleixner <tglx@linutronix.de>,
	"H. Peter Anvin" <hpa@zytor.com>
Subject: tip: Build failure with !CONFIG_TRACE - undefined reference to `trace_clock_global'
Date: Thu, 9 Apr 2009 10:36:40 -0700	[thread overview]
Message-ID: <20090409173640.GA8211@linux-os.sc.intel.com> (raw)


With tip (commit - 58e70a841b20d5d80aebdd8274ab60c0c933470f) I get a build
error when CONFIG_TRACE is not set. 

arch/x86/kernel/built-in.o: In function `ds_switch_to':
(.text+0x86ee): undefined reference to `trace_clock_global'
arch/x86/kernel/built-in.o: In function `ds_switch_to':
(.text+0x8743): undefined reference to `trace_clock_global'
make[1]: *** [.tmp_vmlinux1] Error 1
make: *** [sub-make] Error 2

Looks like it is coming from the change
commit 15879d042164650b93d83281ad5f87ad323bfbfe
Author: Markus Metzger <markus.t.metzger@intel.com>
Date:   Fri Apr 3 16:43:38 2009 +0200

    x86, bts: use trace_clock_global() for timestamps


Below is a dumb patch that gets rid of the build error. Not sure whether
this is the right fix.

Signed-off-by: Venkatesh Pallipadi <venkatesh.pallipadi@intel.com>

diff --git a/arch/x86/kernel/ds.c b/arch/x86/kernel/ds.c
index 48bfe13..62b4b55 100644
--- a/arch/x86/kernel/ds.c
+++ b/arch/x86/kernel/ds.c
@@ -1377,7 +1377,9 @@ static inline void ds_take_timestamp(struct ds_context *context,
 
 	memset(&ts, 0, sizeof(ts));
 	ts.qualifier		= qualifier;
+#ifdef CONFIG_TRACING
 	ts.variant.event.clock	= trace_clock_global();
+#endif
 	ts.variant.event.pid	= task->pid;
 
 	bts_write(tracer, &ts);

             reply	other threads:[~2009-04-09 17:36 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-04-09 17:36 Pallipadi, Venkatesh [this message]
2009-04-10 12:16 ` tip: Build failure with !CONFIG_TRACE - undefined reference to `trace_clock_global' Ingo Molnar
2009-04-10 17:13   ` Pallipadi, Venkatesh
2009-04-14 11:56     ` Ingo Molnar

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=20090409173640.GA8211@linux-os.sc.intel.com \
    --to=venkatesh.pallipadi@intel.com \
    --cc=hpa@zytor.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=markus.t.metzger@intel.com \
    --cc=mingo@elte.hu \
    --cc=tglx@linutronix.de \
    /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