Lines Matching defs:annotate
3 * builtin-annotate.c
5 * Builtin annotate command: Analyze the perf.data input file,
22 #include "util/annotate.h"
364 int (*annotate)(struct hist_entry *he,
369 annotate = dlsym(perf_gtk_handle,
371 if (annotate == NULL) {
376 ret = annotate(he, evsel, &ann->opts, NULL);
499 "perf annotate [<options>]",
505 struct perf_annotate annotate = {
539 OPT_STRING('s', "symbol", &annotate.sym_hist_filter, "symbol",
540 "symbol to annotate"),
548 OPT_BOOLEAN(0, "gtk", &annotate.use_gtk, "Use the GTK interface"),
551 OPT_BOOLEAN(0, "tui", &annotate.use_tui, "Use the TUI interface"),
553 OPT_BOOLEAN(0, "stdio", &annotate.use_stdio, "Use the stdio interface"),
554 OPT_BOOLEAN(0, "stdio2", &annotate.use_stdio2, "Use the stdio interface"),
561 OPT_BOOLEAN('l', "print-line", &annotate.opts.print_lines,
563 OPT_BOOLEAN('P', "full-paths", &annotate.opts.full_path,
565 OPT_BOOLEAN(0, "skip-missing", &annotate.skip_missing,
568 &annotate.group_set,
570 OPT_STRING('C', "cpu", &annotate.cpu_list, "cpu", "list of cpus to profile"),
574 OPT_BOOLEAN(0, "source", &annotate.opts.annotate_src,
576 OPT_BOOLEAN(0, "asm-raw", &annotate.opts.show_asm_raw,
580 OPT_STRING(0, "prefix", &annotate.opts.prefix, "prefix",
582 OPT_STRING(0, "prefix-strip", &annotate.opts.prefix_strip, "N",
601 OPT_CALLBACK(0, "percent-type", &annotate.opts, "local-period",
604 OPT_CALLBACK(0, "percent-limit", &annotate, "percent",
617 annotation_options__init(&annotate.opts);
623 annotation_config__init(&annotate.opts);
634 annotate.sym_hist_filter = argv[0];
638 annotate.opts.disassembler_style = strdup(disassembler_style);
639 if (!annotate.opts.disassembler_style)
643 annotate.opts.objdump_path = strdup(objdump_path);
644 if (!annotate.opts.objdump_path)
653 if (annotate_check_args(&annotate.opts) < 0)
657 if (symbol_conf.show_nr_samples && annotate.use_gtk) {
672 annotate.session = perf_session__new(&data, &annotate.tool);
673 if (IS_ERR(annotate.session))
674 return PTR_ERR(annotate.session);
676 annotate.session->itrace_synth_opts = &itrace_synth_opts;
678 annotate.has_br_stack = perf_header__has_feat(&annotate.session->header,
681 if (annotate.group_set)
682 evlist__force_leader(annotate.session->evlist);
690 ret = symbol__init(&annotate.session->header.env);
694 if (annotate.use_stdio || annotate.use_stdio2)
697 else if (annotate.use_tui)
701 else if (annotate.use_gtk)
709 * symbol, we do not care about the processes in annotate,
715 * Set SORT_MODE__BRANCH so that annotate display IPC/Cycle
718 if ((use_browser == 1 || annotate.use_stdio2) && annotate.has_br_stack)
724 ret = __cmd_annotate(&annotate);
732 perf_session__delete(annotate.session);
734 annotation_options__exit(&annotate.opts);