aboutsummaryrefslogtreecommitdiffstats
path: root/tools/perf/builtin-record.c
diff options
context:
space:
mode:
authorNamhyung Kim <namhyung@kernel.org>2015-01-29 03:06:43 -0500
committerArnaldo Carvalho de Melo <acme@redhat.com>2015-01-29 14:36:32 -0500
commit4ac30cf74b308fb01338e660d3471cd490a7958a (patch)
treeac57740782b921747bb474bf93654c36fac356af /tools/perf/builtin-record.c
parentf1f13af99a903ae873f5373e965508e0486c1c29 (diff)
perf tools: Do not use __perf_session__process_events() directly
It's only used for perf record to process build-id because its file size it's not fixed at this time due to remaining header features. However data offset and size is available so that we can use the perf_session__process_events() once we set the file size as the current offset like for now. Signed-off-by: Namhyung Kim <namhyung@kernel.org> Cc: Adrian Hunter <adrian.hunter@intel.com> Cc: Andi Kleen <andi@firstfloor.org> Cc: David Ahern <dsahern@gmail.com> Cc: Frederic Weisbecker <fweisbec@gmail.com> Cc: Jiri Olsa <jolsa@redhat.com> Cc: Peter Zijlstra <a.p.zijlstra@chello.nl> Cc: Stephane Eranian <eranian@google.com> Link: http://lkml.kernel.org/r/1422518843-25818-3-git-send-email-namhyung@kernel.org Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/perf/builtin-record.c')
-rw-r--r--tools/perf/builtin-record.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/tools/perf/builtin-record.c b/tools/perf/builtin-record.c
index 8648c6d3003d..1134de22979e 100644
--- a/tools/perf/builtin-record.c
+++ b/tools/perf/builtin-record.c
@@ -194,12 +194,13 @@ static int process_buildids(struct record *rec)
194{ 194{
195 struct perf_data_file *file = &rec->file; 195 struct perf_data_file *file = &rec->file;
196 struct perf_session *session = rec->session; 196 struct perf_session *session = rec->session;
197 u64 start = session->header.data_offset;
198 197
199 u64 size = lseek(file->fd, 0, SEEK_CUR); 198 u64 size = lseek(file->fd, 0, SEEK_CUR);
200 if (size == 0) 199 if (size == 0)
201 return 0; 200 return 0;
202 201
202 file->size = size;
203
203 /* 204 /*
204 * During this process, it'll load kernel map and replace the 205 * During this process, it'll load kernel map and replace the
205 * dso->long_name to a real pathname it found. In this case 206 * dso->long_name to a real pathname it found. In this case
@@ -211,9 +212,7 @@ static int process_buildids(struct record *rec)
211 */ 212 */
212 symbol_conf.ignore_vmlinux_buildid = true; 213 symbol_conf.ignore_vmlinux_buildid = true;
213 214
214 return __perf_session__process_events(session, start, 215 return perf_session__process_events(session, &build_id__mark_dso_hit_ops);
215 size - start,
216 size, &build_id__mark_dso_hit_ops);
217} 216}
218 217
219static void perf_event__synthesize_guest_os(struct machine *machine, void *data) 218static void perf_event__synthesize_guest_os(struct machine *machine, void *data)