• A
    perf record: Add option to disable collecting build-ids · baa2f6ce
    Arnaldo Carvalho de Melo 提交于
    Collecting build-ids for long running sessions may take a long time
    because it needs to traverse the whole just collected perf.data stream
    of events, marking the DSOs that had hits and then looking for the
    .note.gnu.build-id ELF section.
    
    For things like the 'trace' tool that records and right away consumes
    the data on systems where its unlikely that the DSOs being monitored
    will change while 'trace' runs, it is desirable to remove build id
    collection, so add a -B/--no-buildid option to perf record to allow such
    use case.
    
    Longer term we'll avoid all this if we, at DSO load time, in the kernel,
    take advantage of this slow code path to collect the build-id and stash
    it somewhere, so that we can insert it in the PERF_RECORD_MMAP event.
    Reported-by: NThomas Gleixner <tglx@linutronix.de>
    Cc: Frederic Weisbecker <fweisbec@gmail.com>
    Cc: Mike Galbraith <efault@gmx.de>
    Cc: Paul Mackerras <paulus@samba.org>
    Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
    Cc: Stephane Eranian <eranian@google.com>
    Cc: Thomas Gleixner <tglx@linutronix.de>
    Cc: Tom Zanussi <tzanussi@gmail.com>
    LKML-Reference: <new-submission>
    Signed-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
    baa2f6ce
builtin-record.c 22.5 KB