Lines Matching full:top

3  * builtin-top.c
5 * Builtin top command: Display a continuously updated profile of
40 #include "util/top.h"
95 static void perf_top__update_print_entries(struct perf_top *top) in perf_top__update_print_entries() argument
97 top->print_entries = top->winsize.ws_row - HEADER_LINE_NR; in perf_top__update_print_entries()
105 static void perf_top__resize(struct perf_top *top) in perf_top__resize() argument
107 get_term_dimensions(&top->winsize); in perf_top__resize()
108 perf_top__update_print_entries(top); in perf_top__resize()
111 static int perf_top__parse_source(struct perf_top *top, struct hist_entry *he) in perf_top__parse_source() argument
141 if (!symbol__hists(sym, top->evlist->core.nr_entries)) { in perf_top__parse_source()
149 err = symbol__annotate(&he->ms, evsel, &top->annotation_opts, NULL); in perf_top__parse_source()
151 top->sym_filter_entry = he; in perf_top__parse_source()
195 static void perf_top__record_precise_ip(struct perf_top *top, in perf_top__record_precise_ip() argument
206 (top->sym_filter_entry == NULL || in perf_top__record_precise_ip()
207 top->sym_filter_entry->ms.sym != sym))) in perf_top__record_precise_ip()
238 static void perf_top__show_details(struct perf_top *top) in perf_top__show_details() argument
240 struct hist_entry *he = top->sym_filter_entry; in perf_top__show_details()
261 printf("Showing %s for %s\n", evsel__name(top->sym_evsel), symbol->name); in perf_top__show_details()
262 printf(" Events Pcnt (>=%d%%)\n", top->annotation_opts.min_pcnt); in perf_top__show_details()
264 more = symbol__annotate_printf(&he->ms, top->sym_evsel, &top->annotation_opts); in perf_top__show_details()
266 if (top->evlist->enabled) { in perf_top__show_details()
267 if (top->zero) in perf_top__show_details()
268 symbol__annotate_zero_histogram(symbol, top->sym_evsel->core.idx); in perf_top__show_details()
270 symbol__annotate_decay_histogram(symbol, top->sym_evsel->core.idx); in perf_top__show_details()
317 static void perf_top__print_sym_table(struct perf_top *top) in perf_top__print_sym_table() argument
321 const int win_width = top->winsize.ws_col - 1; in perf_top__print_sym_table()
322 struct evsel *evsel = top->sym_evsel; in perf_top__print_sym_table()
327 perf_top__header_snprintf(top, bf, sizeof(bf)); in perf_top__print_sym_table()
332 if (!top->record_opts.overwrite && in perf_top__print_sym_table()
333 (top->evlist->stats.nr_lost_warned != in perf_top__print_sym_table()
334 top->evlist->stats.nr_events[PERF_RECORD_LOST])) { in perf_top__print_sym_table()
335 top->evlist->stats.nr_lost_warned = in perf_top__print_sym_table()
336 top->evlist->stats.nr_events[PERF_RECORD_LOST]; in perf_top__print_sym_table()
339 top->evlist->stats.nr_lost_warned); in perf_top__print_sym_table()
343 if (top->sym_filter_entry) { in perf_top__print_sym_table()
344 perf_top__show_details(top); in perf_top__print_sym_table()
348 perf_top__resort_hists(top); in perf_top__print_sym_table()
350 hists__output_recalc_col_len(hists, top->print_entries - printed); in perf_top__print_sym_table()
352 hists__fprintf(hists, false, top->print_entries - printed, win_width, in perf_top__print_sym_table()
353 top->min_percent, stdout, !symbol_conf.use_callchain); in perf_top__print_sym_table()
391 static void perf_top__prompt_symbol(struct perf_top *top, const char *msg) in perf_top__prompt_symbol() argument
394 struct hist_entry *syme = top->sym_filter_entry, *n, *found = NULL; in perf_top__prompt_symbol()
395 struct hists *hists = evsel__hists(top->sym_evsel); in perf_top__prompt_symbol()
402 top->sym_filter_entry = NULL; in perf_top__prompt_symbol()
427 perf_top__parse_source(top, found); in perf_top__prompt_symbol()
433 static void perf_top__print_mapped_keys(struct perf_top *top) in perf_top__print_mapped_keys() argument
437 if (top->sym_filter_entry) { in perf_top__print_mapped_keys()
438 struct symbol *sym = top->sym_filter_entry->ms.sym; in perf_top__print_mapped_keys()
443 fprintf(stdout, "\t[d] display refresh delay. \t(%d)\n", top->delay_secs); in perf_top__print_mapped_keys()
444 fprintf(stdout, "\t[e] display entries (lines). \t(%d)\n", top->print_entries); in perf_top__print_mapped_keys()
446 if (top->evlist->core.nr_entries > 1) in perf_top__print_mapped_keys()
447 …fprintf(stdout, "\t[E] active event counter. \t(%s)\n", evsel__name(top->sym_evse… in perf_top__print_mapped_keys()
449 fprintf(stdout, "\t[f] profile display filter (count). \t(%d)\n", top->count_filter); in perf_top__print_mapped_keys()
451 …fprintf(stdout, "\t[F] annotate display filter (percent). \t(%d%%)\n", top->annotation_opts.mi… in perf_top__print_mapped_keys()
457 top->hide_kernel_symbols ? "yes" : "no"); in perf_top__print_mapped_keys()
460 top->hide_user_symbols ? "yes" : "no"); in perf_top__print_mapped_keys()
461 fprintf(stdout, "\t[z] toggle sample zeroing. \t(%d)\n", top->zero ? 1 : 0); in perf_top__print_mapped_keys()
465 static int perf_top__key_mapped(struct perf_top *top, int c) in perf_top__key_mapped() argument
481 return top->evlist->core.nr_entries > 1 ? 1 : 0; in perf_top__key_mapped()
489 static bool perf_top__handle_keypress(struct perf_top *top, int c) in perf_top__handle_keypress() argument
493 if (!perf_top__key_mapped(top, c)) { in perf_top__handle_keypress()
497 perf_top__print_mapped_keys(top); in perf_top__handle_keypress()
507 if (!perf_top__key_mapped(top, c)) in perf_top__handle_keypress()
513 prompt_integer(&top->delay_secs, "Enter display delay"); in perf_top__handle_keypress()
514 if (top->delay_secs < 1) in perf_top__handle_keypress()
515 top->delay_secs = 1; in perf_top__handle_keypress()
518 prompt_integer(&top->print_entries, "Enter display entries (lines)"); in perf_top__handle_keypress()
519 if (top->print_entries == 0) { in perf_top__handle_keypress()
520 perf_top__resize(top); in perf_top__handle_keypress()
527 if (top->evlist->core.nr_entries > 1) { in perf_top__handle_keypress()
533 evlist__for_each_entry(top->evlist, top->sym_evsel) in perf_top__handle_keypress()
534 fprintf(stderr, "\n\t%d %s", top->sym_evsel->core.idx, evsel__name(top->sym_evsel)); in perf_top__handle_keypress()
538 if (counter >= top->evlist->core.nr_entries) { in perf_top__handle_keypress()
539 top->sym_evsel = evlist__first(top->evlist); in perf_top__handle_keypress()
540 fprintf(stderr, "Sorry, no such event, using %s.\n", evsel__name(top->sym_evsel)); in perf_top__handle_keypress()
544 evlist__for_each_entry(top->evlist, top->sym_evsel) in perf_top__handle_keypress()
545 if (top->sym_evsel->core.idx == counter) in perf_top__handle_keypress()
548 top->sym_evsel = evlist__first(top->evlist); in perf_top__handle_keypress()
551 prompt_integer(&top->count_filter, "Enter display event count filter"); in perf_top__handle_keypress()
554 prompt_percent(&top->annotation_opts.min_pcnt, in perf_top__handle_keypress()
558 top->hide_kernel_symbols = !top->hide_kernel_symbols; in perf_top__handle_keypress()
563 if (top->dump_symtab) in perf_top__handle_keypress()
564 perf_session__fprintf_dsos(top->session, stderr); in perf_top__handle_keypress()
568 perf_top__prompt_symbol(top, "Enter details symbol"); in perf_top__handle_keypress()
571 if (!top->sym_filter_entry) in perf_top__handle_keypress()
574 struct hist_entry *syme = top->sym_filter_entry; in perf_top__handle_keypress()
576 top->sym_filter_entry = NULL; in perf_top__handle_keypress()
581 top->hide_user_symbols = !top->hide_user_symbols; in perf_top__handle_keypress()
584 top->zero = !top->zero; in perf_top__handle_keypress()
615 struct perf_top *top = arg; in display_thread_tui() local
616 const char *help = "For a higher level overview, try: perf top --sort comm,dso"; in display_thread_tui()
619 .arg = top, in display_thread_tui()
620 .refresh = top->delay_secs, in display_thread_tui()
631 prctl(PR_SET_NAME, "perf-top-UI", 0, 0, 0); in display_thread_tui()
634 perf_top__sort_new_samples(top); in display_thread_tui()
641 evlist__for_each_entry(top->evlist, pos) { in display_thread_tui()
643 hists->uid_filter_str = top->record_opts.target.uid_str; in display_thread_tui()
646 ret = evlist__tui_browse_hists(top->evlist, help, &hbt, top->min_percent, in display_thread_tui()
647 &top->session->header.env, !top->record_opts.overwrite, in display_thread_tui()
648 &top->annotation_opts); in display_thread_tui()
650 top->zero = true; in display_thread_tui()
676 struct perf_top *top = arg; in display_thread() local
686 prctl(PR_SET_NAME, "perf-top-UI", 0, 0, 0); in display_thread()
691 delay_msecs = top->delay_secs * MSEC_PER_SEC; in display_thread()
699 perf_top__print_sym_table(top); in display_thread()
715 if (perf_top__handle_keypress(top, c)) in display_thread()
730 struct perf_top *top = arg; in hist_iter__top_callback() local
734 perf_top__record_precise_ip(top, iter->he, iter->sample, evsel, al->addr); in hist_iter__top_callback()
737 !(top->record_opts.branch_stack & PERF_SAMPLE_BRANCH_ANY), in hist_iter__top_callback()
748 struct perf_top *top = container_of(tool, struct perf_top, tool); in perf_event__process_sample() local
767 top->session->evlist->stats.nr_unprocessable_samples++); in perf_event__process_sample()
772 top->exact_samples++; in perf_event__process_sample()
777 if (top->stitch_lbr) in perf_event__process_sample()
783 if (!evlist__exclude_kernel(top->session->evlist)) { in perf_event__process_sample()
809 if (!machine->kptr_restrict_warned && !top->vmlinux_warned && in perf_event__process_sample()
823 top->vmlinux_warned = true; in perf_event__process_sample()
842 if (hist_entry_iter__add(&iter, &al, top->max_stack, top) < 0) in perf_event__process_sample()
852 perf_top__process_lost(struct perf_top *top, union perf_event *event, in perf_top__process_lost() argument
855 top->lost += event->lost.lost; in perf_top__process_lost()
856 top->lost_total += event->lost.lost; in perf_top__process_lost()
861 perf_top__process_lost_samples(struct perf_top *top, in perf_top__process_lost_samples() argument
865 top->lost += event->lost_samples.lost; in perf_top__process_lost_samples()
866 top->lost_total += event->lost_samples.lost; in perf_top__process_lost_samples()
872 static void perf_top__mmap_read_idx(struct perf_top *top, int idx) in perf_top__mmap_read_idx() argument
874 struct record_opts *opts = &top->record_opts; in perf_top__mmap_read_idx()
875 struct evlist *evlist = top->evlist; in perf_top__mmap_read_idx()
890 ret = ordered_events__queue(top->qe.in, event, last_timestamp, 0, NULL); in perf_top__mmap_read_idx()
896 if (top->qe.rotate) { in perf_top__mmap_read_idx()
897 mutex_lock(&top->qe.mutex); in perf_top__mmap_read_idx()
898 top->qe.rotate = false; in perf_top__mmap_read_idx()
899 cond_signal(&top->qe.cond); in perf_top__mmap_read_idx()
900 mutex_unlock(&top->qe.mutex); in perf_top__mmap_read_idx()
907 static void perf_top__mmap_read(struct perf_top *top) in perf_top__mmap_read() argument
909 bool overwrite = top->record_opts.overwrite; in perf_top__mmap_read()
910 struct evlist *evlist = top->evlist; in perf_top__mmap_read()
916 for (i = 0; i < top->evlist->core.nr_mmaps; i++) in perf_top__mmap_read()
917 perf_top__mmap_read_idx(top, i); in perf_top__mmap_read()
927 * perf top should support consistent term for all events.
942 static int perf_top__overwrite_check(struct perf_top *top) in perf_top__overwrite_check() argument
944 struct record_opts *opts = &top->record_opts; in perf_top__overwrite_check()
945 struct evlist *evlist = top->evlist; in perf_top__overwrite_check()
987 static int perf_top_overwrite_fallback(struct perf_top *top, in perf_top_overwrite_fallback() argument
990 struct record_opts *opts = &top->record_opts; in perf_top_overwrite_fallback()
991 struct evlist *evlist = top->evlist; in perf_top_overwrite_fallback()
1008 static int perf_top__start_counters(struct perf_top *top) in perf_top__start_counters() argument
1012 struct evlist *evlist = top->evlist; in perf_top__start_counters()
1013 struct record_opts *opts = &top->record_opts; in perf_top__start_counters()
1015 if (perf_top__overwrite_check(top)) { in perf_top__start_counters()
1016 ui__error("perf top only support consistent per-event " in perf_top__start_counters()
1025 if (evsel__open(counter, top->evlist->core.user_requested_cpus, in perf_top__start_counters()
1026 top->evlist->core.threads) < 0) { in perf_top__start_counters()
1030 * Because perf top is the only tool which has in perf_top__start_counters()
1039 perf_top_overwrite_fallback(top, counter)) in perf_top__start_counters()
1078 static struct ordered_events *rotate_queues(struct perf_top *top) in rotate_queues() argument
1080 struct ordered_events *in = top->qe.in; in rotate_queues()
1082 if (top->qe.in == &top->qe.data[1]) in rotate_queues()
1083 top->qe.in = &top->qe.data[0]; in rotate_queues()
1085 top->qe.in = &top->qe.data[1]; in rotate_queues()
1092 struct perf_top *top = arg; in process_thread() local
1095 struct ordered_events *out, *in = top->qe.in; in process_thread()
1102 out = rotate_queues(top); in process_thread()
1104 mutex_lock(&top->qe.mutex); in process_thread()
1105 top->qe.rotate = true; in process_thread()
1106 cond_wait(&top->qe.cond, &top->qe.mutex); in process_thread()
1107 mutex_unlock(&top->qe.mutex); in process_thread()
1117 * Allow only 'top->delay_secs' seconds behind samples.
1119 static int should_drop(struct ordered_event *qevent, struct perf_top *top) in should_drop() argument
1127 delay_timestamp = qevent->timestamp + top->delay_secs * NSEC_PER_SEC; in should_drop()
1134 struct perf_top *top = qe->data; in deliver_event() local
1135 struct evlist *evlist = top->evlist; in deliver_event()
1136 struct perf_session *session = top->session; in deliver_event()
1143 if (should_drop(qevent, top)) { in deliver_event()
1144 top->drop++; in deliver_event()
1145 top->drop_total++; in deliver_event()
1159 if (evswitch__discard(&top->evswitch, evsel)) in deliver_event()
1161 ++top->samples; in deliver_event()
1166 ++top->us_samples; in deliver_event()
1167 if (top->hide_user_symbols) in deliver_event()
1172 ++top->kernel_samples; in deliver_event()
1173 if (top->hide_kernel_symbols) in deliver_event()
1178 ++top->guest_kernel_samples; in deliver_event()
1183 ++top->guest_us_samples; in deliver_event()
1197 perf_event__process_sample(&top->tool, event, evsel, in deliver_event()
1200 perf_top__process_lost(top, event, evsel); in deliver_event()
1202 perf_top__process_lost_samples(top, event, evsel); in deliver_event()
1214 static void init_process_thread(struct perf_top *top) in init_process_thread() argument
1216 ordered_events__init(&top->qe.data[0], deliver_event, top); in init_process_thread()
1217 ordered_events__init(&top->qe.data[1], deliver_event, top); in init_process_thread()
1218 ordered_events__set_copy_on_queue(&top->qe.data[0], true); in init_process_thread()
1219 ordered_events__set_copy_on_queue(&top->qe.data[1], true); in init_process_thread()
1220 top->qe.in = &top->qe.data[0]; in init_process_thread()
1221 mutex_init(&top->qe.mutex); in init_process_thread()
1222 cond_init(&top->qe.cond); in init_process_thread()
1225 static int __cmd_top(struct perf_top *top) in __cmd_top() argument
1227 struct record_opts *opts = &top->record_opts; in __cmd_top()
1231 if (!top->annotation_opts.objdump_path) { in __cmd_top()
1232 ret = perf_env__lookup_objdump(&top->session->header.env, in __cmd_top()
1233 &top->annotation_opts.objdump_path); in __cmd_top()
1242 if (perf_session__register_idle_thread(top->session) < 0) in __cmd_top()
1245 if (top->nr_threads_synthesize > 1) in __cmd_top()
1248 init_process_thread(top); in __cmd_top()
1251 top->tool.namespace_events = true; in __cmd_top()
1254 top->tool.cgroup_events = true; in __cmd_top()
1261 ret = perf_event__synthesize_bpf_events(top->session, perf_event__process, in __cmd_top()
1262 &top->session->machines.host, in __cmd_top()
1263 &top->record_opts); in __cmd_top()
1267 ret = perf_event__synthesize_cgroups(&top->tool, perf_event__process, in __cmd_top()
1268 &top->session->machines.host); in __cmd_top()
1272 machine__synthesize_threads(&top->session->machines.host, &opts->target, in __cmd_top()
1273 top->evlist->core.threads, true, false, in __cmd_top()
1274 top->nr_threads_synthesize); in __cmd_top()
1276 if (top->nr_threads_synthesize > 1) in __cmd_top()
1290 ret = perf_top__start_counters(top); in __cmd_top()
1294 top->session->evlist = top->evlist; in __cmd_top()
1295 perf_session__set_id_hdr_size(top->session); in __cmd_top()
1302 * XXX 'top' still doesn't start workloads like record, trace, but should, in __cmd_top()
1306 evlist__enable(top->evlist); in __cmd_top()
1309 if (pthread_create(&thread_process, NULL, process_thread, top)) { in __cmd_top()
1315 display_thread), top)) { in __cmd_top()
1320 if (top->realtime_prio) { in __cmd_top()
1323 param.sched_priority = top->realtime_prio; in __cmd_top()
1331 evlist__poll(top->evlist, 100); in __cmd_top()
1333 perf_top__mmap_read(top); in __cmd_top()
1336 u64 hits = top->samples; in __cmd_top()
1338 perf_top__mmap_read(top); in __cmd_top()
1340 if (opts->overwrite || (hits == top->samples)) in __cmd_top()
1341 ret = evlist__poll(top->evlist, 100); in __cmd_top()
1344 perf_top__resize(top); in __cmd_top()
1353 cond_signal(&top->qe.cond); in __cmd_top()
1387 if (!strcmp(var, "top.call-graph")) { in perf_top_config()
1391 if (!strcmp(var, "top.children")) { in perf_top_config()
1403 struct perf_top *top = opt->value; in parse_percent_limit() local
1405 top->min_percent = strtof(arg, NULL); in parse_percent_limit()
1415 struct perf_top top = { in cmd_top() local
1441 struct record_opts *opts = &top.record_opts; in cmd_top()
1444 OPT_CALLBACK('e', "event", &top.evlist, "event", in cmd_top()
1462 OPT_BOOLEAN('K', "hide_kernel_symbols", &top.hide_kernel_symbols, in cmd_top()
1466 OPT_INTEGER('r', "realtime", &top.realtime_prio, in cmd_top()
1468 OPT_INTEGER('d', "delay", &top.delay_secs, in cmd_top()
1470 OPT_BOOLEAN('D', "dump-symtab", &top.dump_symtab, in cmd_top()
1472 OPT_INTEGER('f', "count-filter", &top.count_filter, in cmd_top()
1478 OPT_STRING(0, "sym-annotate", &top.sym_filter, "symbol name", in cmd_top()
1480 OPT_BOOLEAN('z', "zero", &top.zero, "zero history across updates"), in cmd_top()
1481 OPT_CALLBACK('F', "freq", &top.record_opts, "freq or 'max'", in cmd_top()
1484 OPT_INTEGER('E', "entries", &top.print_entries, in cmd_top()
1486 OPT_BOOLEAN('U', "hide_user_symbols", &top.hide_user_symbols, in cmd_top()
1489 OPT_BOOLEAN(0, "tui", &top.use_tui, "Use the TUI interface"), in cmd_top()
1491 OPT_BOOLEAN(0, "stdio", &top.use_stdio, "Use the stdio interface"), in cmd_top()
1509 OPT_INTEGER(0, "max-stack", &top.max_stack, in cmd_top()
1523 OPT_BOOLEAN(0, "source", &top.annotation_opts.annotate_src, in cmd_top()
1525 OPT_BOOLEAN(0, "asm-raw", &top.annotation_opts.show_asm_raw, in cmd_top()
1529 OPT_BOOLEAN(0, "no-bpf-event", &top.record_opts.no_bpf_event, "do not record bpf events"), in cmd_top()
1530 OPT_STRING(0, "objdump", &top.annotation_opts.objdump_path, "path", in cmd_top()
1532 …OPT_STRING('M', "disassembler-style", &top.annotation_opts.disassembler_style, "disassembler style… in cmd_top()
1534 OPT_STRING(0, "prefix", &top.annotation_opts.prefix, "prefix", in cmd_top()
1536 OPT_STRING(0, "prefix-strip", &top.annotation_opts.prefix_strip, "N", in cmd_top()
1539 OPT_CALLBACK(0, "percent-limit", &top, "percent", in cmd_top()
1558 OPT_BOOLEAN(0, "overwrite", &top.record_opts.overwrite, in cmd_top()
1561 OPT_UINTEGER(0, "num-thread-synthesize", &top.nr_threads_synthesize, in cmd_top()
1563 OPT_CALLBACK('G', "cgroup", &top.evlist, "name", in cmd_top()
1573 OPT_BOOLEAN(0, "stitch-lbr", &top.stitch_lbr, in cmd_top()
1576 OPT_CALLBACK(0, "pfm-events", &top.evlist, "event", in cmd_top()
1580 OPTS_EVSWITCH(&top.evswitch), in cmd_top()
1584 "perf top [<options>]", in cmd_top()
1592 top.annotation_opts.min_pcnt = 5; in cmd_top()
1593 top.annotation_opts.context = 4; in cmd_top()
1595 top.evlist = evlist__new(); in cmd_top()
1596 if (top.evlist == NULL) in cmd_top()
1599 status = perf_config(perf_top_config, &top); in cmd_top()
1616 top.evlist->env = &perf_env; in cmd_top()
1626 if (annotate_check_args(&top.annotation_opts) < 0) in cmd_top()
1629 if (!top.evlist->core.nr_entries && in cmd_top()
1630 evlist__add_default(top.evlist) < 0) { in cmd_top()
1635 status = evswitch__init(&top.evswitch, top.evlist, stderr); in cmd_top()
1652 if (top.stitch_lbr && !(callchain_param.record_mode == CALLCHAIN_LBR)) { in cmd_top()
1669 if (top.use_stdio) in cmd_top()
1672 else if (top.use_tui) in cmd_top()
1678 if (setup_sorting(top.evlist) < 0) { in cmd_top()
1707 if (evlist__create_maps(top.evlist, target) < 0) { in cmd_top()
1714 if (top.delay_secs < 1) in cmd_top()
1715 top.delay_secs = 1; in cmd_top()
1722 top.sym_evsel = evlist__first(top.evlist); in cmd_top()
1736 annotation_config__init(&top.annotation_opts); in cmd_top()
1745 get_term_dimensions(&top.winsize); in cmd_top()
1746 if (top.print_entries == 0) { in cmd_top()
1747 perf_top__update_print_entries(&top); in cmd_top()
1751 top.session = perf_session__new(NULL, NULL); in cmd_top()
1752 if (IS_ERR(top.session)) { in cmd_top()
1753 status = PTR_ERR(top.session); in cmd_top()
1758 if (!top.record_opts.no_bpf_event) { in cmd_top()
1759 top.sb_evlist = evlist__new(); in cmd_top()
1761 if (top.sb_evlist == NULL) { in cmd_top()
1767 if (evlist__add_bpf_sb_event(top.sb_evlist, &perf_env)) { in cmd_top()
1775 if (evlist__start_sb_thread(top.sb_evlist, target)) { in cmd_top()
1780 status = __cmd_top(&top); in cmd_top()
1783 evlist__stop_sb_thread(top.sb_evlist); in cmd_top()
1786 evlist__delete(top.evlist); in cmd_top()
1787 perf_session__delete(top.session); in cmd_top()