builtin-top.c (820e9906cf64142169134f35b996108303cf22ca) builtin-top.c (7cc72553ac03ec20afe2dec91dce4624ccd379b8)
1// SPDX-License-Identifier: GPL-2.0-only
2/*
3 * builtin-top.c
4 *
5 * Builtin top command: Display a continuously updated profile of
6 * any workload, CPU or specific PID.
7 *
8 * Copyright (C) 2008, Red Hat Inc, Ingo Molnar <mingo@redhat.com>

--- 1257 unchanged lines hidden (view full) ---

1266 pr_debug("Couldn't synthesize BPF events: Pre-existing BPF programs won't have symbols resolved.\n");
1267
1268 ret = perf_event__synthesize_cgroups(&top->tool, perf_event__process,
1269 &top->session->machines.host);
1270 if (ret < 0)
1271 pr_debug("Couldn't synthesize cgroup events.\n");
1272
1273 machine__synthesize_threads(&top->session->machines.host, &opts->target,
1// SPDX-License-Identifier: GPL-2.0-only
2/*
3 * builtin-top.c
4 *
5 * Builtin top command: Display a continuously updated profile of
6 * any workload, CPU or specific PID.
7 *
8 * Copyright (C) 2008, Red Hat Inc, Ingo Molnar <mingo@redhat.com>

--- 1257 unchanged lines hidden (view full) ---

1266 pr_debug("Couldn't synthesize BPF events: Pre-existing BPF programs won't have symbols resolved.\n");
1267
1268 ret = perf_event__synthesize_cgroups(&top->tool, perf_event__process,
1269 &top->session->machines.host);
1270 if (ret < 0)
1271 pr_debug("Couldn't synthesize cgroup events.\n");
1272
1273 machine__synthesize_threads(&top->session->machines.host, &opts->target,
1274 top->evlist->core.threads, false,
1274 top->evlist->core.threads, true, false,
1275 top->nr_threads_synthesize);
1276
1277 if (top->nr_threads_synthesize > 1)
1278 perf_set_singlethreaded();
1279
1280 if (perf_hpp_list.socket) {
1281 ret = perf_env__read_cpu_topology_map(&perf_env);
1282 if (ret < 0) {

--- 330 unchanged lines hidden (view full) ---

1613 str_error_r(errno, errbuf, sizeof(errbuf)));
1614 }
1615 top.evlist->env = &perf_env;
1616
1617 argc = parse_options(argc, argv, options, top_usage, 0);
1618 if (argc)
1619 usage_with_options(top_usage, options);
1620
1275 top->nr_threads_synthesize);
1276
1277 if (top->nr_threads_synthesize > 1)
1278 perf_set_singlethreaded();
1279
1280 if (perf_hpp_list.socket) {
1281 ret = perf_env__read_cpu_topology_map(&perf_env);
1282 if (ret < 0) {

--- 330 unchanged lines hidden (view full) ---

1613 str_error_r(errno, errbuf, sizeof(errbuf)));
1614 }
1615 top.evlist->env = &perf_env;
1616
1617 argc = parse_options(argc, argv, options, top_usage, 0);
1618 if (argc)
1619 usage_with_options(top_usage, options);
1620
1621 status = symbol__validate_sym_arguments();
1622 if (status)
1623 goto out_delete_evlist;
1624
1621 if (annotate_check_args(&top.annotation_opts) < 0)
1622 goto out_delete_evlist;
1623
1624 if (!top.evlist->core.nr_entries &&
1625 evlist__add_default(top.evlist) < 0) {
1626 pr_err("Not enough memory for event selector list\n");
1627 goto out_delete_evlist;
1628 }

--- 152 unchanged lines hidden ---
1625 if (annotate_check_args(&top.annotation_opts) < 0)
1626 goto out_delete_evlist;
1627
1628 if (!top.evlist->core.nr_entries &&
1629 evlist__add_default(top.evlist) < 0) {
1630 pr_err("Not enough memory for event selector list\n");
1631 goto out_delete_evlist;
1632 }

--- 152 unchanged lines hidden ---