Merge tag 'for-f2fs-3.19' of git://git.kernel.org/pub/scm/linux/kernel/git/jaegeuk...
[firefly-linux-kernel-4.4.55.git] / tools / perf / builtin-record.c
index 2583a9b043178453890c8006b41f138afb9db8f0..8648c6d3003ddb3d64c54142ece0f56b1e30e813 100644 (file)
@@ -200,6 +200,17 @@ static int process_buildids(struct record *rec)
        if (size == 0)
                return 0;
 
+       /*
+        * During this process, it'll load kernel map and replace the
+        * dso->long_name to a real pathname it found.  In this case
+        * we prefer the vmlinux path like
+        *   /lib/modules/3.16.4/build/vmlinux
+        *
+        * rather than build-id path (in debug directory).
+        *   $HOME/.debug/.build-id/f0/6e17aa50adf4d00b88925e03775de107611551
+        */
+       symbol_conf.ignore_vmlinux_buildid = true;
+
        return __perf_session__process_events(session, start,
                                              size - start,
                                              size, &build_id__mark_dso_hit_ops);
@@ -680,11 +691,12 @@ static int perf_record_config(const char *var, const char *value, void *cb)
        return perf_default_config(var, value, cb);
 }
 
-static const char * const record_usage[] = {
+static const char * const __record_usage[] = {
        "perf record [<options>] [<command>]",
        "perf record [<options>] -- <command> [<options>]",
        NULL
 };
+const char * const *record_usage = __record_usage;
 
 /*
  * 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";
  * perf_evlist__prepare_workload, etc instead of fork+exec'in 'perf record',
  * using pipes, etc.
  */
-const struct option record_options[] = {
+struct option __record_options[] = {
        OPT_CALLBACK('e', "event", &record.evlist, "event",
                     "event selector. use 'perf list' to list available events",
                     parse_events_option),
@@ -799,9 +811,13 @@ const struct option record_options[] = {
                    "sample transaction flags (special events only)"),
        OPT_BOOLEAN(0, "per-thread", &record.opts.target.per_thread,
                    "use per-thread mmaps"),
+       OPT_BOOLEAN('I', "intr-regs", &record.opts.sample_intr_regs,
+                   "Sample machine registers on interrupt"),
        OPT_END()
 };
 
+struct option *record_options = __record_options;
+
 int cmd_record(int argc, const char **argv, const char *prefix __maybe_unused)
 {
        int err = -ENOMEM;