perf/core improvements and fixes:

perf stat:
 
   Srikar Dronamraju:
 
   - Fix a segmentation fault when using repeat forever.
 
   - Reset previous counts on repeat with interval.
 
 aarch64:
 
   James Clark:
 
   - Add PMU event JSON files for Cortex-A76 and Neoverse N1.
 
 PowerPC:
 
   Anju T Sudhakar:
 
   - Make 'trace_cycles' the default event for 'perf kvm record' in PowerPC.
 
 S/390:
 
   - Link libjvmti to tools/lib/string.o to have a weak strlcpy()
     implementation, providing previously unresolved symbol on s/390.
 
 perf test:
 
   Jiri Olsa:
 
   - Add libperf automated tests to 'make -C tools/perf build-test'.
 
   Colin Ian King:
 
   - Fix spelling mistake.
 
 Tree wide:
 
   Arnaldo Carvalho de Melo:
 
   - Some more header file sanitization.
 
 libperf:
 
   Jiri Olsa:
 
   - Add dependency on libperf for python.so binding.
 
 libtraceevent:
 
   Sakari Ailus:
 
   - Convert remaining %p[fF] users to %p[sS].
 
 Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
 -----BEGIN PGP SIGNATURE-----
 
 iHUEABYIAB0WIQR2GiIUctdOfX2qHhGyPKLppCJ+JwUCXYTUUAAKCRCyPKLppCJ+
 JxXzAP97DpoHp/oFD7rpPr51+8MLbPTMldeVdrXb3Yk9uX8qqQD/aqpNEeoIn3um
 9iqE3pwqNmJGHgY8xr/6eTd4SEISVA8=
 =Xucn
 -----END PGP SIGNATURE-----

Merge tag 'perf-core-for-mingo-5.4-20190920-2' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux into perf/urgent

Pull perf/core improvements and fixes from Arnaldo Carvalho de Melo:

perf stat:

  Srikar Dronamraju:

  - Fix a segmentation fault when using repeat forever.

  - Reset previous counts on repeat with interval.

aarch64:

  James Clark:

  - Add PMU event JSON files for Cortex-A76 and Neoverse N1.

PowerPC:

  Anju T Sudhakar:

  - Make 'trace_cycles' the default event for 'perf kvm record' in PowerPC.

S/390:

  - Link libjvmti to tools/lib/string.o to have a weak strlcpy()
    implementation, providing previously unresolved symbol on s/390.

perf test:

  Jiri Olsa:

  - Add libperf automated tests to 'make -C tools/perf build-test'.

  Colin Ian King:

  - Fix spelling mistake.

Tree wide:

  Arnaldo Carvalho de Melo:

  - Some more header file sanitization.

libperf:

  Jiri Olsa:

  - Add dependency on libperf for python.so binding.

libtraceevent:

  Sakari Ailus:

  - Convert remaining %p[fF] users to %p[sS].

Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Signed-off-by: Ingo Molnar <mingo@kernel.org>
This commit is contained in:
Ingo Molnar 2019-09-20 18:14:00 +02:00
commit 351a1f5c8a
180 changed files with 2763 additions and 2256 deletions

View File

@ -59,12 +59,12 @@ parser context.
The _tep_register_function()_ function registers a function name mapped to an
address and (optional) module. This mapping is used in case the function tracer
or events have "%pF" or "%pS" parameter in its format string. It is common to
pass in the kallsyms function names with their corresponding addresses with this
or events have "%pS" parameter in its format string. It is common to pass in
the kallsyms function names with their corresponding addresses with this
function. The _tep_ argument is the trace event parser context. The _name_ is
the name of the function, the string is copied internally. The _addr_ is
the start address of the function. The _mod_ is the kernel module
the function may be in (NULL for none).
the name of the function, the string is copied internally. The _addr_ is the
start address of the function. The _mod_ is the kernel module the function may
be in (NULL for none).
The _tep_register_print_string()_ function registers a string by the address
it was stored in the kernel. Some strings internal to the kernel with static

View File

@ -4367,10 +4367,20 @@ static struct tep_print_arg *make_bprint_args(char *fmt, void *data, int size, s
switch (*ptr) {
case 's':
case 'S':
case 'f':
case 'F':
case 'x':
break;
case 'f':
case 'F':
/*
* Pre-5.5 kernels use %pf and
* %pF for printing symbols
* while kernels since 5.5 use
* %pfw for fwnodes. So check
* %p[fF] isn't followed by 'w'.
*/
if (ptr[1] != 'w')
break;
/* fall through */
default:
/*
* Older kernels do not process
@ -4487,12 +4497,12 @@ get_bprint_format(void *data, int size __maybe_unused,
printk = find_printk(tep, addr);
if (!printk) {
if (asprintf(&format, "%%pf: (NO FORMAT FOUND at %llx)\n", addr) < 0)
if (asprintf(&format, "%%ps: (NO FORMAT FOUND at %llx)\n", addr) < 0)
return NULL;
return format;
}
if (asprintf(&format, "%s: %s", "%pf", printk->printk) < 0)
if (asprintf(&format, "%s: %s", "%ps", printk->printk) < 0)
return NULL;
return format;

View File

@ -567,7 +567,7 @@ all: shell_compatibility_test $(ALL_PROGRAMS) $(LANG_BINDINGS) $(OTHER_PROGRAMS)
# Create python binding output directory if not already present
_dummy := $(shell [ -d '$(OUTPUT)python' ] || mkdir -p '$(OUTPUT)python')
$(OUTPUT)python/perf.so: $(PYTHON_EXT_SRCS) $(PYTHON_EXT_DEPS) $(LIBTRACEEVENT_DYNAMIC_LIST)
$(OUTPUT)python/perf.so: $(PYTHON_EXT_SRCS) $(PYTHON_EXT_DEPS) $(LIBTRACEEVENT_DYNAMIC_LIST) $(LIBPERF)
$(QUIET_GEN)LDSHARED="$(CC) -pthread -shared" \
CFLAGS='$(CFLAGS)' LDFLAGS='$(LDFLAGS) $(LIBTRACEEVENT_DYNAMIC_LIST_LDFLAGS)' \
$(PYTHON_WORD) util/setup.py \

View File

@ -25,7 +25,7 @@
#include "../../util/evsel.h"
#include "../../util/pmu.h"
#include "../../util/cs-etm.h"
#include "../../util/util.h"
#include "../../util/util.h" // page_size
#include "../../util/session.h"
#include <errno.h>

View File

@ -16,7 +16,7 @@
#include "../../util/evsel.h"
#include "../../util/evlist.h"
#include "../../util/session.h"
#include "../../util/util.h"
#include "../../util/util.h" // page_size
#include "../../util/pmu.h"
#include "../../util/debug.h"
#include "../../util/auxtrace.h"

View File

@ -11,7 +11,6 @@
#include <dwarf-regs.h>
#include <linux/ptrace.h> /* for struct user_pt_regs */
#include <linux/stringify.h>
#include "util.h"
struct pt_regs_dwarfnum {
const char *name;

View File

@ -1,5 +1,7 @@
#include <stdio.h>
#include <stdlib.h>
#include <perf/cpumap.h>
#include <internal/cpumap.h>
#include <api/fs/fs.h>
#include "debug.h"
#include "header.h"
@ -29,7 +31,7 @@ char *get_cpuid_str(struct perf_pmu *pmu)
/* read midr from list of cpus mapped to this pmu */
cpus = perf_cpu_map__get(pmu->cpus);
for (cpu = 0; cpu < cpus->nr; cpu++) {
for (cpu = 0; cpu < perf_cpu_map__nr(cpus); cpu++) {
scnprintf(path, PATH_MAX, "%s/devices/system/cpu/cpu%d"MIDR,
sysfs, cpus->map[cpu]);

View File

@ -5,8 +5,8 @@
#include <libunwind.h>
#include "perf_regs.h"
#include "../../util/unwind.h"
#include "../../util/debug.h"
#endif
#include "../../util/debug.h"
int LIBUNWIND__ARCH_REG_ID(int regnum)
{

View File

@ -12,7 +12,6 @@
#include <linux/ptrace.h>
#include <linux/kernel.h>
#include <linux/stringify.h>
#include "util.h"
struct pt_regs_dwarfnum {
const char *name;

View File

@ -6,7 +6,6 @@
#include <string.h>
#include <linux/stringify.h>
#include "header.h"
#include "util.h"
#define mfspr(rn) ({unsigned long rval; \
asm volatile("mfspr %0," __stringify(rn) \

View File

@ -5,9 +5,11 @@
#include "util/debug.h"
#include "util/evsel.h"
#include "util/evlist.h"
#include "util/pmu.h"
#include "book3s_hv_exits.h"
#include "book3s_hcalls.h"
#include <subcmd/parse-options.h>
#define NR_TPS 4
@ -172,3 +174,46 @@ int cpu_isa_init(struct perf_kvm_stat *kvm, const char *cpuid __maybe_unused)
return ret;
}
/*
* Incase of powerpc architecture, pmu registers are programmable
* by guest kernel. So monitoring guest via host may not provide
* valid samples with default 'cycles' event. It is better to use
* 'trace_imc/trace_cycles' event for guest profiling, since it
* can track the guest instruction pointer in the trace-record.
*
* Function to parse the arguments and return appropriate values.
*/
int kvm_add_default_arch_event(int *argc, const char **argv)
{
const char **tmp;
bool event = false;
int i, j = *argc;
const struct option event_options[] = {
OPT_BOOLEAN('e', "event", &event, NULL),
OPT_END()
};
tmp = calloc(j + 1, sizeof(char *));
if (!tmp)
return -EINVAL;
for (i = 0; i < j; i++)
tmp[i] = argv[i];
parse_options(j, tmp, event_options, NULL, PARSE_OPT_KEEP_UNKNOWN);
if (!event) {
if (pmu_have_event("trace_imc", "trace_cycles")) {
argv[j++] = strdup("-e");
argv[j++] = strdup("trace_imc/trace_cycles/");
*argc += 2;
} else {
free(tmp);
return -EINVAL;
}
}
free(tmp);
return 0;
}

View File

@ -13,6 +13,7 @@
#include "util/callchain.h"
#include "util/debug.h"
#include "util/dso.h"
#include "util/event.h" // struct ip_callchain
#include "util/map.h"
#include "util/symbol.h"

View File

@ -4,7 +4,6 @@
* Copyright (C) 2015 Naveen N. Rao, IBM Corporation
*/
#include "debug.h"
#include "dso.h"
#include "symbol.h"
#include "map.h"

View File

@ -2,7 +2,7 @@
#include <unistd.h>
#include <stdio.h>
#include <string.h>
#include "util.h"
#include "util.h" // page_size
#include "machine.h"
#include "api/fs/fs.h"
#include "debug.h"

View File

@ -5,7 +5,6 @@
#include "evlist.h"
#include "evsel.h"
#include "arch-tests.h"
#include "util.h"
#include <signal.h>
#include <sys/mman.h>

View File

@ -15,7 +15,6 @@
#include "evlist.h"
#include "evsel.h"
#include "thread_map.h"
#include "cpumap.h"
#include "record.h"
#include "tsc.h"
#include "tests/tests.h"

View File

@ -13,7 +13,7 @@
#include "tests/tests.h"
#include "cloexec.h"
#include "event.h"
#include "util.h"
#include "util.h" // page_size
#include "arch-tests.h"
static u64 rdpmc(unsigned int counter)

View File

@ -1,6 +1,7 @@
// SPDX-License-Identifier: GPL-2.0
#include "../../../../arch/x86/include/asm/insn.h"
#include "archinsn.h"
#include "event.h"
#include "machine.h"
#include "thread.h"
#include "symbol.h"

View File

@ -3,6 +3,8 @@
#include <linux/string.h>
#include <linux/zalloc.h>
#include "../../util/event.h"
#include "../../util/synthetic-events.h"
#include "../../util/machine.h"
#include "../../util/tool.h"
#include "../../util/map.h"

View File

@ -22,7 +22,7 @@
#include "../../util/tsc.h"
#include "../../util/auxtrace.h"
#include "../../util/intel-bts.h"
#include "../../util/util.h"
#include "../../util/util.h" // page_size
#define KiB(x) ((x) * 1024)
#define MiB(x) ((x) * 1024 * 1024)

View File

@ -26,7 +26,7 @@
#include "../../util/record.h"
#include "../../util/target.h"
#include "../../util/tsc.h"
#include "../../util/util.h"
#include "../../util/util.h" // page_size
#include "../../util/intel-pt.h"
#define KiB(x) ((x) * 1024)

View File

@ -1,9 +1,10 @@
// SPDX-License-Identifier: GPL-2.0
#include <linux/types.h>
#include <linux/string.h>
#include <limits.h>
#include <stdlib.h>
#include "../../util/util.h"
#include "../../util/util.h" // page_size
#include "../../util/machine.h"
#include "../../util/map.h"
#include "../../util/symbol.h"

View File

@ -8,6 +8,8 @@
#include <linux/types.h>
#include <asm/barrier.h>
#include "../../../util/debug.h"
#include "../../../util/event.h"
#include "../../../util/synthetic-events.h"
#include "../../../util/tsc.h"
int perf_read_tsc_conversion(const struct perf_event_mmap_page *pc,

View File

@ -21,12 +21,12 @@
#include <sys/resource.h>
#include <sys/epoll.h>
#include <sys/eventfd.h>
#include <internal/cpumap.h>
#include <perf/cpumap.h>
#include "../util/stat.h"
#include <subcmd/parse-options.h>
#include "bench.h"
#include "cpumap.h"
#include <err.h>

View File

@ -76,12 +76,12 @@
#include <sys/epoll.h>
#include <sys/eventfd.h>
#include <sys/types.h>
#include <internal/cpumap.h>
#include <perf/cpumap.h>
#include "../util/stat.h"
#include <subcmd/parse-options.h>
#include "bench.h"
#include "cpumap.h"
#include <err.h>

View File

@ -20,13 +20,13 @@
#include <linux/kernel.h>
#include <linux/zalloc.h>
#include <sys/time.h>
#include <internal/cpumap.h>
#include <perf/cpumap.h>
#include "../util/stat.h"
#include <subcmd/parse-options.h>
#include "bench.h"
#include "futex.h"
#include "cpumap.h"
#include <err.h>

View File

@ -14,10 +14,10 @@
#include <linux/kernel.h>
#include <linux/zalloc.h>
#include <errno.h>
#include <internal/cpumap.h>
#include <perf/cpumap.h>
#include "bench.h"
#include "futex.h"
#include "cpumap.h"
#include <err.h>
#include <stdlib.h>

View File

@ -20,10 +20,10 @@
#include <linux/kernel.h>
#include <linux/time64.h>
#include <errno.h>
#include <internal/cpumap.h>
#include <perf/cpumap.h>
#include "bench.h"
#include "futex.h"
#include "cpumap.h"
#include <err.h>
#include <stdlib.h>

View File

@ -29,7 +29,8 @@ int bench_futex_wake_parallel(int argc __maybe_unused, const char **argv __maybe
#include <linux/time64.h>
#include <errno.h>
#include "futex.h"
#include "cpumap.h"
#include <internal/cpumap.h>
#include <perf/cpumap.h>
#include <err.h>
#include <stdlib.h>

View File

@ -20,10 +20,10 @@
#include <linux/kernel.h>
#include <linux/time64.h>
#include <errno.h>
#include <internal/cpumap.h>
#include <perf/cpumap.h>
#include "bench.h"
#include "futex.h"
#include "cpumap.h"
#include <err.h>
#include <stdlib.h>

View File

@ -9,7 +9,6 @@
/* For the CLR_() macros */
#include <pthread.h>
#include "../builtin.h"
#include <subcmd/parse-options.h>
#include "../util/cloexec.h"

View File

@ -10,9 +10,7 @@
*
*/
#include "../util/util.h"
#include <subcmd/parse-options.h>
#include "../builtin.h"
#include "bench.h"
/* Test groups of 20 processes spraying to 20 receivers */

View File

@ -9,9 +9,7 @@
* http://people.redhat.com/mingo/cfs-scheduler/tools/pipe-test-1m.c
* Ported to perf by Hitoshi Mitake <mitake@dcl.info.waseda.ac.jp>
*/
#include "../util/util.h"
#include <subcmd/parse-options.h>
#include "../builtin.h"
#include "bench.h"
#include <unistd.h>

View File

@ -27,6 +27,7 @@
#include "util/sort.h"
#include "util/hist.h"
#include "util/dso.h"
#include "util/machine.h"
#include "util/map.h"
#include "util/session.h"
#include "util/tool.h"

View File

@ -20,6 +20,7 @@
#include <sys/param.h>
#include "debug.h"
#include "builtin.h"
#include <perf/cpumap.h>
#include <subcmd/pager.h>
#include <subcmd/parse-options.h>
#include "map_symbol.h"

View File

@ -9,7 +9,6 @@
#include "util/cache.h"
#include <subcmd/parse-options.h>
#include "util/util.h"
#include "util/debug.h"
#include "util/config.h"
#include <linux/string.h>

View File

@ -5,8 +5,6 @@
*/
#include "builtin.h"
#include "util/util.h"
#include <linux/list.h>
#include "perf.h"

View File

@ -21,6 +21,7 @@
#include "util/auxtrace.h"
#include "util/jit.h"
#include "util/symbol.h"
#include "util/synthetic-events.h"
#include "util/thread.h"
#include <subcmd/parse-options.h>

View File

@ -17,9 +17,11 @@
#include "util/debug.h"
#include "util/tool.h"
#include "util/stat.h"
#include "util/synthetic-events.h"
#include "util/top.h"
#include "util/data.h"
#include "util/ordered-events.h"
#include "util/kvm-stat.h"
#include "ui/ui.h"
#include <sys/prctl.h>
@ -58,7 +60,6 @@ static const char *get_filename_for_perf_kvm(void)
}
#ifdef HAVE_KVM_STAT_SUPPORT
#include "util/kvm-stat.h"
void exit_event_get_key(struct evsel *evsel,
struct perf_sample *sample,
@ -1513,11 +1514,21 @@ perf_stat:
}
#endif /* HAVE_KVM_STAT_SUPPORT */
int __weak kvm_add_default_arch_event(int *argc __maybe_unused,
const char **argv __maybe_unused)
{
return 0;
}
static int __cmd_record(const char *file_name, int argc, const char **argv)
{
int rec_argc, i = 0, j;
int rec_argc, i = 0, j, ret;
const char **rec_argv;
ret = kvm_add_default_arch_event(&argc, argv);
if (ret)
return -EINVAL;
rec_argc = argc + 2;
rec_argv = calloc(rec_argc + 1, sizeof(char *));
rec_argv[i++] = strdup("record");

View File

@ -38,6 +38,7 @@
#include "util/trigger.h"
#include "util/perf-hooks.h"
#include "util/cpu-set-sched.h"
#include "util/synthetic-events.h"
#include "util/time-utils.h"
#include "util/units.h"
#include "util/bpf-event.h"
@ -1180,15 +1181,6 @@ static void workload_exec_failed_signal(int signo __maybe_unused,
static void snapshot_sig_handler(int sig);
static void alarm_sig_handler(int sig);
int __weak
perf_event__synth_time_conv(const struct perf_event_mmap_page *pc __maybe_unused,
struct perf_tool *tool __maybe_unused,
perf_event__handler_t process __maybe_unused,
struct machine *machine __maybe_unused)
{
return 0;
}
static const struct perf_event_mmap_page *
perf_evlist__pick_pc(struct evlist *evlist)
{

View File

@ -48,7 +48,7 @@
#include "util/auxtrace.h"
#include "util/units.h"
#include "util/branch.h"
#include "util/util.h"
#include "util/util.h" // perf_tip()
#include "ui/ui.h"
#include "ui/progress.h"

View File

@ -3,6 +3,7 @@
#include "perf.h"
#include "perf-sys.h"
#include "util/cpumap.h"
#include "util/evlist.h"
#include "util/evsel.h"
#include "util/symbol.h"
@ -23,6 +24,7 @@
#include "util/trace-event.h"
#include "util/debug.h"
#include "util/event.h"
#include <linux/kernel.h>
#include <linux/log2.h>
@ -36,6 +38,7 @@
#include <pthread.h>
#include <math.h>
#include <api/fs/fs.h>
#include <perf/cpumap.h>
#include <linux/time64.h>
#include <linux/ctype.h>

View File

@ -61,6 +61,7 @@
#include "util/tool.h"
#include "util/string2.h"
#include "util/metricgroup.h"
#include "util/synthetic-events.h"
#include "util/target.h"
#include "util/time-utils.h"
#include "util/top.h"
@ -540,8 +541,8 @@ try_again:
if (err < 0)
return err;
err = perf_stat_synthesize_config(&stat_config, NULL, evsel_list,
process_synthesized_event, is_pipe);
err = perf_event__synthesize_stat_events(&stat_config, NULL, evsel_list,
process_synthesized_event, is_pipe);
if (err < 0)
return err;
}
@ -822,18 +823,6 @@ static int perf_stat__get_core(struct perf_stat_config *config __maybe_unused,
return cpu_map__get_core(map, cpu, NULL);
}
static int cpu_map__get_max(struct perf_cpu_map *map)
{
int i, max = -1;
for (i = 0; i < map->nr; i++) {
if (map->map[i] > max)
max = map->map[i];
}
return max;
}
static int perf_stat__get_aggr(struct perf_stat_config *config,
aggr_get_id_t get_id, struct perf_cpu_map *map, int idx)
{
@ -928,7 +917,7 @@ static int perf_stat_init_aggr_mode(void)
* taking the highest cpu number to be the size of
* the aggregation translate cpumap.
*/
nr = cpu_map__get_max(evsel_list->core.cpus);
nr = perf_cpu_map__max(evsel_list->core.cpus);
stat_config.cpus_aggr_map = perf_cpu_map__empty_new(nr + 1);
return stat_config.cpus_aggr_map ? 0 : -ENOMEM;
}
@ -1963,8 +1952,11 @@ int cmd_stat(int argc, const char **argv)
fprintf(output, "[ perf stat: executing run #%d ... ]\n",
run_idx + 1);
if (run_idx != 0)
perf_evlist__reset_prev_raw_counts(evsel_list);
status = run_perf_stat(argc, argv, run_idx);
if (forever && status != -1) {
if (forever && status != -1 && !interval) {
print_counters(NULL, argc, argv);
perf_stat__reset_stats();
}

View File

@ -32,6 +32,7 @@
#include "util/map.h"
#include "util/session.h"
#include "util/symbol.h"
#include "util/synthetic-events.h"
#include "util/top.h"
#include "util/util.h"
#include <linux/rbtree.h>

View File

@ -28,6 +28,7 @@
#include "util/dso.h"
#include "util/env.h"
#include "util/event.h"
#include "util/synthetic-events.h"
#include "util/evlist.h"
#include "util/evswitch.h"
#include <subcmd/pager.h>

View File

@ -1,8 +1,17 @@
jvmti-y += libjvmti.o
jvmti-y += jvmti_agent.o
# For strlcpy
jvmti-y += libstring.o
CFLAGS_jvmti = -fPIC -DPIC -I$(JDIR)/include -I$(JDIR)/include/linux
CFLAGS_REMOVE_jvmti = -Wmissing-declarations
CFLAGS_REMOVE_jvmti += -Wstrict-prototypes
CFLAGS_REMOVE_jvmti += -Wextra
CFLAGS_REMOVE_jvmti += -Wwrite-strings
CFLAGS_libstring.o += -Wno-unused-parameter -DETC_PERFCONFIG="BUILD_STR($(ETC_PERFCONFIG_SQ))"
$(OUTPUT)jvmti/libstring.o: ../lib/string.c FORCE
$(call rule_mkdir)
$(call if_changed_dep,cc_o_c)

View File

@ -146,6 +146,7 @@ install_headers:
$(call do_install,include/perf/threadmap.h,$(prefix)/include/perf,644); \
$(call do_install,include/perf/evlist.h,$(prefix)/include/perf,644); \
$(call do_install,include/perf/evsel.h,$(prefix)/include/perf,644);
$(call do_install,include/perf/event.h,$(prefix)/include/perf,644);
install_pkgconfig: $(LIBPERF_PC)
$(call QUIET_INSTALL, $(LIBPERF_PC)) \

View File

@ -260,3 +260,15 @@ int perf_cpu_map__idx(struct perf_cpu_map *cpus, int cpu)
return -1;
}
int perf_cpu_map__max(struct perf_cpu_map *map)
{
int i, max = -1;
for (i = 0; i < map->nr; i++) {
if (map->map[i] > max)
max = map->map[i];
}
return max;
}

View File

@ -16,6 +16,7 @@ LIBPERF_API void perf_cpu_map__put(struct perf_cpu_map *map);
LIBPERF_API int perf_cpu_map__cpu(const struct perf_cpu_map *cpus, int idx);
LIBPERF_API int perf_cpu_map__nr(const struct perf_cpu_map *cpus);
LIBPERF_API bool perf_cpu_map__empty(const struct perf_cpu_map *map);
LIBPERF_API int perf_cpu_map__max(struct perf_cpu_map *map);
#define perf_cpu_map__for_each_cpu(cpu, idx, cpus) \
for ((idx) = 0, (cpu) = perf_cpu_map__cpu(cpus, idx); \

View File

@ -9,6 +9,7 @@ LIBPERF_0.0.1 {
perf_cpu_map__nr;
perf_cpu_map__cpu;
perf_cpu_map__empty;
perf_cpu_map__max;
perf_thread_map__new_dummy;
perf_thread_map__set_pid;
perf_thread_map__comm;

View File

@ -20,7 +20,7 @@
#include "util/bpf-loader.h"
#include "util/debug.h"
#include "util/event.h"
#include "util/util.h"
#include "util/util.h" // page_size, usage()
#include "ui/ui.h"
#include "perf-sys.h"
#include <api/fs/fs.h>

View File

@ -0,0 +1,14 @@
[
{
"PublicDescription": "Mispredicted or not predicted branch speculatively executed. This event counts any predictable branch instruction which is mispredicted either due to dynamic misprediction or because the MMU is off and the branches are statically predicted not taken.",
"EventCode": "0x10",
"EventName": "BR_MIS_PRED",
"BriefDescription": "Mispredicted or not predicted branch speculatively executed."
},
{
"PublicDescription": "Predictable branch speculatively executed. This event counts all predictable branches.",
"EventCode": "0x12",
"EventName": "BR_PRED",
"BriefDescription": "Predictable branch speculatively executed."
}
]

View File

@ -0,0 +1,24 @@
[
{
"EventCode": "0x11",
"EventName": "CPU_CYCLES",
"BriefDescription": "The number of core clock cycles."
},
{
"PublicDescription": "Bus access. This event counts for every beat of data transferred over the data channels between the core and the SCU. If both read and write data beats are transferred on a given cycle, this event is counted twice on that cycle. This event counts the sum of BUS_ACCESS_RD and BUS_ACCESS_WR.",
"EventCode": "0x19",
"EventName": "BUS_ACCESS",
"BriefDescription": "Bus access."
},
{
"EventCode": "0x1D",
"EventName": "BUS_CYCLES",
"BriefDescription": "Bus cycles. This event duplicates CPU_CYCLES."
},
{
"ArchStdEvent": "BUS_ACCESS_RD"
},
{
"ArchStdEvent": "BUS_ACCESS_WR"
}
]

View File

@ -0,0 +1,207 @@
[
{
"PublicDescription": "L1 instruction cache refill. This event counts any instruction fetch which misses in the cache.",
"EventCode": "0x01",
"EventName": "L1I_CACHE_REFILL",
"BriefDescription": "L1 instruction cache refill"
},
{
"PublicDescription": "L1 instruction TLB refill. This event counts any refill of the instruction L1 TLB from the L2 TLB. This includes refills that result in a translation fault.",
"EventCode": "0x02",
"EventName": "L1I_TLB_REFILL",
"BriefDescription": "L1 instruction TLB refill"
},
{
"PublicDescription": "L1 data cache refill. This event counts any load or store operation or page table walk access which causes data to be read from outside the L1, including accesses which do not allocate into L1.",
"EventCode": "0x03",
"EventName": "L1D_CACHE_REFILL",
"BriefDescription": "L1 data cache refill"
},
{
"PublicDescription": "L1 data cache access. This event counts any load or store operation or page table walk access which looks up in the L1 data cache. In particular, any access which could count the L1D_CACHE_REFILL event causes this event to count.",
"EventCode": "0x04",
"EventName": "L1D_CACHE",
"BriefDescription": "L1 data cache access"
},
{
"PublicDescription": "L1 data TLB refill. This event counts any refill of the data L1 TLB from the L2 TLB. This includes refills that result in a translation fault.",
"EventCode": "0x05",
"EventName": "L1D_TLB_REFILL",
"BriefDescription": "L1 data TLB refill"
},
{
"PublicDescription": "Level 1 instruction cache access or Level 0 Macro-op cache access. This event counts any instruction fetch which accesses the L1 instruction cache or L0 Macro-op cache.",
"EventCode": "0x14",
"EventName": "L1I_CACHE",
"BriefDescription": "L1 instruction cache access"
},
{
"PublicDescription": "L1 data cache Write-Back. This event counts any write-back of data from the L1 data cache to L2 or L3. This counts both victim line evictions and snoops, including cache maintenance operations.",
"EventCode": "0x15",
"EventName": "L1D_CACHE_WB",
"BriefDescription": "L1 data cache Write-Back"
},
{
"PublicDescription": "L2 data cache access. This event counts any transaction from L1 which looks up in the L2 cache, and any write-back from the L1 to the L2. Snoops from outside the core and cache maintenance operations are not counted.",
"EventCode": "0x16",
"EventName": "L2D_CACHE",
"BriefDescription": "L2 data cache access"
},
{
"PublicDescription": "L2 data cache refill. This event counts any cacheable transaction from L1 which causes data to be read from outside the core. L2 refills caused by stashes into L2 should not be counted",
"EventCode": "0x17",
"EventName": "L2D_CACHE_REFILL",
"BriefDescription": "L2 data cache refill"
},
{
"PublicDescription": "L2 data cache write-back. This event counts any write-back of data from the L2 cache to outside the core. This includes snoops to the L2 which return data, regardless of whether they cause an invalidation. Invalidations from the L2 which do not write data outside of the core and snoops which return data from the L1 are not counted",
"EventCode": "0x18",
"EventName": "L2D_CACHE_WB",
"BriefDescription": "L2 data cache write-back"
},
{
"PublicDescription": "L2 data cache allocation without refill. This event counts any full cache line write into the L2 cache which does not cause a linefill, including write-backs from L1 to L2 and full-line writes which do not allocate into L1.",
"EventCode": "0x20",
"EventName": "L2D_CACHE_ALLOCATE",
"BriefDescription": "L2 data cache allocation without refill"
},
{
"PublicDescription": "Level 1 data TLB access. This event counts any load or store operation which accesses the data L1 TLB. If both a load and a store are executed on a cycle, this event counts twice. This event counts regardless of whether the MMU is enabled.",
"EventCode": "0x25",
"EventName": "L1D_TLB",
"BriefDescription": "Level 1 data TLB access."
},
{
"PublicDescription": "Level 1 instruction TLB access. This event counts any instruction fetch which accesses the instruction L1 TLB.This event counts regardless of whether the MMU is enabled.",
"EventCode": "0x26",
"EventName": "L1I_TLB",
"BriefDescription": "Level 1 instruction TLB access"
},
{
"PublicDescription": "This event counts any full cache line write into the L3 cache which does not cause a linefill, including write-backs from L2 to L3 and full-line writes which do not allocate into L2",
"EventCode": "0x29",
"EventName": "L3D_CACHE_ALLOCATE",
"BriefDescription": "Allocation without refill"
},
{
"PublicDescription": "Attributable Level 3 unified cache refill. This event counts for any cacheable read transaction returning datafrom the SCU for which the data source was outside the cluster. Transactions such as ReadUnique are counted here as 'read' transactions, even though they can be generated by store instructions.",
"EventCode": "0x2A",
"EventName": "L3D_CACHE_REFILL",
"BriefDescription": "Attributable Level 3 unified cache refill."
},
{
"PublicDescription": "Attributable Level 3 unified cache access. This event counts for any cacheable read transaction returning datafrom the SCU, or for any cacheable write to the SCU.",
"EventCode": "0x2B",
"EventName": "L3D_CACHE",
"BriefDescription": "Attributable Level 3 unified cache access."
},
{
"PublicDescription": "Attributable L2 data or unified TLB refill. This event counts on anyrefill of the L2 TLB, caused by either an instruction or data access.This event does not count if the MMU is disabled.",
"EventCode": "0x2D",
"EventName": "L2D_TLB_REFILL",
"BriefDescription": "Attributable L2 data or unified TLB refill"
},
{
"PublicDescription": "Attributable L2 data or unified TLB access. This event counts on any access to the L2 TLB (caused by a refill of any of the L1 TLBs). This event does not count if the MMU is disabled.",
"EventCode": "0x2F",
"EventName": "L2D_TLB",
"BriefDescription": "Attributable L2 data or unified TLB access"
},
{
"PublicDescription": "Access to data TLB that caused a page table walk. This event counts on any data access which causes L2D_TLB_REFILL to count.",
"EventCode": "0x34",
"EventName": "DTLB_WALK",
"BriefDescription": "Access to data TLB that caused a page table walk."
},
{
"PublicDescription": "Access to instruction TLB that caused a page table walk. This event counts on any instruction access which causes L2D_TLB_REFILL to count.",
"EventCode": "0x35",
"EventName": "ITLB_WALK",
"BriefDescription": "Access to instruction TLB that caused a page table walk."
},
{
"EventCode": "0x36",
"EventName": "LL_CACHE_RD",
"BriefDescription": "Last level cache access, read"
},
{
"EventCode": "0x37",
"EventName": "LL_CACHE_MISS_RD",
"BriefDescription": "Last level cache miss, read"
},
{
"ArchStdEvent": "L1D_CACHE_INVAL"
},
{
"ArchStdEvent": "L1D_CACHE_RD"
},
{
"ArchStdEvent": "L1D_CACHE_REFILL_INNER"
},
{
"ArchStdEvent": "L1D_CACHE_REFILL_OUTER"
},
{
"ArchStdEvent": "L1D_CACHE_REFILL_RD"
},
{
"ArchStdEvent": "L1D_CACHE_REFILL_WR"
},
{
"ArchStdEvent": "L1D_CACHE_WB_CLEAN"
},
{
"ArchStdEvent": "L1D_CACHE_WB_VICTIM"
},
{
"ArchStdEvent": "L1D_CACHE_WR"
},
{
"ArchStdEvent": "L1D_TLB_RD"
},
{
"ArchStdEvent": "L1D_TLB_REFILL_RD"
},
{
"ArchStdEvent": "L1D_TLB_REFILL_WR"
},
{
"ArchStdEvent": "L1D_TLB_WR"
},
{
"ArchStdEvent": "L2D_CACHE_INVAL"
},
{
"ArchStdEvent": "L2D_CACHE_RD"
},
{
"ArchStdEvent": "L2D_CACHE_REFILL_RD"
},
{
"ArchStdEvent": "L2D_CACHE_REFILL_WR"
},
{
"ArchStdEvent": "L2D_CACHE_WB_CLEAN"
},
{
"ArchStdEvent": "L2D_CACHE_WB_VICTIM"
},
{
"ArchStdEvent": "L2D_CACHE_WR"
},
{
"ArchStdEvent": "L2D_TLB_RD"
},
{
"ArchStdEvent": "L2D_TLB_REFILL_RD"
},
{
"ArchStdEvent": "L2D_TLB_REFILL_WR"
},
{
"ArchStdEvent": "L2D_TLB_WR"
},
{
"ArchStdEvent": "L3D_CACHE_RD"
}
]

View File

@ -0,0 +1,52 @@
[
{
"EventCode": "0x09",
"EventName": "EXC_TAKEN",
"BriefDescription": "Exception taken."
},
{
"PublicDescription": "Local memory error. This event counts any correctable or uncorrectable memory error (ECC or parity) in the protected core RAMs",
"EventCode": "0x1A",
"EventName": "MEMORY_ERROR",
"BriefDescription": "Local memory error."
},
{
"ArchStdEvent": "EXC_DABORT"
},
{
"ArchStdEvent": "EXC_FIQ"
},
{
"ArchStdEvent": "EXC_HVC"
},
{
"ArchStdEvent": "EXC_IRQ"
},
{
"ArchStdEvent": "EXC_PABORT"
},
{
"ArchStdEvent": "EXC_SMC"
},
{
"ArchStdEvent": "EXC_SVC"
},
{
"ArchStdEvent": "EXC_TRAP_DABORT"
},
{
"ArchStdEvent": "EXC_TRAP_FIQ"
},
{
"ArchStdEvent": "EXC_TRAP_IRQ"
},
{
"ArchStdEvent": "EXC_TRAP_OTHER"
},
{
"ArchStdEvent": "EXC_TRAP_PABORT"
},
{
"ArchStdEvent": "EXC_UNDEF"
}
]

View File

@ -0,0 +1,108 @@
[
{
"PublicDescription": "Software increment. Instruction architecturally executed (condition code check pass).",
"EventCode": "0x00",
"EventName": "SW_INCR",
"BriefDescription": "Software increment."
},
{
"PublicDescription": "Instruction architecturally executed. This event counts all retired instructions, including those that fail their condition check.",
"EventCode": "0x08",
"EventName": "INST_RETIRED",
"BriefDescription": "Instruction architecturally executed."
},
{
"EventCode": "0x0A",
"EventName": "EXC_RETURN",
"BriefDescription": "Instruction architecturally executed, condition code check pass, exception return."
},
{
"PublicDescription": "Instruction architecturally executed, condition code check pass, write to CONTEXTIDR. This event only counts writes to CONTEXTIDR in AArch32 state, and via the CONTEXTIDR_EL1 mnemonic in AArch64 state.",
"EventCode": "0x0B",
"EventName": "CID_WRITE_RETIRED",
"BriefDescription": "Instruction architecturally executed, condition code check pass, write to CONTEXTIDR."
},
{
"EventCode": "0x1B",
"EventName": "INST_SPEC",
"BriefDescription": "Operation speculatively executed"
},
{
"PublicDescription": "Instruction architecturally executed, condition code check pass, write to TTBR. This event only counts writes to TTBR0/TTBR1 in AArch32 state and TTBR0_EL1/TTBR1_EL1 in AArch64 state.",
"EventCode": "0x1C",
"EventName": "TTBR_WRITE_RETIRED",
"BriefDescription": "Instruction architecturally executed, condition code check pass, write to TTBR"
},
{
"PublicDescription": "Instruction architecturally executed, branch. This event counts all branches, taken or not. This excludes exception entries, debug entries and CCFAIL branches.",
"EventCode": "0x21",
"EventName": "BR_RETIRED",
"BriefDescription": "Instruction architecturally executed, branch."
},
{
"PublicDescription": "Instruction architecturally executed, mispredicted branch. This event counts any branch counted by BR_RETIRED which is not correctly predicted and causes a pipeline flush.",
"EventCode": "0x22",
"EventName": "BR_MIS_PRED_RETIRED",
"BriefDescription": "Instruction architecturally executed, mispredicted branch."
},
{
"ArchStdEvent": "ASE_SPEC"
},
{
"ArchStdEvent": "BR_IMMED_SPEC"
},
{
"ArchStdEvent": "BR_INDIRECT_SPEC"
},
{
"ArchStdEvent": "BR_RETURN_SPEC"
},
{
"ArchStdEvent": "CRYPTO_SPEC"
},
{
"ArchStdEvent": "DMB_SPEC"
},
{
"ArchStdEvent": "DP_SPEC"
},
{
"ArchStdEvent": "DSB_SPEC"
},
{
"ArchStdEvent": "ISB_SPEC"
},
{
"ArchStdEvent": "LDREX_SPEC"
},
{
"ArchStdEvent": "LDST_SPEC"
},
{
"ArchStdEvent": "LD_SPEC"
},
{
"ArchStdEvent": "PC_WRITE_SPEC"
},
{
"ArchStdEvent": "RC_LD_SPEC"
},
{
"ArchStdEvent": "RC_ST_SPEC"
},
{
"ArchStdEvent": "STREX_FAIL_SPEC"
},
{
"ArchStdEvent": "STREX_PASS_SPEC"
},
{
"ArchStdEvent": "STREX_SPEC"
},
{
"ArchStdEvent": "ST_SPEC"
},
{
"ArchStdEvent": "VFP_SPEC"
}
]

View File

@ -0,0 +1,23 @@
[
{
"PublicDescription": "Data memory access. This event counts memory accesses due to load or store instructions. This event counts the sum of MEM_ACCESS_RD and MEM_ACCESS_WR.",
"EventCode": "0x13",
"EventName": "MEM_ACCESS",
"BriefDescription": "Data memory access"
},
{
"ArchStdEvent": "MEM_ACCESS_RD"
},
{
"ArchStdEvent": "MEM_ACCESS_WR"
},
{
"ArchStdEvent": "UNALIGNED_LD_SPEC"
},
{
"ArchStdEvent": "UNALIGNED_ST_SPEC"
},
{
"ArchStdEvent": "UNALIGNED_LDST_SPEC"
}
]

View File

@ -0,0 +1,7 @@
[
{
"EventCode": "0x31",
"EventName": "REMOTE_ACCESS",
"BriefDescription": "Access to another socket in a multi-socket system"
}
]

View File

@ -0,0 +1,14 @@
[
{
"PublicDescription": "No operation issued because of the frontend. The counter counts on any cycle when there are no fetched instructions available to dispatch.",
"EventCode": "0x23",
"EventName": "STALL_FRONTEND",
"BriefDescription": "No operation issued because of the frontend."
},
{
"PublicDescription": "No operation issued because of the backend. The counter counts on any cycle fetched instructions are not dispatched due to resource constraints.",
"EventCode": "0x24",
"EventName": "STALL_BACKEND",
"BriefDescription": "No operation issued because of the backend."
}
]

View File

@ -16,6 +16,8 @@
0x00000000420f1000,v1,arm/cortex-a53,core
0x00000000410fd070,v1,arm/cortex-a57-a72,core
0x00000000410fd080,v1,arm/cortex-a57-a72,core
0x00000000410fd0b0,v1,arm/cortex-a76-n1,core
0x00000000410fd0c0,v1,arm/cortex-a76-n1,core
0x00000000420f5160,v1,cavium/thunderx2,core
0x00000000430f0af0,v1,cavium/thunderx2,core
0x00000000480fd010,v1,hisilicon/hip08,core

1 # Format:
16 0x00000000420f1000,v1,arm/cortex-a53,core
17 0x00000000410fd070,v1,arm/cortex-a57-a72,core
18 0x00000000410fd080,v1,arm/cortex-a57-a72,core
19 0x00000000410fd0b0,v1,arm/cortex-a76-n1,core
20 0x00000000410fd0c0,v1,arm/cortex-a76-n1,core
21 0x00000000420f5160,v1,cavium/thunderx2,core
22 0x00000000430f0af0,v1,cavium/thunderx2,core
23 0x00000000480fd010,v1,hisilicon/hip08,core

View File

@ -2,8 +2,8 @@
#include <linux/compiler.h>
#include <linux/bitmap.h>
#include <perf/cpumap.h>
#include <internal/cpumap.h>
#include "tests.h"
#include "cpumap.h"
#include "debug.h"
#define NBITS 100

View File

@ -1,7 +1,5 @@
// SPDX-License-Identifier: GPL-2.0
#include "tests.h"
#include "debug.h"
#include "util.h"
#include "c++/clang-c.h"
#include <linux/kernel.h>

View File

@ -19,12 +19,12 @@
#include "evlist.h"
#include "evsel.h"
#include "thread_map.h"
#include "cpumap.h"
#include "machine.h"
#include "map.h"
#include "symbol.h"
#include "event.h"
#include "record.h"
#include "util/synthetic-events.h"
#include "thread.h"
#include "tests.h"

View File

@ -3,6 +3,7 @@
#include <stdio.h>
#include "cpumap.h"
#include "event.h"
#include "util/synthetic-events.h"
#include <string.h>
#include <linux/bitops.h>
#include <perf/cpumap.h>

View File

@ -10,7 +10,6 @@
#include <sys/resource.h>
#include <api/fs/fs.h>
#include "dso.h"
#include "util.h"
#include "machine.h"
#include "symbol.h"
#include "tests.h"

View File

@ -15,6 +15,7 @@
#include "symbol.h"
#include "thread.h"
#include "callchain.h"
#include "util/synthetic-events.h"
#if defined (__x86_64__) || defined (__i386__) || defined (__powerpc__)
#include "arch-tests.h"

View File

@ -9,7 +9,6 @@
#include "tests.h"
#include "evlist.h"
#include "evsel.h"
#include "util.h"
#include "debug.h"
#include "parse-events.h"
#include "thread_map.h"

View File

@ -2,10 +2,12 @@
#include <linux/compiler.h>
#include <perf/cpumap.h>
#include <string.h>
#include "cpumap.h"
#include "evlist.h"
#include "evsel.h"
#include "header.h"
#include "machine.h"
#include "util/synthetic-events.h"
#include "tool.h"
#include "tests.h"
#include "debug.h"
@ -92,7 +94,7 @@ int test__event_update(struct test *test __maybe_unused, int subtest __maybe_unu
evsel = perf_evlist__first(evlist);
TEST_ASSERT_VAL("failed to allos ids",
TEST_ASSERT_VAL("failed to allocate ids",
!perf_evsel__alloc_id(evsel, 1, 1));
perf_evlist__id_add(evlist, evsel, 0, 0, 123);

View File

@ -2,6 +2,7 @@
#include <inttypes.h>
#include "util/debug.h"
#include "util/dso.h"
#include "util/event.h" // struct perf_sample
#include "util/map.h"
#include "util/symbol.h"
#include "util/sort.h"
@ -10,6 +11,7 @@
#include "util/thread.h"
#include "tests/hists_common.h"
#include <linux/kernel.h>
#include <linux/perf_event.h>
static struct {
u32 pid;

View File

@ -12,7 +12,6 @@
#include "evsel.h"
#include "record.h"
#include "thread_map.h"
#include "cpumap.h"
#include "tests.h"
#define CHECK__(x) { \
@ -143,7 +142,7 @@ int test__keep_tracking(struct test *test __maybe_unused, int subtest __maybe_un
found = find_comm(evlist, comm);
if (found != 1) {
pr_debug("Seconf time, failed to find tracking event.\n");
pr_debug("Second time, failed to find tracking event.\n");
goto out_err;
}

View File

@ -7,7 +7,6 @@
#include "llvm.h"
#include "tests.h"
#include "debug.h"
#include "util.h"
#ifdef HAVE_LIBBPF_SUPPORT
static int test__bpf_parsing(void *obj_buf, size_t obj_buf_sz)

View File

@ -327,6 +327,10 @@ make_kernelsrc_tools:
(make -C ../../tools $(PARALLEL_OPT) $(K_O_OPT) perf) > $@ 2>&1 && \
test -x $(KERNEL_O)/tools/perf/perf && rm -f $@ || (cat $@ ; false)
make_libperf:
@echo "- make -C lib";
make -C lib clean >$@ 2>&1; make -C lib >>$@ 2>&1 && rm $@
FEATURES_DUMP_FILE := $(FULL_O)/BUILD_TEST_FEATURE_DUMP
FEATURES_DUMP_FILE_STATIC := $(FULL_O)/BUILD_TEST_FEATURE_DUMP_STATIC
@ -365,5 +369,5 @@ $(foreach t,$(run),$(if $(findstring make_static,$(t)),\
$(eval $(t) := $($(t)) FEATURES_DUMP=$(FEATURES_DUMP_FILE))))
endif
.PHONY: all $(run) $(run_O) tarpkg clean make_kernelsrc make_kernelsrc_tools
.PHONY: all $(run) $(run_O) tarpkg clean make_kernelsrc make_kernelsrc_tools make_libperf
endif # ifndef MK

View File

@ -4,7 +4,7 @@
#include <linux/kernel.h>
#include <linux/zalloc.h>
#include <perf/cpumap.h>
#include "cpumap.h"
#include <internal/cpumap.h>
#include "debug.h"
#include "env.h"
#include "mem2node.h"

View File

@ -10,7 +10,6 @@
#include "evlist.h"
#include "evsel.h"
#include "thread_map.h"
#include "cpumap.h"
#include "tests.h"
#include <linux/err.h>
#include <linux/kernel.h>
@ -53,7 +52,7 @@ int test__basic_mmap(struct test *test __maybe_unused, int subtest __maybe_unuse
cpus = perf_cpu_map__new(NULL);
if (cpus == NULL) {
pr_debug("cpu_map__new\n");
pr_debug("perf_cpu_map__new\n");
goto out_free_threads;
}

View File

@ -8,13 +8,15 @@
#include <stdlib.h>
#include <stdio.h>
#include "debug.h"
#include "event.h"
#include "tests.h"
#include "machine.h"
#include "thread_map.h"
#include "map.h"
#include "symbol.h"
#include "util/synthetic-events.h"
#include "thread.h"
#include "util.h"
#include "util.h" // page_size
#define THREADS 4

View File

@ -14,7 +14,8 @@
#include "evsel.h"
#include "tests.h"
#include "thread_map.h"
#include "cpumap.h"
#include <perf/cpumap.h>
#include <internal/cpumap.h>
#include "debug.h"
#include "stat.h"
#include "util/counts.h"
@ -37,7 +38,7 @@ int test__openat_syscall_event_on_all_cpus(struct test *test __maybe_unused, int
cpus = perf_cpu_map__new(NULL);
if (cpus == NULL) {
pr_debug("cpu_map__new\n");
pr_debug("perf_cpu_map__new\n");
goto out_thread_map_delete;
}

View File

@ -6,7 +6,6 @@
#include "tests.h"
#include "debug.h"
#include "pmu.h"
#include "util.h"
#include <dirent.h>
#include <errno.h>
#include <sys/types.h>

View File

@ -1,4 +1,3 @@
// SPDX-License-Identifier: GPL-2.0
#include <linux/kernel.h>
#include <linux/types.h>
#include <stddef.h>
@ -8,7 +7,6 @@
#include "event.h"
#include "evlist.h"
#include "header.h"
#include "util.h"
#include "debug.h"
static int process_event(struct evlist **pevlist, union perf_event *event)

View File

@ -4,7 +4,6 @@
#include "tests.h"
#include "debug.h"
#include "util.h"
#include "perf-hooks.h"
static void sigsegv_handler(int sig __maybe_unused)

View File

@ -1,7 +1,6 @@
// SPDX-License-Identifier: GPL-2.0
#include "parse-events.h"
#include "pmu.h"
#include "util.h"
#include "tests.h"
#include <errno.h>
#include <stdio.h>

View File

@ -9,10 +9,10 @@
#include "map_symbol.h"
#include "branch.h"
#include "util.h"
#include "event.h"
#include "evsel.h"
#include "debug.h"
#include "util/synthetic-events.h"
#include "tests.h"

View File

@ -5,6 +5,7 @@
#include "stat.h"
#include "counts.h"
#include "debug.h"
#include "util/synthetic-events.h"
static bool has_term(struct perf_record_stat_config *config,
u64 tag, u64 val)

View File

@ -14,7 +14,6 @@
#include "evlist.h"
#include "evsel.h"
#include "thread_map.h"
#include "cpumap.h"
#include "record.h"
#include "tests.h"

View File

@ -4,12 +4,12 @@
#include "evsel.h"
#include "target.h"
#include "thread_map.h"
#include "cpumap.h"
#include "tests.h"
#include <errno.h>
#include <signal.h>
#include <linux/string.h>
#include <perf/cpumap.h>
#include <perf/evlist.h>
static int exited;

View File

@ -8,6 +8,7 @@
#include "thread_map.h"
#include "debug.h"
#include "event.h"
#include "util/synthetic-events.h"
#include <linux/zalloc.h>
#include <perf/event.h>

View File

@ -3,8 +3,8 @@
#include <stdlib.h>
#include <stdio.h>
#include <perf/cpumap.h>
#include "cpumap.h"
#include "tests.h"
#include "util.h"
#include "session.h"
#include "evlist.h"
#include "debug.h"

View File

@ -7,7 +7,7 @@
#include "dso.h"
#include "map.h"
#include "symbol.h"
#include "util.h"
#include "util.h" // page_size
#include "tests.h"
#include "debug.h"
#include "machine.h"

View File

@ -1,5 +1,4 @@
// SPDX-License-Identifier: GPL-2.0
#include "../util/util.h"
#include "../util/string2.h"
#include "../util/config.h"
#include "libslang.h"

View File

@ -2,7 +2,6 @@
#include "../browser.h"
#include "../helpline.h"
#include "../ui.h"
#include "../util.h"
#include "../../util/annotate.h"
#include "../../util/debug.h"
#include "../../util/dso.h"

View File

@ -1,5 +1,4 @@
// SPDX-License-Identifier: GPL-2.0
#include "util/debug.h"
#include "ui/browser.h"
#include "ui/keysyms.h"
#include "ui/ui.h"

View File

@ -5,7 +5,6 @@
#include <stdlib.h>
#include <string.h>
#include <linux/bitops.h>
#include "../../util/util.h"
#include "../../util/debug.h"
#include "../../util/map.h"
#include "../../util/dso.h"

View File

@ -7,7 +7,7 @@
#include "config.h"
#include "time-utils.h"
#include "../util.h"
#include "../../util/util.h"
#include "../../util/util.h" // perf_exe()
#include "../../perf.h"
#include <stdlib.h>
#include <string.h>

View File

@ -1,7 +1,8 @@
// SPDX-License-Identifier: GPL-2.0
#include "../../builtin.h"
#include "../../perf.h"
#include "../../util/util.h"
#include "../../util/util.h" // perf_exe()
#include "../util.h"
#include "../../util/hist.h"
#include "../../util/debug.h"
#include "../../util/symbol.h"

View File

@ -6,7 +6,6 @@
#include "gtk.h"
#include "../ui.h"
#include "../helpline.h"
#include "../../util/debug.h"
static void gtk_helpline_pop(void)
{

View File

@ -3,7 +3,6 @@
#include "gtk.h"
#include "../progress.h"
#include "util.h"
static GtkWidget *dialog;
static GtkWidget *progress;

View File

@ -1,6 +1,7 @@
// SPDX-License-Identifier: GPL-2.0
#include "gtk.h"
#include "../../util/debug.h"
#include <linux/compiler.h>
#include "../util.h"
extern struct perf_error_ops perf_gtk_eops;

View File

@ -1,6 +1,5 @@
// SPDX-License-Identifier: GPL-2.0
#include "../util.h"
#include "../../util/debug.h"
#include "gtk.h"
#include <stdlib.h>

View File

@ -3,10 +3,8 @@
#include <stdlib.h>
#include <string.h>
#include "../util/debug.h"
#include "helpline.h"
#include "ui.h"
#include "../util/util.h"
char ui_helpline__current[512];

View File

@ -8,7 +8,6 @@
#include "../util/callchain.h"
#include "../util/debug.h"
#include "../util/hist.h"
#include "../util/util.h"
#include "../util/sort.h"
#include "../util/evsel.h"
#include "../util/evlist.h"

View File

@ -1,11 +1,11 @@
// SPDX-License-Identifier: GPL-2.0
#include <pthread.h>
#include <dlfcn.h>
#include <unistd.h>
#include <subcmd/pager.h>
#include "../util/debug.h"
#include "../util/hist.h"
#include "../util/util.h"
#include "ui.h"
pthread_mutex_t ui__lock = PTHREAD_MUTEX_INITIALIZER;

Some files were not shown because too many files have changed in this diff Show More