Lines Matching defs:annotate

3  * builtin-annotate.c
5 * Builtin annotate command: Analyze the perf.data input file,
22 #include "util/annotate.h"
23 #include "util/annotate-data.h"
495 int (*annotate)(struct hist_entry *he,
499 annotate = dlsym(perf_gtk_handle,
501 if (annotate == NULL) {
506 ret = annotate(he, evsel, NULL);
686 "perf annotate [<options>]",
692 struct perf_annotate annotate = {};
705 OPT_STRING('s', "symbol", &annotate.sym_hist_filter, "symbol",
706 "symbol to annotate"),
714 OPT_BOOLEAN(0, "gtk", &annotate.use_gtk, "Use the GTK interface"),
717 OPT_BOOLEAN(0, "tui", &annotate.use_tui, "Use the TUI interface"),
719 OPT_BOOLEAN(0, "stdio", &annotate.use_stdio, "Use the stdio interface"),
720 OPT_BOOLEAN(0, "stdio2", &annotate.use_stdio2, "Use the stdio interface"),
731 OPT_BOOLEAN(0, "skip-missing", &annotate.skip_missing,
734 &annotate.group_set,
736 OPT_STRING('C', "cpu", &annotate.cpu_list, "cpu", "list of cpus to profile"),
767 OPT_CALLBACK(0, "percent-limit", &annotate, "percent",
772 OPT_CALLBACK_OPTARG(0, "data-type", &annotate, NULL, "name",
773 "Show data type annotate for the memory accesses",
775 OPT_BOOLEAN(0, "type-stat", &annotate.type_stat,
777 OPT_BOOLEAN(0, "insn-stat", &annotate.insn_stat,
807 annotate.sym_hist_filter = argv[0];
830 if (symbol_conf.show_nr_samples && annotate.use_gtk) {
837 if (annotate.data_type) {
852 perf_tool__init(&annotate.tool, /*ordered_events=*/true);
853 annotate.tool.sample = process_sample_event;
854 annotate.tool.mmap = perf_event__process_mmap;
855 annotate.tool.mmap2 = perf_event__process_mmap2;
856 annotate.tool.comm = perf_event__process_comm;
857 annotate.tool.exit = perf_event__process_exit;
858 annotate.tool.fork = perf_event__process_fork;
859 annotate.tool.namespaces = perf_event__process_namespaces;
860 annotate.tool.attr = perf_event__process_attr;
861 annotate.tool.build_id = perf_event__process_build_id;
863 annotate.tool.tracing_data = perf_event__process_tracing_data;
865 annotate.tool.id_index = perf_event__process_id_index;
866 annotate.tool.auxtrace_info = perf_event__process_auxtrace_info;
867 annotate.tool.auxtrace = perf_event__process_auxtrace;
868 annotate.tool.feature = perf_event__process_feature;
869 annotate.tool.ordering_requires_timestamps = true;
871 annotate.session = perf_session__new(&data, &annotate.tool);
872 if (IS_ERR(annotate.session))
873 return PTR_ERR(annotate.session);
875 annotate.session->itrace_synth_opts = &itrace_synth_opts;
877 annotate.has_br_stack = perf_header__has_feat(&annotate.session->header,
880 if (annotate.group_set)
881 evlist__force_leader(annotate.session->evlist);
889 ret = symbol__init(perf_session__env(annotate.session));
893 if (annotate.use_stdio || annotate.use_stdio2)
896 else if (annotate.use_tui)
900 else if (annotate.use_gtk)
904 if (annotate.data_type) {
916 * symbol, we do not care about the processes in annotate,
919 if (annotate.data_type)
925 * Set SORT_MODE__BRANCH so that annotate displays IPC/Cycle and
929 if ((use_browser == 1 || annotate.use_stdio2) && annotate.has_br_stack) {
931 if (annotate.session->evlist->nr_br_cntr > 0)
935 if (setup_sorting(/*evlist=*/NULL, perf_session__env(annotate.session)) < 0)
938 ret = __cmd_annotate(&annotate);
946 perf_session__delete(annotate.session);