From: Tom Zanussi <tzanussi@gmail.com>
To: linux-kernel@vger.kernel.org
Cc: mingo@elte.hu, fweisbec@gmail.com, rostedt@goodmis.org,
acme@ghostprotocols.net
Subject: [RFC][PATCH 1/2] perf/live: don't synthesize build ids at the end of a live mode trace
Date: Sat, 1 May 2010 01:41:19 -0500 [thread overview]
Message-ID: <1272696080-16435-2-git-send-email-tzanussi@gmail.com> (raw)
In-Reply-To: <1272696080-16435-1-git-send-email-tzanussi@gmail.com>
It doesn't really make sense to record the build ids at the end of a
live mode session - live mode samples need that information during the
trace rather than at the end.
Leave event__synthesize_build_id() in place, however; we'll still be
using that to synthesize build ids in a more timely fashion in a
future patch.
Signed-off-by: Tom Zanussi <tzanussi@gmail.com>
---
tools/perf/builtin-record.c | 7 -----
| 61 -------------------------------------------
| 2 -
3 files changed, 0 insertions(+), 70 deletions(-)
diff --git a/tools/perf/builtin-record.c b/tools/perf/builtin-record.c
index 722b6f1..5d21a3a 100644
--- a/tools/perf/builtin-record.c
+++ b/tools/perf/builtin-record.c
@@ -446,13 +446,6 @@ static void atexit_header(void)
process_buildids();
perf_header__write(&session->header, output, true);
- } else {
- int err;
-
- err = event__synthesize_build_ids(process_synthesized_event,
- session);
- if (err < 0)
- pr_err("Couldn't synthesize build ids.\n");
}
}
--git a/tools/perf/util/header.c b/tools/perf/util/header.c
index fe12276..83b79e2 100644
--- a/tools/perf/util/header.c
+++ b/tools/perf/util/header.c
@@ -1135,67 +1135,6 @@ int event__synthesize_build_id(struct dso *pos, u16 misc,
return err;
}
-static int __event_synthesize_build_ids(struct list_head *head, u16 misc,
- event__handler_t process,
- struct machine *machine,
- struct perf_session *session)
-{
- struct dso *pos;
-
- dsos__for_each_with_build_id(pos, head) {
- int err;
- if (!pos->hit)
- continue;
-
- err = event__synthesize_build_id(pos, misc, process,
- machine, session);
- if (err < 0)
- return err;
- }
-
- return 0;
-}
-
-int event__synthesize_build_ids(event__handler_t process,
- struct perf_session *session)
-{
- int err = 0;
- u16 kmisc, umisc;
- struct machine *pos;
- struct rb_node *nd;
-
- if (!dsos__read_build_ids(&session->header, true))
- return 0;
-
- for (nd = rb_first(&session->machines); nd; nd = rb_next(nd)) {
- pos = rb_entry(nd, struct machine, rb_node);
- if (machine__is_host(pos)) {
- kmisc = PERF_RECORD_MISC_KERNEL;
- umisc = PERF_RECORD_MISC_USER;
- } else {
- kmisc = PERF_RECORD_MISC_GUEST_KERNEL;
- umisc = PERF_RECORD_MISC_GUEST_USER;
- }
-
- err = __event_synthesize_build_ids(&pos->kernel_dsos, kmisc,
- process, pos, session);
- if (err == 0)
- err = __event_synthesize_build_ids(&pos->user_dsos, umisc,
- process, pos, session);
- if (err)
- break;
- }
-
- if (err < 0) {
- pr_debug("failed to synthesize build ids\n");
- return err;
- }
-
- dsos__cache_build_ids(&session->header);
-
- return 0;
-}
-
int event__process_build_id(event_t *self,
struct perf_session *session)
{
--git a/tools/perf/util/header.h b/tools/perf/util/header.h
index f39443d..402ac24 100644
--- a/tools/perf/util/header.h
+++ b/tools/perf/util/header.h
@@ -122,8 +122,6 @@ int event__synthesize_build_id(struct dso *pos, u16 misc,
event__handler_t process,
struct machine *machine,
struct perf_session *session);
-int event__synthesize_build_ids(event__handler_t process,
- struct perf_session *session);
int event__process_build_id(event_t *self, struct perf_session *session);
#endif /* __PERF_HEADER_H */
--
1.6.4.GIT
next prev parent reply other threads:[~2010-05-01 6:41 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-05-01 6:41 [RFC][PATCH 0/2] perf/live buildid Tom Zanussi
2010-05-01 6:41 ` Tom Zanussi [this message]
2010-05-01 6:41 ` [RFC][PATCH 2/2] perf: add perf-inject builtin Tom Zanussi
2010-05-01 21:55 ` Arnaldo Carvalho de Melo
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=1272696080-16435-2-git-send-email-tzanussi@gmail.com \
--to=tzanussi@gmail.com \
--cc=acme@ghostprotocols.net \
--cc=fweisbec@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=rostedt@goodmis.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
Powered by JetHome