From: tip-bot for Arnaldo Carvalho de Melo <acme@redhat.com>
To: linux-tip-commits@vger.kernel.org
Cc: linux-kernel@vger.kernel.org, paulus@samba.org, acme@redhat.com,
hpa@zytor.com, mingo@redhat.com, peterz@infradead.org,
efault@gmx.de, fweisbec@gmail.com, tglx@linutronix.de,
mingo@elte.hu
Subject: [tip:perf/core] perf symbols: Pass the offset to perf_header__read_build_ids()
Date: Mon, 16 Nov 2009 21:09:44 GMT [thread overview]
Message-ID: <tip-84fe8488ade7922afa9f3aa77c22d2d92beb9660@git.kernel.org> (raw)
In-Reply-To: <1258396365-29217-1-git-send-email-acme@infradead.org>
Commit-ID: 84fe8488ade7922afa9f3aa77c22d2d92beb9660
Gitweb: http://git.kernel.org/tip/84fe8488ade7922afa9f3aa77c22d2d92beb9660
Author: Arnaldo Carvalho de Melo <acme@redhat.com>
AuthorDate: Mon, 16 Nov 2009 16:32:41 -0200
Committer: Ingo Molnar <mingo@elte.hu>
CommitDate: Mon, 16 Nov 2009 22:05:49 +0100
perf symbols: Pass the offset to perf_header__read_build_ids()
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Mike Galbraith <efault@gmx.de>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Peter Zijlstra <peterz@infradead.org>
LKML-Reference: <1258396365-29217-1-git-send-email-acme@infradead.org>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
---
tools/perf/util/data_map.c | 3 +--
tools/perf/util/data_map.h | 2 +-
| 2 +-
3 files changed, 3 insertions(+), 4 deletions(-)
diff --git a/tools/perf/util/data_map.c b/tools/perf/util/data_map.c
index aacb814..14cb846 100644
--- a/tools/perf/util/data_map.c
+++ b/tools/perf/util/data_map.c
@@ -70,11 +70,10 @@ process_event(event_t *event, unsigned long offset, unsigned long head)
}
}
-int perf_header__read_build_ids(int input, off_t size)
+int perf_header__read_build_ids(int input, off_t offset, off_t size)
{
struct build_id_event bev;
char filename[PATH_MAX];
- off_t offset = lseek(input, 0, SEEK_CUR);
off_t limit = offset + size;
int err = -1;
diff --git a/tools/perf/util/data_map.h b/tools/perf/util/data_map.h
index 20b4037..ae036ec 100644
--- a/tools/perf/util/data_map.h
+++ b/tools/perf/util/data_map.h
@@ -27,6 +27,6 @@ int mmap_dispatch_perf_file(struct perf_header **pheader,
int full_paths,
int *cwdlen,
char **cwd);
-int perf_header__read_build_ids(int input, off_t file_size);
+int perf_header__read_build_ids(int input, off_t offset, off_t file_size);
#endif
--git a/tools/perf/util/header.c b/tools/perf/util/header.c
index ebed4f4..ca0d657 100644
--- a/tools/perf/util/header.c
+++ b/tools/perf/util/header.c
@@ -359,7 +359,7 @@ static void perf_header__adds_read(struct perf_header *self, int fd)
buildid_sec = &feat_sec[idx++];
lseek(fd, buildid_sec->offset, SEEK_SET);
- if (perf_header__read_build_ids(fd, buildid_sec->size))
+ if (perf_header__read_build_ids(fd, buildid_sec->offset, buildid_sec->size))
pr_debug("failed to read buildids, continuing...\n");
}
prev parent reply other threads:[~2009-11-16 21:12 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-11-16 18:32 [PATCH 1/5] perf symbols: pass the offset to perf_header__read_build_ids Arnaldo Carvalho de Melo
2009-11-16 18:32 ` [PATCH 2/5] perf tools: debug.h needs to include event.h for event_t Arnaldo Carvalho de Melo
2009-11-16 18:32 ` [PATCH 3/5] perf tools: Generalize perf_header__adds_read Arnaldo Carvalho de Melo
2009-11-16 18:32 ` [PATCH 4/5] perf tools: Introduce dsos__fprintf_buildid Arnaldo Carvalho de Melo
2009-11-16 18:32 ` [PATCH 5/5] perf buildid-list: New plumbing command Arnaldo Carvalho de Melo
2009-11-16 18:58 ` Frederic Weisbecker
2009-11-16 19:41 ` Arnaldo Carvalho de Melo
2009-11-16 20:58 ` Ingo Molnar
2009-11-16 21:04 ` Arnaldo Carvalho de Melo
2009-11-16 21:07 ` Ingo Molnar
2009-11-16 21:05 ` Peter Zijlstra
2009-11-16 21:02 ` Ingo Molnar
2009-11-16 21:05 ` Arnaldo Carvalho de Melo
2009-11-16 21:06 ` Ingo Molnar
2009-11-16 21:10 ` [tip:perf/core] " tip-bot for Arnaldo Carvalho de Melo
2009-11-16 21:10 ` [tip:perf/core] perf tools: Introduce dsos__fprintf_buildid tip-bot for Arnaldo Carvalho de Melo
2009-11-16 19:02 ` [PATCH 3/5] perf tools: Generalize perf_header__adds_read Frederic Weisbecker
2009-11-16 21:10 ` [tip:perf/core] perf tools: Generalize perf_header__adds_read() tip-bot for Arnaldo Carvalho de Melo
2009-11-16 21:10 ` [tip:perf/core] perf tools: Debug.h needs to include event.h for event_t tip-bot for Arnaldo Carvalho de Melo
2009-11-16 21:09 ` tip-bot for Arnaldo Carvalho de Melo [this message]
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=tip-84fe8488ade7922afa9f3aa77c22d2d92beb9660@git.kernel.org \
--to=acme@redhat.com \
--cc=efault@gmx.de \
--cc=fweisbec@gmail.com \
--cc=hpa@zytor.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-tip-commits@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=mingo@redhat.com \
--cc=paulus@samba.org \
--cc=peterz@infradead.org \
--cc=tglx@linutronix.de \
/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