From: William Cohen <wcohen@redhat.com>
To: Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: [PATCH 29/29] perfcounters: updating kerneltop documentation
Date: Mon, 04 May 2009 11:45:20 -0400 [thread overview]
Message-ID: <49FF0D90.1010107@redhat.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 1181 bytes --]
Hi,
I built the kernel-tip kernel from a git tree checkout successful. I have not
installed the kernel headers on the machine, so __NR_perf_counter_open is not
going to be defined in an installed include file. When I tried to build the the
user-space programs in Documentation/perf_counter:
$ make V=1 -C Documentation/perf_counter/
make: Entering directory
`/home/wcohen/kernel/mingo/linux-2.6/Documentation/perf_counter'
gcc -o builtin-record.o -c -g -O2 -Wall -DSHA1_HEADER='<openssl/sha.h>'
builtin-record.c
In file included from builtin-record.c:35:
perf.h: In function ‘sys_perf_counter_open’:
perf.h:53: error: ‘__NR_perf_counter_open’ undeclared (first use in this function)
perf.h:53: error: (Each undeclared identifier is reported only once
perf.h:53: error: for each function it appears in.)
make: *** [builtin-record.o] Error 1
make: Leaving directory
`/home/wcohen/kernel/mingo/linux-2.6/Documentation/perf_counter'
Is it possible to change the make so that it will compile without having
to install the kernel headers? I ended using the attached hack to make it use
the includes with the kernel. However, there is surely a better way to implement
this.
-Will
[-- Attachment #2: includes.patch --]
[-- Type: text/plain, Size: 524 bytes --]
diff --git a/Documentation/perf_counter/Makefile b/Documentation/perf_counter/Makefile
index 481e4c2..3bc49bc 100644
--- a/Documentation/perf_counter/Makefile
+++ b/Documentation/perf_counter/Makefile
@@ -159,7 +159,7 @@ uname_V := $(shell sh -c 'uname -v 2>/dev/null || echo not')
# CFLAGS and LDFLAGS are for the users to override from the command line.
-CFLAGS = -g -O2 -Wall
+CFLAGS = -g -O2 -Wall -I../../include -I../../arch/x86/include
LDFLAGS = -lpthread -lrt
ALL_CFLAGS = $(CFLAGS)
ALL_LDFLAGS = $(LDFLAGS)
next reply other threads:[~2009-05-04 15:45 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-05-04 15:45 William Cohen [this message]
-- strict thread matches above, loose matches on Subject: below --
2009-04-29 10:46 [PATCH 0/29] x86/perfcounters: x86 and AMD cpu updates Robert Richter
2009-04-29 10:47 ` [PATCH 29/29] perfcounters: updating kerneltop documentation Robert Richter
2009-04-29 11:12 ` 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=49FF0D90.1010107@redhat.com \
--to=wcohen@redhat.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 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.