libpfm4: perf_event example code for AMD IBS
A message that is not in the archive (sent off-list or not yet received): [email protected]
PATCH 3/3 libpfm4: perf_event example code for AMD IBS
This patch includes an example to use IBS via perf_event. It is for the kernel patches I sent some days ago:
http://lkml.org/lkml/2010/4/13/336
Cc: Ingo Molnar <[email protected]>
Cc: Peter Zijlstra <[email protected]
Cc: [email protected]
LKML-Reference: <[email protected]>
--- include/perfmon/perf_event.h | 3 +- perf_examples/x86/Makefile | 2 +- perf_examples/x86/ibs_smpl.c | 690 ++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 693 insertions(+), 2 deletions(-) create mode 100644 perf_examples/x86/ibs_smpl.c
include/perfmon/perf_event.h +2 -1
@@ -206,7 +206,8 @@ struct perf_event_attr { task : 1, /* trace fork/exit */ watermark : 1, /* wakeup_watermark */ precise : 1, /* OoO invariant counter */ - __reserved_1 : 48; + model_spec : 1, /* model specific hw event */ + __reserved_1 : 47;union {uint32_t wakeup_events;/* wakeup every n events */
perf_examples/x86/Makefile +1 -1
@@ -36,7 +36,7 @@ TARGETS= ifeq ($(SYS),Linux) LPC_UTILS=../perf_util.o -TARGETS += bts_smpl pebs_smpl +TARGETS += bts_smpl pebs_smpl ibs_smpl endif EXAMPLESDIR=$(DOCDIR)/perf_examples/x86
perf_examples/x86/ibs_smpl.c new file +690 -0
690 lines not on this page · raw message
Signature · 1 line
1.7.0.3
PATCH 1/1 libpfm4: perf_event example code for AMD IBS
Quoted 10 lines · Robert Richter
This patch includes an example to use IBS via
perf_event. It is for the kernel patches I sent some days ago:http://lkml.org/lkml/2010/4/13/336
Cc: Ingo Molnar <[email protected]>
Cc: Peter Zijlstra <[email protected]
Cc: [email protected]
LKML-Reference: <[email protected]>Signed-off-by Robert Richter <[email protected]>
For those interested in, see my updated version below for current libpfm4 and my latest perf-ibs patches:
git://perfmon2.git.sourceforge.net/gitroot/perfmon2/libpfm4 master fc4727f Add CONFIG_PFMLIB_NOPYTHON to disable building python directory
git://git.kernel.org/pub/scm/linux/kernel/git/rric/oprofile.git perf-ibs 85a1e6a perf, x86: implement the ibs interrupt handler
-Robert
--
Quoted 1 line
From
7a423ba97a645e0183eec52ddbec9453341ee88fMon Sep 17 00:00:00 2001
From: Robert Richter <[email protected]>
Date: Thu, 15 Apr 2010 13:54:02 +0200
Subject: [PATCH] libpfm4: perf_event example code for AMD IBS
This patch includes an example to use IBS via perf_event. It is for the kernel patches I sent some days ago:
http://lkml.org/lkml/2010/4/13/336
Cc: Ingo Molnar <[email protected]>
Cc: Peter Zijlstra <[email protected]>
Cc: [email protected]
LKML-Reference: <[email protected]>
--- include/perfmon/perf_event.h | 5 +- perf_examples/x86/Makefile | 2 +- perf_examples/x86/ibs_smpl.c | 675 ++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 680 insertions(+), 2 deletions(-) create mode 100644 perf_examples/x86/ibs_smpl.c
include/perfmon/perf_event.h +4 -1
@@ -222,7 +222,10 @@ struct perf_event_attr {uint32_t wakeup_watermark;/* bytes before wakeup */ }SWIG_NAME (wakeup); -uint32_t bp_type; +union { +uint32_t bp_type; +uint32_t raw_type; + };uint64_t bp_addr;uint64_t bp_len; };
perf_examples/x86/Makefile +1 -1
@@ -36,7 +36,7 @@ TARGETS= ifeq ($(SYS),Linux) LPC_UTILS=../perf_util.o -TARGETS += bts_smpl +TARGETS += bts_smpl ibs_smpl endif EXAMPLESDIR=$(DOCDIR)/perf_examples/x86
perf_examples/x86/ibs_smpl.c new file +675 -0
675 lines not on this page · raw message
Signature · 6 lines
1.7.3.1 -- Advanced Micro Devices, Inc. Operating System Research Center
PATCH 3/3 libpfm4: perf_event example code for AMD IBS
In reply to a message not in the archive(resent, fixing cc list)
This patch includes an example to use IBS via perf_event. It is for the kernel patches I sent some days ago:
http://lkml.org/lkml/2010/4/13/336
Cc: Ingo Molnar <[email protected]>
Cc: Peter Zijlstra <[email protected]
Cc: [email protected]
LKML-Reference: <[email protected]>
--- include/perfmon/perf_event.h | 3 +- perf_examples/x86/Makefile | 2 +- perf_examples/x86/ibs_smpl.c | 690 ++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 693 insertions(+), 2 deletions(-) create mode 100644 perf_examples/x86/ibs_smpl.c
include/perfmon/perf_event.h +2 -1
@@ -206,7 +206,8 @@ struct perf_event_attr { task : 1, /* trace fork/exit */ watermark : 1, /* wakeup_watermark */ precise : 1, /* OoO invariant counter */ - __reserved_1 : 48; + model_spec : 1, /* model specific hw event */ + __reserved_1 : 47;union {uint32_t wakeup_events;/* wakeup every n events */
perf_examples/x86/Makefile +1 -1
@@ -36,7 +36,7 @@ TARGETS= ifeq ($(SYS),Linux) LPC_UTILS=../perf_util.o -TARGETS += bts_smpl pebs_smpl +TARGETS += bts_smpl pebs_smpl ibs_smpl endif EXAMPLESDIR=$(DOCDIR)/perf_examples/x86
perf_examples/x86/ibs_smpl.c new file +690 -0
690 lines not on this page · raw message
Signature · 1 line
1.7.0.3