2009-09-12 11:04:16

by Arjan van de Ven

[permalink] [raw]
Subject: [PATCH 4/8] perf: Add a sample_event type to the event_union

>From 4837fa586ab440d6a79f542b90994c1dde9be8ef Mon Sep 17 00:00:00 2001
From: Arjan van de Ven <[email protected]>
Date: Sat, 12 Sep 2009 07:53:00 +0200
Subject: [PATCH] perf: Add a sample_event type to the event_union

Add a sample_event type to the event_union so that raw samples
can be processed easily.

Signed-off-by: Arjan van de Ven <[email protected]>
---
tools/perf/util/event.h | 7 +++++++
1 files changed, 7 insertions(+), 0 deletions(-)

diff --git a/tools/perf/util/event.h b/tools/perf/util/event.h
index 1545349..33ced5a 100644
--- a/tools/perf/util/event.h
+++ b/tools/perf/util/event.h
@@ -60,6 +60,12 @@ struct read_event {
u64 id;
};

+struct sample_event{
+ struct perf_event_header header;
+ u64 array[];
+};
+
+
typedef union event_union {
struct perf_event_header header;
struct ip_event ip;
@@ -68,6 +74,7 @@ typedef union event_union {
struct fork_event fork;
struct lost_event lost;
struct read_event read;
+ struct sample_event sample;
} event_t;

struct map {
--
1.6.0.6



--
Arjan van de Ven Intel Open Source Technology Centre
For development, discussion and tips for power savings,
visit http://www.lesswatts.org


2009-09-19 09:52:46

by Arjan van de Ven

[permalink] [raw]
Subject: [tip:perfcounters/core] perf: Add a sample_event type to the event_union

Commit-ID: fd39e055c4fefa4553efc9030f9903afdc6ee323
Gitweb: http://git.kernel.org/tip/fd39e055c4fefa4553efc9030f9903afdc6ee323
Author: Arjan van de Ven <[email protected]>
AuthorDate: Sat, 12 Sep 2009 07:53:00 +0200
Committer: Ingo Molnar <[email protected]>
CommitDate: Sat, 19 Sep 2009 11:42:12 +0200

perf: Add a sample_event type to the event_union

Add a sample_event type to the event_union so that raw samples can
be processed easily.

Signed-off-by: Arjan van de Ven <[email protected]>
Acked-by: Peter Zijlstra <[email protected]>
Cc: Paul Mackerras <[email protected]>
Cc: Frederic Weisbecker <[email protected]>
LKML-Reference: <[email protected]>
Signed-off-by: Ingo Molnar <[email protected]>


---
tools/perf/util/event.h | 7 +++++++
1 files changed, 7 insertions(+), 0 deletions(-)

diff --git a/tools/perf/util/event.h b/tools/perf/util/event.h
index 28a579f..018d414 100644
--- a/tools/perf/util/event.h
+++ b/tools/perf/util/event.h
@@ -60,6 +60,12 @@ struct read_event {
u64 id;
};

+struct sample_event{
+ struct perf_event_header header;
+ u64 array[];
+};
+
+
typedef union event_union {
struct perf_event_header header;
struct ip_event ip;
@@ -68,6 +74,7 @@ typedef union event_union {
struct fork_event fork;
struct lost_event lost;
struct read_event read;
+ struct sample_event sample;
} event_t;

struct map {