lkml.org 
[lkml]   [2010]   [Apr]   [3]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [RFC v2][PATCH 08/11] perf: convert perf header build_ids into build_id events
Em Thu, Apr 01, 2010 at 11:59:22PM -0500, Tom Zanussi escreveu:
> Bypasses the build_id perf header code and replaces it with a
> synthesized event and processing function that accomplishes the same
> thing, used when reading/writing perf data to/from a pipe.

> static void atexit_header(void)
> {
> - session->header.data_size += bytes_written;
> + if (!pipe_output) {
> + session->header.data_size += bytes_written;
> - process_buildids();
> - perf_header__write(&session->header, output, true);
> + 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");

Humm, getting everything as events looks elegant, but for the buildid
case... when processing samples we need to _first_ have the build-ids,
hence they are in the header.

We only generate them after collecting all samples because it would
disturb the system if we look at them in the ELF files when we get
PERF_RECORD_MMAP events.

In live mode we will be resolving symbols as we get samples, so I fail
to see how synthesizing the build-ids as a last step will help.

With build-ids events we can at least generate it in advance for the
kernel and modules, as it is a restriced number of DSOs and we have them
easily accessible via /sys, but for the userspace bits...

- Arnaldo


\
 
 \ /
  Last update: 2010-04-03 15:57    [W:2.543 / U:0.012 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site