diff options
Diffstat (limited to 'tools/perf/builtin-record.c')
| -rw-r--r-- | tools/perf/builtin-record.c | 20 |
1 files changed, 18 insertions, 2 deletions
diff --git a/tools/perf/builtin-record.c b/tools/perf/builtin-record.c index 2583a9b04317..8648c6d3003d 100644 --- a/tools/perf/builtin-record.c +++ b/tools/perf/builtin-record.c | |||
| @@ -200,6 +200,17 @@ static int process_buildids(struct record *rec) | |||
| 200 | if (size == 0) | 200 | if (size == 0) |
| 201 | return 0; | 201 | return 0; |
| 202 | 202 | ||
| 203 | /* | ||
| 204 | * 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 | * we prefer the vmlinux path like | ||
| 207 | * /lib/modules/3.16.4/build/vmlinux | ||
| 208 | * | ||
| 209 | * rather than build-id path (in debug directory). | ||
| 210 | * $HOME/.debug/.build-id/f0/6e17aa50adf4d00b88925e03775de107611551 | ||
| 211 | */ | ||
| 212 | symbol_conf.ignore_vmlinux_buildid = true; | ||
| 213 | |||
| 203 | return __perf_session__process_events(session, start, | 214 | return __perf_session__process_events(session, start, |
| 204 | size - start, | 215 | size - start, |
| 205 | size, &build_id__mark_dso_hit_ops); | 216 | size, &build_id__mark_dso_hit_ops); |
| @@ -680,11 +691,12 @@ static int perf_record_config(const char *var, const char *value, void *cb) | |||
| 680 | return perf_default_config(var, value, cb); | 691 | return perf_default_config(var, value, cb); |
| 681 | } | 692 | } |
| 682 | 693 | ||
| 683 | static const char * const record_usage[] = { | 694 | static const char * const __record_usage[] = { |
| 684 | "perf record [<options>] [<command>]", | 695 | "perf record [<options>] [<command>]", |
| 685 | "perf record [<options>] -- <command> [<options>]", | 696 | "perf record [<options>] -- <command> [<options>]", |
| 686 | NULL | 697 | NULL |
| 687 | }; | 698 | }; |
| 699 | const char * const *record_usage = __record_usage; | ||
| 688 | 700 | ||
| 689 | /* | 701 | /* |
| 690 | * XXX Ideally would be local to cmd_record() and passed to a record__new | 702 | * XXX Ideally would be local to cmd_record() and passed to a record__new |
| @@ -725,7 +737,7 @@ const char record_callchain_help[] = CALLCHAIN_HELP "fp"; | |||
| 725 | * perf_evlist__prepare_workload, etc instead of fork+exec'in 'perf record', | 737 | * perf_evlist__prepare_workload, etc instead of fork+exec'in 'perf record', |
| 726 | * using pipes, etc. | 738 | * using pipes, etc. |
| 727 | */ | 739 | */ |
| 728 | const struct option record_options[] = { | 740 | struct option __record_options[] = { |
| 729 | OPT_CALLBACK('e', "event", &record.evlist, "event", | 741 | OPT_CALLBACK('e', "event", &record.evlist, "event", |
| 730 | "event selector. use 'perf list' to list available events", | 742 | "event selector. use 'perf list' to list available events", |
| 731 | parse_events_option), | 743 | parse_events_option), |
| @@ -799,9 +811,13 @@ const struct option record_options[] = { | |||
| 799 | "sample transaction flags (special events only)"), | 811 | "sample transaction flags (special events only)"), |
| 800 | OPT_BOOLEAN(0, "per-thread", &record.opts.target.per_thread, | 812 | OPT_BOOLEAN(0, "per-thread", &record.opts.target.per_thread, |
| 801 | "use per-thread mmaps"), | 813 | "use per-thread mmaps"), |
| 814 | OPT_BOOLEAN('I', "intr-regs", &record.opts.sample_intr_regs, | ||
| 815 | "Sample machine registers on interrupt"), | ||
| 802 | OPT_END() | 816 | OPT_END() |
| 803 | }; | 817 | }; |
| 804 | 818 | ||
| 819 | struct option *record_options = __record_options; | ||
| 820 | |||
| 805 | int cmd_record(int argc, const char **argv, const char *prefix __maybe_unused) | 821 | int cmd_record(int argc, const char **argv, const char *prefix __maybe_unused) |
| 806 | { | 822 | { |
| 807 | int err = -ENOMEM; | 823 | int err = -ENOMEM; |
