public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH 29/29] perfcounters: updating kerneltop documentation
@ 2009-05-04 15:45 William Cohen
  0 siblings, 0 replies; 3+ messages in thread
From: William Cohen @ 2009-05-04 15:45 UTC (permalink / raw)
  To: Linux Kernel Mailing List

[-- 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)

^ permalink raw reply related	[flat|nested] 3+ messages in thread
* [PATCH 0/29] x86/perfcounters: x86 and AMD cpu updates
@ 2009-04-29 10:46 Robert Richter
  2009-04-29 10:47 ` [PATCH 29/29] perfcounters: updating kerneltop documentation Robert Richter
  0 siblings, 1 reply; 3+ messages in thread
From: Robert Richter @ 2009-04-29 10:46 UTC (permalink / raw)
  To: Peter Zijlstra; +Cc: Paul Mackerras, Ingo Molnar, LKML

This patch series updates the perfcounters implementation mainly for
the x86 architecture.

Also, it introduces a data structure (struct pmu) describing a generic
performance monitoring unit (pmu). This structure is a replacement for
struct hw_perf_counter_ops. Similiar, I introduced struct x86_pmu for
the x86 architecture (as a replacement for struct pmc_x86_ops).

There are patches for x86 with some fixes and cleanups, a change in
the model specific split and a complete rework of AMD pmu code. The
result is simplified model specific code and more generalized and
unified code. Features that are only supported by AMD or Intel are now
implemented in vendor specific functions.

The AMD pmu differs to Intel, especially there is no status register
and also there are no fixed counters. This makes a separate interrupt
handler for AMD cpus necessary. Also, a global disable/enable of the
performance counters (e.g. to avoid NMIs to protect the modification
of a list) is expensive on AMD cpus leading to up to 4 msr
reads/writes per counter. There is still some more work to do here to
avoid this.

This patch series bases on the tip/percounters/core branch.

I developed this patches based on 03ced43 and later rebased to
1b88991. The latest tip/percounters/core branch seems to be broken, no
nmis are delivered, only perfcounter interrupts with no results on
kerneltop. I am still debugging this. However, I could test
successfully the patch series based on 03ced43 and want to release the
patches anyway.

-Robert




^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2009-05-04 15:45 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-05-04 15:45 [PATCH 29/29] perfcounters: updating kerneltop documentation William Cohen
  -- 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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox