From: Arnaldo Carvalho de Melo <acme@infradead.org>
To: Ingo Molnar <mingo@elte.hu>
Cc: linux-kernel@vger.kernel.org,
"Arnaldo Carvalho de Melo" <acme@redhat.com>,
"Frédéric Weisbecker" <fweisbec@gmail.com>,
"Mike Galbraith" <efault@gmx.de>,
"Peter Zijlstra" <a.p.zijlstra@chello.nl>,
"Paul Mackerras" <paulus@samba.org>
Subject: [PATCH 07/10] perf session: Move total_unknown to perf_session->unknown events
Date: Sun, 27 Dec 2009 21:37:03 -0200 [thread overview]
Message-ID: <1261957026-15580-7-git-send-email-acme@infradead.org> (raw)
In-Reply-To: <1261957026-15580-1-git-send-email-acme@infradead.org>
From: Arnaldo Carvalho de Melo <acme@redhat.com>
As this is a session property, not belonging to perf_event_ops, that can
be shared by many perf_session instances.
Cc: Frédéric Weisbecker <fweisbec@gmail.com>
Cc: Mike Galbraith <efault@gmx.de>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Paul Mackerras <paulus@samba.org>
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---
tools/perf/util/session.c | 3 ++-
tools/perf/util/session.h | 2 +-
2 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/tools/perf/util/session.c b/tools/perf/util/session.c
index bc84a52..4ca427f 100644
--- a/tools/perf/util/session.c
+++ b/tools/perf/util/session.c
@@ -66,6 +66,7 @@ struct perf_session *perf_session__new(const char *filename, int mode, bool forc
self->mmap_window = 32;
self->cwd = NULL;
self->cwdlen = 0;
+ self->unknown_events = 0;
map_groups__init(&self->kmaps);
if (perf_session__create_kernel_maps(self) < 0)
@@ -239,7 +240,7 @@ static int perf_session__process_event(struct perf_session *self,
case PERF_RECORD_UNTHROTTLE:
return ops->process_unthrottle_event(event, self);
default:
- ops->total_unknown++;
+ self->unknown_events++;
return -1;
}
}
diff --git a/tools/perf/util/session.h b/tools/perf/util/session.h
index 5771ccb..585937b 100644
--- a/tools/perf/util/session.h
+++ b/tools/perf/util/session.h
@@ -20,6 +20,7 @@ struct perf_session {
struct thread *last_match;
struct events_stats events_stats;
unsigned long event_total[PERF_RECORD_MAX];
+ unsigned long unknown_events;
struct rb_root hists;
u64 sample_type;
int fd;
@@ -40,7 +41,6 @@ struct perf_event_ops {
event_op process_read_event;
event_op process_throttle_event;
event_op process_unthrottle_event;
- unsigned long total_unknown;
bool full_paths;
};
--
1.6.2.5
next prev parent reply other threads:[~2009-12-27 23:37 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-12-27 23:36 [PATCH 01/10] perf record: We should fork only if a program was specified to run Arnaldo Carvalho de Melo
2009-12-27 23:36 ` [PATCH 02/10] perf tools: Add missing header files to LIB_H Makefile variable Arnaldo Carvalho de Melo
2009-12-27 23:36 ` [PATCH 03/10] perf session: Move the event processing routines to session.c Arnaldo Carvalho de Melo
2009-12-27 23:37 ` [PATCH 04/10] perf tools: Move the map class definition to a separate header Arnaldo Carvalho de Melo
2009-12-27 23:37 ` [PATCH 05/10] perf session: Share the common trace sample_check routine as perf_session__has_traces Arnaldo Carvalho de Melo
2009-12-27 23:37 ` [PATCH 06/10] perf session: Remove sample_type_check from event_ops Arnaldo Carvalho de Melo
2009-12-27 23:37 ` Arnaldo Carvalho de Melo [this message]
2009-12-27 23:37 ` [PATCH 08/10] perf session: Move full_paths config to symbol_conf Arnaldo Carvalho de Melo
2009-12-27 23:37 ` [PATCH 09/10] perf session: Remove redundant prefix & suffix from perf_event_ops Arnaldo Carvalho de Melo
2009-12-27 23:37 ` [PATCH 10/10] perf record: Introduce a symtab cache Arnaldo Carvalho de Melo
2009-12-27 23:40 ` Arnaldo Carvalho de Melo
2009-12-28 8:04 ` Ingo Molnar
2009-12-28 8:05 ` [PATCH 01/10] perf record: We should fork only if a program was specified to run 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=1261957026-15580-7-git-send-email-acme@infradead.org \
--to=acme@infradead.org \
--cc=a.p.zijlstra@chello.nl \
--cc=acme@redhat.com \
--cc=efault@gmx.de \
--cc=fweisbec@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=paulus@samba.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®