|
@@ -44,6 +44,7 @@
|
|
|
#include <sys/stat.h>
|
|
|
#include <fcntl.h>
|
|
|
#include <unistd.h>
|
|
|
+#include <subcmd/pager.h>
|
|
|
|
|
|
#include "sane_ctype.h"
|
|
|
|
|
@@ -3103,6 +3104,24 @@ static int perf_script__process_auxtrace_info(struct perf_session *session,
|
|
|
#define perf_script__process_auxtrace_info 0
|
|
|
#endif
|
|
|
|
|
|
+static int parse_insn_trace(const struct option *opt __maybe_unused,
|
|
|
+ const char *str __maybe_unused,
|
|
|
+ int unset __maybe_unused)
|
|
|
+{
|
|
|
+ parse_output_fields(NULL, "+insn,-event,-period", 0);
|
|
|
+ itrace_parse_synth_opts(opt, "i0ns", 0);
|
|
|
+ nanosecs = true;
|
|
|
+ return 0;
|
|
|
+}
|
|
|
+
|
|
|
+static int parse_xed(const struct option *opt __maybe_unused,
|
|
|
+ const char *str __maybe_unused,
|
|
|
+ int unset __maybe_unused)
|
|
|
+{
|
|
|
+ force_pager("xed -F insn: -A -64 | less");
|
|
|
+ return 0;
|
|
|
+}
|
|
|
+
|
|
|
int cmd_script(int argc, const char **argv)
|
|
|
{
|
|
|
bool show_full_info = false;
|
|
@@ -3187,6 +3206,10 @@ int cmd_script(int argc, const char **argv)
|
|
|
"system-wide collection from all CPUs"),
|
|
|
OPT_STRING('S', "symbols", &symbol_conf.sym_list_str, "symbol[,symbol...]",
|
|
|
"only consider these symbols"),
|
|
|
+ OPT_CALLBACK_OPTARG(0, "insn-trace", &itrace_synth_opts, NULL, NULL,
|
|
|
+ "Decode instructions from itrace", parse_insn_trace),
|
|
|
+ OPT_CALLBACK_OPTARG(0, "xed", NULL, NULL, NULL,
|
|
|
+ "Run xed disassembler on output", parse_xed),
|
|
|
OPT_STRING(0, "stop-bt", &symbol_conf.bt_stop_list_str, "symbol[,symbol...]",
|
|
|
"Stop display of callgraph at these symbols"),
|
|
|
OPT_STRING('C', "cpu", &cpu_list, "cpu", "list of cpus to profile"),
|