Merge branch 'linus' into perf/core, to fix conflicts

Conflicts:
	tools/perf/arch/arm/annotate/instructions.c
	tools/perf/arch/arm64/annotate/instructions.c
	tools/perf/arch/powerpc/annotate/instructions.c
	tools/perf/arch/s390/annotate/instructions.c
	tools/perf/arch/x86/tests/intel-cqm.c
	tools/perf/ui/tui/progress.c
	tools/perf/util/zlib.c

Signed-off-by: Ingo Molnar <mingo@kernel.org>
This commit is contained in:
Ingo Molnar
2017-11-07 10:30:18 +01:00
12930 changed files with 15866 additions and 2350 deletions

View File

@@ -1,3 +1,4 @@
# SPDX-License-Identifier: GPL-2.0
#
# This is a simple wrapper Makefile that calls the main Makefile.perf
# with a -j option to do parallel builds

View File

@@ -1,3 +1,4 @@
// SPDX-License-Identifier: GPL-2.0
#include <linux/compiler.h>
#include <sys/types.h>
#include <regex.h>

View File

@@ -1,3 +1,4 @@
/* SPDX-License-Identifier: GPL-2.0 */
#ifdef DEFINE_DWARF_REGSTR_TABLE
/* This is included in perf/util/dwarf-regs.c */

View File

@@ -1,3 +1,4 @@
/* SPDX-License-Identifier: GPL-2.0 */
#ifndef ARCH_PERF_REGS_H
#define ARCH_PERF_REGS_H

View File

@@ -1,3 +1,4 @@
// SPDX-License-Identifier: GPL-2.0
#include <string.h>
#include "perf_regs.h"
#include "thread.h"

View File

@@ -1,3 +1,4 @@
/* SPDX-License-Identifier: GPL-2.0 */
#include <linux/linkage.h>
#define R0 0x00

View File

@@ -1,3 +1,4 @@
// SPDX-License-Identifier: GPL-2.0
#include <elfutils/libdwfl.h>
#include "../../util/unwind-libdw.h"
#include "../../util/perf_regs.h"

View File

@@ -1,3 +1,4 @@
// SPDX-License-Identifier: GPL-2.0
#include <errno.h>
#include <libunwind.h>

View File

@@ -1,3 +1,4 @@
# SPDX-License-Identifier: GPL-2.0
ifndef NO_DWARF
PERF_HAVE_DWARF_REGS := 1
endif

View File

@@ -1,3 +1,4 @@
// SPDX-License-Identifier: GPL-2.0
#include <linux/compiler.h>
#include <sys/types.h>
#include <regex.h>

View File

@@ -1,3 +1,4 @@
/* SPDX-License-Identifier: GPL-2.0 */
#ifdef DEFINE_DWARF_REGSTR_TABLE
/* This is included in perf/util/dwarf-regs.c */

View File

@@ -1,3 +1,4 @@
/* SPDX-License-Identifier: GPL-2.0 */
#ifndef ARCH_PERF_REGS_H
#define ARCH_PERF_REGS_H

View File

@@ -1,3 +1,4 @@
// SPDX-License-Identifier: GPL-2.0
#include <string.h>
#include "perf_regs.h"
#include "thread.h"

View File

@@ -1,3 +1,4 @@
/* SPDX-License-Identifier: GPL-2.0 */
#include <linux/linkage.h>
.text

View File

@@ -1,3 +1,4 @@
// SPDX-License-Identifier: GPL-2.0
#include <errno.h>
#ifndef REMOTE_UNWIND_LIBUNWIND

View File

@@ -1,3 +1,4 @@
// SPDX-License-Identifier: GPL-2.0
#include <stdio.h>
#include <sys/utsname.h>
#include "common.h"

View File

@@ -1,3 +1,4 @@
/* SPDX-License-Identifier: GPL-2.0 */
#ifndef ARCH_PERF_COMMON_H
#define ARCH_PERF_COMMON_H

View File

@@ -1,3 +1,4 @@
# SPDX-License-Identifier: GPL-2.0
ifndef NO_DWARF
PERF_HAVE_DWARF_REGS := 1
endif

View File

@@ -1,3 +1,4 @@
// SPDX-License-Identifier: GPL-2.0
#include <linux/compiler.h>
static struct ins_ops *powerpc__associate_instruction_ops(struct arch *arch, const char *name)

View File

@@ -1,3 +1,4 @@
/* SPDX-License-Identifier: GPL-2.0 */
#ifndef ARCH_TESTS_H
#define ARCH_TESTS_H

View File

@@ -1,3 +1,4 @@
/* SPDX-License-Identifier: GPL-2.0 */
#ifdef DEFINE_DWARF_REGSTR_TABLE
/* This is included in perf/util/dwarf-regs.c */

View File

@@ -1,3 +1,4 @@
/* SPDX-License-Identifier: GPL-2.0 */
#ifndef ARCH_PERF_REGS_H
#define ARCH_PERF_REGS_H

View File

@@ -1,3 +1,4 @@
// SPDX-License-Identifier: GPL-2.0
#include <string.h>
#include "tests/tests.h"
#include "arch-tests.h"

View File

@@ -1,3 +1,4 @@
// SPDX-License-Identifier: GPL-2.0
#include <string.h>
#include "perf_regs.h"
#include "thread.h"

View File

@@ -1,3 +1,4 @@
/* SPDX-License-Identifier: GPL-2.0 */
#include <linux/linkage.h>
/* Offset is based on macros from arch/powerpc/include/uapi/asm/ptrace.h. */

View File

@@ -1,3 +1,4 @@
/* SPDX-License-Identifier: GPL-2.0 */
#ifndef ARCH_PERF_BOOK3S_HV_HCALLS_H
#define ARCH_PERF_BOOK3S_HV_HCALLS_H

View File

@@ -1,3 +1,4 @@
/* SPDX-License-Identifier: GPL-2.0 */
#ifndef ARCH_PERF_BOOK3S_HV_EXITS_H
#define ARCH_PERF_BOOK3S_HV_EXITS_H

View File

@@ -1,3 +1,4 @@
// SPDX-License-Identifier: GPL-2.0
#include <sys/types.h>
#include <unistd.h>
#include <stdio.h>

View File

@@ -1,3 +1,4 @@
// SPDX-License-Identifier: GPL-2.0
#include <errno.h>
#include "util/kvm-stat.h"
#include "util/parse-events.h"

View File

@@ -1,3 +1,4 @@
// SPDX-License-Identifier: GPL-2.0
#include <errno.h>
#include <string.h>
#include <regex.h>

View File

@@ -1,3 +1,4 @@
// SPDX-License-Identifier: GPL-2.0
#include <elfutils/libdwfl.h>
#include "../../util/unwind-libdw.h"
#include "../../util/perf_regs.h"

View File

@@ -1,3 +1,4 @@
// SPDX-License-Identifier: GPL-2.0
#include <linux/compiler.h>
static struct ins_ops *s390__associate_ins_ops(struct arch *arch, const char *name)

View File

@@ -1,3 +1,4 @@
/* SPDX-License-Identifier: GPL-2.0 */
#ifdef DEFINE_DWARF_REGSTR_TABLE
/* This is included in perf/util/dwarf-regs.c */

View File

@@ -1,3 +1,4 @@
// SPDX-License-Identifier: GPL-2.0
/*
* Mapping of DWARF debug register numbers into register names.
*

View File

@@ -1,3 +1,4 @@
// SPDX-License-Identifier: GPL-2.0
#include <unistd.h>
#include <stdio.h>
#include <string.h>

View File

@@ -1,3 +1,4 @@
/* SPDX-License-Identifier: GPL-2.0 */
#ifdef DEFINE_DWARF_REGSTR_TABLE
/* This is included in perf/util/dwarf-regs.c */

View File

@@ -1,3 +1,4 @@
/* SPDX-License-Identifier: GPL-2.0 */
#ifdef DEFINE_DWARF_REGSTR_TABLE
/* This is included in perf/util/dwarf-regs.c */

View File

@@ -1,3 +1,4 @@
# SPDX-License-Identifier: GPL-2.0
ifndef NO_DWARF
PERF_HAVE_DWARF_REGS := 1
endif

View File

@@ -1,3 +1,4 @@
// SPDX-License-Identifier: GPL-2.0
static struct ins x86__instructions[] = {
{ .name = "add", .ops = &mov_ops, },
{ .name = "addl", .ops = &mov_ops, },

View File

@@ -1,4 +1,5 @@
#!/bin/sh
# SPDX-License-Identifier: GPL-2.0
in="$1"
arch="$2"

View File

@@ -1,3 +1,4 @@
/* SPDX-License-Identifier: GPL-2.0 */
#ifndef ARCH_TESTS_H
#define ARCH_TESTS_H

View File

@@ -1,3 +1,4 @@
/* SPDX-License-Identifier: GPL-2.0 */
#ifdef DEFINE_DWARF_REGSTR_TABLE
/* This is included in perf/util/dwarf-regs.c */

View File

@@ -1,3 +1,4 @@
/* SPDX-License-Identifier: GPL-2.0 */
#ifndef ARCH_PERF_REGS_H
#define ARCH_PERF_REGS_H

View File

@@ -1,3 +1,4 @@
// SPDX-License-Identifier: GPL-2.0
#include <string.h>
#include "tests/tests.h"
#include "arch-tests.h"

View File

@@ -1,3 +1,4 @@
// SPDX-License-Identifier: GPL-2.0
#include <string.h>
#include "perf_regs.h"
#include "thread.h"

View File

@@ -1,3 +1,4 @@
// SPDX-License-Identifier: GPL-2.0
/*
* Generated by gen-insn-x86-dat.sh and gen-insn-x86-dat.awk
* from insn-x86-dat-src.c for inclusion by insn-x86.c

View File

@@ -1,3 +1,4 @@
// SPDX-License-Identifier: GPL-2.0
/*
* Generated by gen-insn-x86-dat.sh and gen-insn-x86-dat.awk
* from insn-x86-dat-src.c for inclusion by insn-x86.c

View File

@@ -1,3 +1,4 @@
// SPDX-License-Identifier: GPL-2.0
/*
* This file contains instructions for testing by the test titled:
*

View File

@@ -1,3 +1,4 @@
// SPDX-License-Identifier: GPL-2.0
#include <linux/types.h>
#include "debug.h"

View File

@@ -0,0 +1,128 @@
// SPDX-License-Identifier: GPL-2.0
#include "tests/tests.h"
#include "perf.h"
#include "cloexec.h"
#include "debug.h"
#include "evlist.h"
#include "evsel.h"
#include "arch-tests.h"
#include <signal.h>
#include <sys/mman.h>
#include <sys/wait.h>
#include <errno.h>
#include <string.h>
static pid_t spawn(void)
{
pid_t pid;
pid = fork();
if (pid)
return pid;
while(1)
sleep(5);
return 0;
}
/*
* Create an event group that contains both a sampled hardware
* (cpu-cycles) and software (intel_cqm/llc_occupancy/) event. We then
* wait for the hardware perf counter to overflow and generate a PMI,
* which triggers an event read for both of the events in the group.
*
* Since reading Intel CQM event counters requires sending SMP IPIs, the
* CQM pmu needs to handle the above situation gracefully, and return
* the last read counter value to avoid triggering a WARN_ON_ONCE() in
* smp_call_function_many() caused by sending IPIs from NMI context.
*/
int test__intel_cqm_count_nmi_context(struct test *test __maybe_unused, int subtest __maybe_unused)
{
struct perf_evlist *evlist = NULL;
struct perf_evsel *evsel = NULL;
struct perf_event_attr pe;
int i, fd[2], flag, ret;
size_t mmap_len;
void *event;
pid_t pid;
int err = TEST_FAIL;
flag = perf_event_open_cloexec_flag();
evlist = perf_evlist__new();
if (!evlist) {
pr_debug("perf_evlist__new failed\n");
return TEST_FAIL;
}
ret = parse_events(evlist, "intel_cqm/llc_occupancy/", NULL);
if (ret) {
pr_debug("parse_events failed, is \"intel_cqm/llc_occupancy/\" available?\n");
err = TEST_SKIP;
goto out;
}
evsel = perf_evlist__first(evlist);
if (!evsel) {
pr_debug("perf_evlist__first failed\n");
goto out;
}
memset(&pe, 0, sizeof(pe));
pe.size = sizeof(pe);
pe.type = PERF_TYPE_HARDWARE;
pe.config = PERF_COUNT_HW_CPU_CYCLES;
pe.read_format = PERF_FORMAT_GROUP;
pe.sample_period = 128;
pe.sample_type = PERF_SAMPLE_IP | PERF_SAMPLE_READ;
pid = spawn();
fd[0] = sys_perf_event_open(&pe, pid, -1, -1, flag);
if (fd[0] < 0) {
pr_debug("failed to open event\n");
goto out;
}
memset(&pe, 0, sizeof(pe));
pe.size = sizeof(pe);
pe.type = evsel->attr.type;
pe.config = evsel->attr.config;
fd[1] = sys_perf_event_open(&pe, pid, -1, fd[0], flag);
if (fd[1] < 0) {
pr_debug("failed to open event\n");
goto out;
}
/*
* Pick a power-of-two number of pages + 1 for the meta-data
* page (struct perf_event_mmap_page). See tools/perf/design.txt.
*/
mmap_len = page_size * 65;
event = mmap(NULL, mmap_len, PROT_READ, MAP_SHARED, fd[0], 0);
if (event == (void *)(-1)) {
pr_debug("failed to mmap %d\n", errno);
goto out;
}
sleep(1);
err = TEST_OK;
munmap(event, mmap_len);
for (i = 0; i < 2; i++)
close(fd[i]);
kill(pid, SIGKILL);
wait(NULL);
out:
perf_evlist__delete(evlist);
return err;
}

View File

@@ -1,3 +1,4 @@
// SPDX-License-Identifier: GPL-2.0
#include <errno.h>
#include <inttypes.h>
#include <stdio.h>

View File

@@ -1,3 +1,4 @@
// SPDX-License-Identifier: GPL-2.0
#include <errno.h>
#include <unistd.h>
#include <stdlib.h>

View File

@@ -1,3 +1,4 @@
/* SPDX-License-Identifier: GPL-2.0 */
#include <linux/linkage.h>
#define AX 0

View File

@@ -1,3 +1,4 @@
// SPDX-License-Identifier: GPL-2.0
#include <stdio.h>
#include "api/fs/fs.h"
#include "util/group.h"

View File

@@ -1,3 +1,4 @@
// SPDX-License-Identifier: GPL-2.0
#include <sys/types.h>
#include <unistd.h>
#include <stdio.h>

View File

@@ -1,3 +1,4 @@
// SPDX-License-Identifier: GPL-2.0
#include <errno.h>
#include "../../util/kvm-stat.h"
#include <asm/svm.h>

View File

@@ -1,3 +1,4 @@
// SPDX-License-Identifier: GPL-2.0
#include <errno.h>
#include <string.h>
#include <regex.h>

View File

@@ -1,3 +1,4 @@
// SPDX-License-Identifier: GPL-2.0
#include <string.h>
#include <linux/perf_event.h>

View File

@@ -1,3 +1,4 @@
// SPDX-License-Identifier: GPL-2.0
#include <stdbool.h>
#include <errno.h>

View File

@@ -1,3 +1,4 @@
// SPDX-License-Identifier: GPL-2.0
#include <elfutils/libdwfl.h>
#include "../../util/unwind-libdw.h"
#include "../../util/perf_regs.h"

View File

@@ -1,3 +1,4 @@
// SPDX-License-Identifier: GPL-2.0
#ifndef REMOTE_UNWIND_LIBUNWIND
#include <errno.h>

View File

@@ -1,3 +1,4 @@
/* SPDX-License-Identifier: GPL-2.0 */
#ifdef DEFINE_DWARF_REGSTR_TABLE
/* This is included in perf/util/dwarf-regs.c */

View File

@@ -1,3 +1,4 @@
/* SPDX-License-Identifier: GPL-2.0 */
#ifndef BENCH_H
#define BENCH_H

View File

@@ -1,3 +1,4 @@
// SPDX-License-Identifier: GPL-2.0
/*
* Copyright (C) 2013 Davidlohr Bueso <davidlohr@hp.com>
*

View File

@@ -1,3 +1,4 @@
// SPDX-License-Identifier: GPL-2.0
/*
* Copyright (C) 2015 Davidlohr Bueso.
*/

View File

@@ -1,3 +1,4 @@
// SPDX-License-Identifier: GPL-2.0
/*
* Copyright (C) 2013 Davidlohr Bueso <davidlohr@hp.com>
*

View File

@@ -1,3 +1,4 @@
// SPDX-License-Identifier: GPL-2.0
/*
* Copyright (C) 2015 Davidlohr Bueso.
*

View File

@@ -1,3 +1,4 @@
// SPDX-License-Identifier: GPL-2.0
/*
* Copyright (C) 2013 Davidlohr Bueso <davidlohr@hp.com>
*

View File

@@ -1,3 +1,4 @@
/* SPDX-License-Identifier: GPL-2.0 */
/*
* Glibc independent futex library for testing kernel functionality.
* Shamelessly stolen from Darren Hart <dvhltc@us.ibm.com>

View File

@@ -1,3 +1,4 @@
// SPDX-License-Identifier: GPL-2.0
/*
* mem-memcpy.c
*

View File

@@ -1,3 +1,4 @@
/* SPDX-License-Identifier: GPL-2.0 */
#ifdef HAVE_ARCH_X86_64_SUPPORT

View File

@@ -1,3 +1,4 @@
/* SPDX-License-Identifier: GPL-2.0 */
MEMCPY_FN(memcpy_orig,
"x86-64-unrolled",

View File

@@ -1,3 +1,4 @@
/* SPDX-License-Identifier: GPL-2.0 */
/* Various wrappers to make the kernel .S file build in user-space: */

View File

@@ -1,3 +1,4 @@
/* SPDX-License-Identifier: GPL-2.0 */
#ifdef HAVE_ARCH_X86_64_SUPPORT

View File

@@ -1,3 +1,4 @@
/* SPDX-License-Identifier: GPL-2.0 */
MEMSET_FN(memset_orig,
"x86-64-unrolled",

View File

@@ -1,3 +1,4 @@
/* SPDX-License-Identifier: GPL-2.0 */
#define memset MEMSET /* don't hide glibc's memset() */
#define altinstr_replacement text
#define globl p2align 4; .globl

View File

@@ -1,3 +1,4 @@
// SPDX-License-Identifier: GPL-2.0
/*
* numa.c
*

View File

@@ -1,3 +1,4 @@
// SPDX-License-Identifier: GPL-2.0
/*
*
* sched-messaging.c

View File

@@ -1,3 +1,4 @@
// SPDX-License-Identifier: GPL-2.0
/*
*
* sched-pipe.c

View File

@@ -1,3 +1,4 @@
// SPDX-License-Identifier: GPL-2.0
/*
* builtin-annotate.c
*

View File

@@ -1,3 +1,4 @@
// SPDX-License-Identifier: GPL-2.0
/*
* builtin-bench.c
*

View File

@@ -1,3 +1,4 @@
// SPDX-License-Identifier: GPL-2.0
/*
* builtin-buildid-cache.c
*

View File

@@ -1,3 +1,4 @@
// SPDX-License-Identifier: GPL-2.0
/*
* builtin-buildid-list.c
*

View File

@@ -1,3 +1,4 @@
// SPDX-License-Identifier: GPL-2.0
/*
* This is rewrite of original c2c tool introduced in here:
* http://lwn.net/Articles/588866/

View File

@@ -1,3 +1,4 @@
// SPDX-License-Identifier: GPL-2.0
/*
* builtin-config.c
*

View File

@@ -1,3 +1,4 @@
// SPDX-License-Identifier: GPL-2.0
#include <linux/compiler.h>
#include "builtin.h"
#include "perf.h"

View File

@@ -1,3 +1,4 @@
// SPDX-License-Identifier: GPL-2.0
/*
* builtin-diff.c
*

View File

@@ -1,3 +1,4 @@
// SPDX-License-Identifier: GPL-2.0
/*
* Builtin evlist command: Show the list of event selectors present
* in a perf.data file.

View File

@@ -1,3 +1,4 @@
// SPDX-License-Identifier: GPL-2.0
/*
* builtin-help.c
*

View File

@@ -1,3 +1,4 @@
// SPDX-License-Identifier: GPL-2.0
/*
* builtin-inject.c
*

View File

@@ -1,3 +1,4 @@
// SPDX-License-Identifier: GPL-2.0
#include "builtin.h"
#include "perf.h"

View File

@@ -1,3 +1,4 @@
// SPDX-License-Identifier: GPL-2.0
#include "builtin.h"
#include "perf.h"

View File

@@ -1,3 +1,4 @@
// SPDX-License-Identifier: GPL-2.0
/*
* builtin-list.c
*

View File

@@ -1,3 +1,4 @@
// SPDX-License-Identifier: GPL-2.0
#include <errno.h>
#include <inttypes.h>
#include "builtin.h"

View File

@@ -1,3 +1,4 @@
// SPDX-License-Identifier: GPL-2.0
#include <inttypes.h>
#include <sys/types.h>
#include <sys/stat.h>

View File

@@ -1,3 +1,4 @@
// SPDX-License-Identifier: GPL-2.0
/*
* builtin-record.c
*

View File

@@ -1,3 +1,4 @@
// SPDX-License-Identifier: GPL-2.0
/*
* builtin-report.c
*

View File

@@ -1,3 +1,4 @@
// SPDX-License-Identifier: GPL-2.0
#include "builtin.h"
#include "perf.h"

View File

@@ -1,3 +1,4 @@
// SPDX-License-Identifier: GPL-2.0
#include "builtin.h"
#include "perf.h"

View File

@@ -1,3 +1,4 @@
// SPDX-License-Identifier: GPL-2.0
#include "builtin.h"
#include "perf.h"
#include <linux/compiler.h>

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