projects/linux·commit d207ea8e

Merge branch 'perf-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip

d207ea8e · Linus Torvalds <[email protected]> · 2018-08-26 11:25:21 -07:00

Pull perf updates from Thomas Gleixner:
 "Kernel:
   - Improve kallsyms coverage
   - Add x86 entry trampolines to kcore
   - Fix ARM SPE handling
   - Correct PPC event post processing

  Tools:
   - Make the build system more robust
   - Small fixes and enhancements all over the place
   - Update kernel ABI header copies
   - Preparatory work for converting libtraceevnt to a shared library
   - License cleanups"

* 'perf-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (100 commits)
  tools arch: Update arch/x86/lib/memcpy_64.S copy used in 'perf bench mem memcpy'
  tools arch x86: Update tools's copy of cpufeatures.h
  perf python: Fix pyrf_evlist__read_on_cpu() interface
  perf mmap: Store real cpu number in 'struct perf_mmap'
  perf tools: Remove ext from struct kmod_path
  perf tools: Add gzip_is_compressed function
  perf tools: Add lzma_is_compressed function
  perf tools: Add is_compressed callback to compressions array
  perf tools: Move the temp file processing into decompress_kmodule
  perf tools: Use compression id in decompress_kmodule()
  perf tools: Store compression id into struct dso
  perf tools: Add compression id into 'struct kmod_path'
  perf tools: Make is_supported_compression() static
  perf tools: Make decompress_to_file() function static
  perf tools: Get rid of dso__needs_decompress() call in __open_dso()
  perf tools: Get rid of dso__needs_decompress() call in symbol__disassemble()
  perf tools: Get rid of dso__needs_decompress() call in read_object_code()
  tools lib traceevent: Change to SPDX License format
  perf llvm: Allow passing options to llc in addition to clang
  perf parser: Improve error message for PMU address filters
  ...
Commit
d207ea8e74ff45be0838afa12bdd2492fa9dc8bc
Parents
2a8a2b7c · 66e5db4a

Merge commit. Changes below are compared with the first parent: 2a8a2b7c.

Changes

93 files changed · +3259 −1628

FileStatusAddDelContent
arch/x86/mm/cpu_entry_area.cmodified+33−0View file
fs/proc/kcore.cmodified+5−2View file
include/linux/kcore.hmodified+13−0View file
kernel/kallsyms.cmodified+37−14View file
tools/arch/x86/include/asm/cpufeatures.hmodified+2−1View file
tools/arch/x86/lib/memcpy_64.Smodified+1−1View file
tools/lib/lockdep/Makefilemodified+2−2View file
tools/lib/traceevent/Makefilemodified+2−2View file
tools/lib/traceevent/event-parse.cmodified+349−363View file
tools/lib/traceevent/event-parse.hmodified+229−229View file
tools/lib/traceevent/event-plugin.cmodified+36−50View file
tools/lib/traceevent/event-utils.hmodified+1−15View file
tools/lib/traceevent/kbuffer-parse.cmodified+1−16View file
tools/lib/traceevent/parse-filter.cmodified+145−159View file
tools/lib/traceevent/parse-utils.cmodified+1−15View file
tools/lib/traceevent/plugin_cfg80211.cmodified+10−10View file
tools/lib/traceevent/plugin_function.cmodified+17−17View file
tools/lib/traceevent/plugin_hrtimer.cmodified+28−28View file
tools/lib/traceevent/plugin_jbd2.cmodified+18−18View file
tools/lib/traceevent/plugin_kmem.cmodified+33−33View file
tools/lib/traceevent/plugin_kvm.cmodified+77−77View file
tools/lib/traceevent/plugin_mac80211.cmodified+14−14View file
tools/lib/traceevent/plugin_sched_switch.cmodified+30−30View file
tools/lib/traceevent/plugin_scsi.cmodified+12−12View file
tools/lib/traceevent/plugin_xen.cmodified+10−10View file
tools/lib/traceevent/trace-seq.cmodified+1−15View file
tools/perf/Documentation/perf-annotate.txtmodified+9−0View file
tools/perf/Documentation/perf-report.txtmodified+9−0View file
tools/perf/Makefilemodified+2−2View file
tools/perf/arch/arm64/util/arm-spe.cmodified+1−0View file
tools/perf/arch/powerpc/util/sym-handling.cmodified+3−1View file
tools/perf/arch/s390/util/auxtrace.cmodified+1−0View file
tools/perf/arch/x86/Makefilemodified+0−3View file
tools/perf/builtin-annotate.cmodified+4−0View file
tools/perf/builtin-kmem.cmodified+3−3View file
tools/perf/builtin-report.cmodified+6−3View file
tools/perf/builtin-script.cmodified+3−3View file
tools/perf/builtin-trace.cmodified+165−26View file
tools/perf/check-headers.shmodified+14−3View file
tools/perf/examples/bpf/augmented_syscalls.cadded+55−0View file
tools/perf/examples/bpf/hello.cadded+9−0View file
tools/perf/examples/bpf/sys_enter_openat.cadded+33−0View file
tools/perf/include/bpf/bpf.hmodified+20−0View file
tools/perf/include/bpf/stdio.hadded+19−0View file
tools/perf/pmu-events/arch/arm64/ampere/emag/core-imp-def.jsonadded+32−0View file
tools/perf/pmu-events/arch/arm64/mapfile.csvmodified+1−0View file
tools/perf/tests/bitmap.cmodified+0−2View file
tools/perf/tests/code-reading.cmodified+3−1View file
tools/perf/tests/kmod-path.cmodified+65−71View file
tools/perf/tests/mem2node.cmodified+0−2View file
tools/perf/ui/browsers/annotate.cmodified+61−15View file
tools/perf/util/Buildmodified+1−0View file
tools/perf/util/annotate.cmodified+183−122View file
tools/perf/util/annotate.hmodified+40−14View file
tools/perf/util/auxtrace.cmodified+6−0View file
tools/perf/util/auxtrace.hmodified+1−0View file
tools/perf/util/bpf-loader.cmodified+30−18View file
tools/perf/util/bpf-loader.hmodified+17−6View file
tools/perf/util/compress.hmodified+2−0View file
tools/perf/util/data-convert-bt.cmodified+3−3View file
tools/perf/util/dso.cmodified+53−58View file
tools/perf/util/dso.hmodified+5−8View file
tools/perf/util/event.cmodified+10−3View file
tools/perf/util/evlist.cmodified+1−1View file
tools/perf/util/evsel.cmodified+1−1View file
tools/perf/util/evsel.hmodified+7−0View file
tools/perf/util/header.cmodified+3−6View file
tools/perf/util/llvm-utils.cmodified+29−2View file
tools/perf/util/llvm-utils.hmodified+9−0View file
tools/perf/util/lzma.cmodified+20−0View file
tools/perf/util/machine.cmodified+3−1View file
tools/perf/util/machine.hmodified+1−1View file
tools/perf/util/map.cmodified+26−18View file
tools/perf/util/map.hmodified+0−1View file
tools/perf/util/mmap.cmodified+2−1View file
tools/perf/util/mmap.hmodified+2−1View file
tools/perf/util/namespaces.cmodified+3−0View file
tools/perf/util/parse-events.cmodified+10−10View file
tools/perf/util/python.cmodified+24−6View file
tools/perf/util/s390-cpumsf-kernel.hadded+71−0View file
tools/perf/util/s390-cpumsf.cadded+945−0View file
tools/perf/util/s390-cpumsf.hadded+21−0View file
tools/perf/util/scripting-engines/trace-event-perl.cmodified+1−1View file
tools/perf/util/scripting-engines/trace-event-python.cmodified+3−3View file
tools/perf/util/setup.pymodified+9−1View file
tools/perf/util/sort.cmodified+8−8View file
tools/perf/util/sort.hmodified+1−1View file
tools/perf/util/trace-event-parse.cmodified+17−17View file
tools/perf/util/trace-event-read.cmodified+22−22View file
tools/perf/util/trace-event-scripting.cmodified+2−2View file
tools/perf/util/trace-event.cmodified+14−14View file
tools/perf/util/trace-event.hmodified+10−10View file
tools/perf/util/zlib.cmodified+18−0View file

Only the first 600 diff lines are shown. Download the complete patch.

arch/x86/mm/cpu_entry_area.c

View file
diff --git a/arch/x86/mm/cpu_entry_area.c b/arch/x86/mm/cpu_entry_area.c
index b45f5aa..076ebdc 100644
--- a/arch/x86/mm/cpu_entry_area.c
+++ b/arch/x86/mm/cpu_entry_area.c
@@ -2,6 +2,8 @@
#include <linux/spinlock.h>
#include <linux/percpu.h>
+#include <linux/kallsyms.h>
+#include <linux/kcore.h>
#include <asm/cpu_entry_area.h>
#include <asm/pgtable.h>
@@ -13,6 +15,7 @@ static DEFINE_PER_CPU_PAGE_ALIGNED(struct entry_stack_page, entry_stack_storage)
#ifdef CONFIG_X86_64
static DEFINE_PER_CPU_PAGE_ALIGNED(char, exception_stacks
[(N_EXCEPTION_STACKS - 1) * EXCEPTION_STKSZ + DEBUG_STKSZ]);
+static DEFINE_PER_CPU(struct kcore_list, kcore_entry_trampoline);
#endif
struct cpu_entry_area *get_cpu_entry_area(int cpu)
@@ -146,10 +149,40 @@ static void __init setup_cpu_entry_area(int cpu)
cea_set_pte(&get_cpu_entry_area(cpu)->entry_trampoline,
__pa_symbol(_entry_trampoline), PAGE_KERNEL_RX);
+ /*
+ * The cpu_entry_area alias addresses are not in the kernel binary
+ * so they do not show up in /proc/kcore normally. This adds entries
+ * for them manually.
+ */
+ kclist_add_remap(&per_cpu(kcore_entry_trampoline, cpu),
+ _entry_trampoline,
+ &get_cpu_entry_area(cpu)->entry_trampoline, PAGE_SIZE);
#endif
percpu_setup_debug_store(cpu);
}
+#ifdef CONFIG_X86_64
+int arch_get_kallsym(unsigned int symnum, unsigned long *value, char *type,
+ char *name)
+{
+ unsigned int cpu, ncpu = 0;
+
+ if (symnum >= num_possible_cpus())
+ return -EINVAL;
+
+ for_each_possible_cpu(cpu) {
+ if (ncpu++ >= symnum)
+ break;
+ }
+
+ *value = (unsigned long)&get_cpu_entry_area(cpu)->entry_trampoline;
+ *type = 't';
+ strlcpy(name, "__entry_SYSCALL_64_trampoline", KSYM_NAME_LEN);
+
+ return 0;
+}
+#endif
+
static __init void setup_cpu_entry_area_ptes(void)
{
#ifdef CONFIG_X86_32

fs/proc/kcore.c

View file
diff --git a/fs/proc/kcore.c b/fs/proc/kcore.c
index 8046443..ad72261 100644
--- a/fs/proc/kcore.c
+++ b/fs/proc/kcore.c
@@ -359,8 +359,11 @@ read_kcore(struct file *file, char __user *buffer, size_t buflen, loff_t *fpos)
phdr->p_type = PT_LOAD;
phdr->p_flags = PF_R | PF_W | PF_X;
phdr->p_offset = kc_vaddr_to_offset(m->addr) + data_offset;
- phdr->p_vaddr = (size_t)m->addr;
- if (m->type == KCORE_RAM)
+ if (m->type == KCORE_REMAP)
+ phdr->p_vaddr = (size_t)m->vaddr;
+ else
+ phdr->p_vaddr = (size_t)m->addr;
+ if (m->type == KCORE_RAM || m->type == KCORE_REMAP)
phdr->p_paddr = __pa(m->addr);
else if (m->type == KCORE_TEXT)
phdr->p_paddr = __pa_symbol(m->addr);

include/linux/kcore.h

View file
diff --git a/include/linux/kcore.h b/include/linux/kcore.h
index c20f296..8c3f8c1 100644
--- a/include/linux/kcore.h
+++ b/include/linux/kcore.h
@@ -12,11 +12,13 @@ enum kcore_type {
KCORE_VMEMMAP,
KCORE_USER,
KCORE_OTHER,
+ KCORE_REMAP,
};
struct kcore_list {
struct list_head list;
unsigned long addr;
+ unsigned long vaddr;
size_t size;
int type;
};
@@ -36,11 +38,22 @@ struct vmcoredd_node {
#ifdef CONFIG_PROC_KCORE
void __init kclist_add(struct kcore_list *, void *, size_t, int type);
+static inline
+void kclist_add_remap(struct kcore_list *m, void *addr, void *vaddr, size_t sz)
+{
+ m->vaddr = (unsigned long)vaddr;
+ kclist_add(m, addr, sz, KCORE_REMAP);
+}
#else
static inline
void kclist_add(struct kcore_list *new, void *addr, size_t size, int type)
{
}
+
+static inline
+void kclist_add_remap(struct kcore_list *m, void *addr, void *vaddr, size_t sz)
+{
+}
#endif
#endif /* _LINUX_KCORE_H */

kernel/kallsyms.c

View file
diff --git a/kernel/kallsyms.c b/kernel/kallsyms.c
index a23e21a..02a0b01 100644
--- a/kernel/kallsyms.c
+++ b/kernel/kallsyms.c
@@ -432,6 +432,7 @@ int sprint_backtrace(char *buffer, unsigned long address)
/* To avoid using get_symbol_offset for every symbol, we carry prefix along. */
struct kallsym_iter {
loff_t pos;
+ loff_t pos_arch_end;
loff_t pos_mod_end;
loff_t pos_ftrace_mod_end;
unsigned long value;
@@ -443,9 +444,29 @@ struct kallsym_iter {
int show_value;
};
+int __weak arch_get_kallsym(unsigned int symnum, unsigned long *value,
+ char *type, char *name)
+{
+ return -EINVAL;
+}
+
+static int get_ksymbol_arch(struct kallsym_iter *iter)
+{
+ int ret = arch_get_kallsym(iter->pos - kallsyms_num_syms,
+ &iter->value, &iter->type,
+ iter->name);
+
+ if (ret < 0) {
+ iter->pos_arch_end = iter->pos;
+ return 0;
+ }
+
+ return 1;
+}
+
static int get_ksymbol_mod(struct kallsym_iter *iter)
{
- int ret = module_get_kallsym(iter->pos - kallsyms_num_syms,
+ int ret = module_get_kallsym(iter->pos - iter->pos_arch_end,
&iter->value, &iter->type,
iter->name, iter->module_name,
&iter->exported);
@@ -501,32 +522,34 @@ static void reset_iter(struct kallsym_iter *iter, loff_t new_pos)
iter->nameoff = get_symbol_offset(new_pos);
iter->pos = new_pos;
if (new_pos == 0) {
+ iter->pos_arch_end = 0;
iter->pos_mod_end = 0;
iter->pos_ftrace_mod_end = 0;
}
}
+/*
+ * The end position (last + 1) of each additional kallsyms section is recorded
+ * in iter->pos_..._end as each section is added, and so can be used to
+ * determine which get_ksymbol_...() function to call next.
+ */
static int update_iter_mod(struct kallsym_iter *iter, loff_t pos)
{
iter->pos = pos;
- if (iter->pos_ftrace_mod_end > 0 &&
- iter->pos_ftrace_mod_end < iter->pos)
- return get_ksymbol_bpf(iter);
+ if ((!iter->pos_arch_end || iter->pos_arch_end > pos) &&
+ get_ksymbol_arch(iter))
+ return 1;
- if (iter->pos_mod_end > 0 &&
- iter->pos_mod_end < iter->pos) {
- if (!get_ksymbol_ftrace_mod(iter))
- return get_ksymbol_bpf(iter);
+ if ((!iter->pos_mod_end || iter->pos_mod_end > pos) &&
+ get_ksymbol_mod(iter))
return 1;
- }
- if (!get_ksymbol_mod(iter)) {
- if (!get_ksymbol_ftrace_mod(iter))
- return get_ksymbol_bpf(iter);
- }
+ if ((!iter->pos_ftrace_mod_end || iter->pos_ftrace_mod_end > pos) &&
+ get_ksymbol_ftrace_mod(iter))
+ return 1;
- return 1;
+ return get_ksymbol_bpf(iter);
}
/* Returns false if pos at or past end of file. */

tools/arch/x86/include/asm/cpufeatures.h

View file
diff --git a/tools/arch/x86/include/asm/cpufeatures.h b/tools/arch/x86/include/asm/cpufeatures.h
index 64aaa3f..89a048c 100644
--- a/tools/arch/x86/include/asm/cpufeatures.h
+++ b/tools/arch/x86/include/asm/cpufeatures.h
@@ -220,6 +220,7 @@
#define X86_FEATURE_STIBP ( 7*32+27) /* Single Thread Indirect Branch Predictors */
#define X86_FEATURE_ZEN ( 7*32+28) /* "" CPU is AMD family 0x17 (Zen) */
#define X86_FEATURE_L1TF_PTEINV ( 7*32+29) /* "" L1TF workaround PTE inversion */
+#define X86_FEATURE_IBRS_ENHANCED ( 7*32+30) /* Enhanced IBRS */
/* Virtualization flags: Linux defined, word 8 */
#define X86_FEATURE_TPR_SHADOW ( 8*32+ 0) /* Intel TPR Shadow */
@@ -230,7 +231,7 @@
#define X86_FEATURE_VMMCALL ( 8*32+15) /* Prefer VMMCALL to VMCALL */
#define X86_FEATURE_XENPV ( 8*32+16) /* "" Xen paravirtual guest */
-
+#define X86_FEATURE_EPT_AD ( 8*32+17) /* Intel Extended Page Table access-dirty bit */
/* Intel-defined CPU features, CPUID level 0x00000007:0 (EBX), word 9 */
#define X86_FEATURE_FSGSBASE ( 9*32+ 0) /* RDFSBASE, WRFSBASE, RDGSBASE, WRGSBASE instructions*/

tools/arch/x86/lib/memcpy_64.S

View file
diff --git a/tools/arch/x86/lib/memcpy_64.S b/tools/arch/x86/lib/memcpy_64.S
index 298ef14..3b24dc0 100644
--- a/tools/arch/x86/lib/memcpy_64.S
+++ b/tools/arch/x86/lib/memcpy_64.S
@@ -256,7 +256,7 @@ ENTRY(__memcpy_mcsafe)
/* Copy successful. Return zero */
.L_done_memcpy_trap:
- xorq %rax, %rax
+ xorl %eax, %eax
ret
ENDPROC(__memcpy_mcsafe)
EXPORT_SYMBOL_GPL(__memcpy_mcsafe)

tools/lib/lockdep/Makefile

View file
diff --git a/tools/lib/lockdep/Makefile b/tools/lib/lockdep/Makefile
index 9b0ca3a..9dafb8c 100644
--- a/tools/lib/lockdep/Makefile
+++ b/tools/lib/lockdep/Makefile
@@ -129,12 +129,12 @@ $(OUTPUT)liblockdep.a: $(LIB_IN)
tags: force
$(RM) tags
find . -name '*.[ch]' | xargs ctags --extra=+f --c-kinds=+px \
- --regex-c++='/_PE\(([^,)]*).*/PEVENT_ERRNO__\1/'
+ --regex-c++='/_PE\(([^,)]*).*/TEP_ERRNO__\1/'
TAGS: force
$(RM) TAGS
find . -name '*.[ch]' | xargs etags \
- --regex='/_PE(\([^,)]*\).*/PEVENT_ERRNO__\1/'
+ --regex='/_PE(\([^,)]*\).*/TEP_ERRNO__\1/'
define do_install
$(print_install) \

tools/lib/traceevent/Makefile

View file
diff --git a/tools/lib/traceevent/Makefile b/tools/lib/traceevent/Makefile
index 46cd5f8..0b4e833 100644
--- a/tools/lib/traceevent/Makefile
+++ b/tools/lib/traceevent/Makefile
@@ -233,12 +233,12 @@ endef
tags: force
$(RM) tags
find . -name '*.[ch]' | xargs ctags --extra=+f --c-kinds=+px \
- --regex-c++='/_PE\(([^,)]*).*/PEVENT_ERRNO__\1/'
+ --regex-c++='/_PE\(([^,)]*).*/TEP_ERRNO__\1/'
TAGS: force
$(RM) TAGS
find . -name '*.[ch]' | xargs etags \
- --regex='/_PE(\([^,)]*\).*/PEVENT_ERRNO__\1/'
+ --regex='/_PE(\([^,)]*\).*/TEP_ERRNO__\1/'
define do_install_mkdir
if [ ! -d '$(DESTDIR_SQ)$1' ]; then \

tools/lib/traceevent/event-parse.c

View file
diff --git a/tools/lib/traceevent/event-parse.c b/tools/lib/traceevent/event-parse.c
index e5f2acb..ce1e202 100644
--- a/tools/lib/traceevent/event-parse.c
+++ b/tools/lib/traceevent/event-parse.c
@@ -1,21 +1,7 @@
+// SPDX-License-Identifier: LGPL-2.1
/*
* Copyright (C) 2009, 2010 Red Hat Inc, Steven Rostedt <[email protected]>
*
- * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation;
- * version 2.1 of the License (not later!)
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this program; if not, see <http://www.gnu.org/licenses>
- *
- * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
*
* The parts for function graph printing was taken and modified from the
* Linux Kernel that were written by
@@ -73,12 +59,12 @@ static void init_input_buf(const char *buf, unsigned long long size)
input_buf_ptr = 0;
}
-const char *pevent_get_input_buf(void)
+const char *tep_get_input_buf(void)
{
return input_buf;
}
-unsigned long long pevent_get_input_buf_ptr(void)
+unsigned long long tep_get_input_buf_ptr(void)
{
return input_buf_ptr;
}
@@ -88,21 +74,21 @@ struct event_handler {
int id;
const char *sys_name;
const char *event_name;
- pevent_event_handler_func func;
+ tep_event_handler_func func;
void *context;
};
-struct pevent_func_params {
- struct pevent_func_params *next;
- enum pevent_func_arg_type type;
+struct func_params {
+ struct func_params *next;
+ enum tep_func_arg_type type;
};
-struct pevent_function_handler {
- struct pevent_function_handler *next;
- enum pevent_func_arg_type ret_type;
+struct tep_function_handler {
+ struct tep_function_handler *next;
+ enum tep_func_arg_type ret_type;
char *name;
- pevent_func_handler func;
- struct pevent_func_params *params;
+ tep_func_handler func;
+ struct func_params *params;
int nr_args;
};
@@ -110,17 +96,17 @@ static unsigned long long
process_defined_func(struct trace_seq *s, void *data, int size,
struct event_format *event, struct print_arg *arg);
-static void free_func_handle(struct pevent_function_handler *func);
+static void free_func_handle(struct tep_function_handler *func);
/**
- * pevent_buffer_init - init buffer for parsing
+ * tep_buffer_init - init buffer for parsing
* @buf: buffer to parse
* @size: the size of the buffer
*
- * For use with pevent_read_token(), this initializes the internal
- * buffer that pevent_read_token() will parse.
+ * For use with tep_read_token(), this initializes the internal
+ * buffer that tep_read_token() will parse.
*/
-void pevent_buffer_init(const char *buf, unsigned long long size)
+void tep_buffer_init(const char *buf, unsigned long long size)
{
init_input_buf(buf, size);
}
@@ -160,7 +146,7 @@ struct cmdline_list {
int pid;
};
-static int cmdline_init(struct pevent *pevent)
+static int cmdline_init(struct tep_handle *pevent)
{
struct cmdline_list *cmdlist = pevent->cmdlist;
struct cmdline_list *item;
@@ -189,7 +175,7 @@ static int cmdline_init(struct pevent *pevent)
return 0;
}
-static const char *find_cmdline(struct pevent *pevent, int pid)
+static const char *find_cmdline(struct tep_handle *pevent, int pid)
{
const struct cmdline *comm;
struct cmdline key;
@@ -211,14 +197,14 @@ static const char *find_cmdline(struct pevent *pevent, int pid)
}
/**
- * pevent_pid_is_registered - return if a pid has a cmdline registered
+ * tep_pid_is_registered - return if a pid has a cmdline registered
* @pevent: handle for the pevent
* @pid: The pid to check if it has a cmdline registered with.
*
* Returns 1 if the pid has a cmdline mapped to it
* 0 otherwise.
*/
-int pevent_pid_is_registered(struct pevent *pevent, int pid)
+int tep_pid_is_registered(struct tep_handle *pevent, int pid)
{
const struct cmdline *comm;
struct cmdline key;
@@ -244,7 +230,7 @@ int pevent_pid_is_registered(struct pevent *pevent, int pid)
* we must add this pid. This is much slower than when cmdlines
* are added before the array is initialized.
*/
-static int add_new_comm(struct pevent *pevent, const char *comm, int pid)
+static int add_new_comm(struct tep_handle *pevent, const char *comm, int pid)
{
struct cmdline *cmdlines = pevent->cmdlines;
const struct cmdline *cmdline;
@@ -288,7 +274,7 @@ static int add_new_comm(struct pevent *pevent, const char *comm, int pid)
}
/**
- * pevent_register_comm - register a pid / comm mapping
+ * tep_register_comm - register a pid / comm mapping
* @pevent: handle for the pevent
* @comm: the command line to register
* @pid: the pid to map the command line to
@@ -296,7 +282,7 @@ static int add_new_comm(struct pevent *pevent, const char *comm, int pid)
* This adds a mapping to search for command line names with
* a given pid. The comm is duplicated.
*/
-int pevent_register_comm(struct pevent *pevent, const char *comm, int pid)
+int tep_register_comm(struct tep_handle *pevent, const char *comm, int pid)
{
struct cmdline_list *item;
@@ -324,7 +310,7 @@ int pevent_register_comm(struct pevent *pevent, const char *comm, int pid)
return 0;
}
-int pevent_register_trace_clock(struct pevent *pevent, const char *trace_clock)
+int tep_register_trace_clock(struct tep_handle *pevent, const char *trace_clock)
{
pevent->trace_clock = strdup(trace_clock);
if (!pevent->trace_clock) {
@@ -381,7 +367,7 @@ static int func_bcmp(const void *a, const void *b)
return 1;
}
-static int func_map_init(struct pevent *pevent)
+static int func_map_init(struct tep_handle *pevent)
{
struct func_list *funclist;
struct func_list *item;
@@ -421,7 +407,7 @@ static int func_map_init(struct pevent *pevent)
}
static struct func_map *
-__find_func(struct pevent *pevent, unsigned long long addr)
+__find_func(struct tep_handle *pevent, unsigned long long addr)
{
struct func_map *func;
struct func_map key;
@@ -438,13 +424,13 @@ __find_func(struct pevent *pevent, unsigned long long addr)
}
struct func_resolver {
- pevent_func_resolver_t *func;
- void *priv;
- struct func_map map;
+ tep_func_resolver_t *func;
+ void *priv;
+ struct func_map map;
};
/**
- * pevent_set_function_resolver - set an alternative function resolver
+ * tep_set_function_resolver - set an alternative function resolver
* @pevent: handle for the pevent
* @resolver: function to be used
* @priv: resolver function private state.
@@ -453,8 +439,8 @@ struct func_resolver {
* keep using it instead of duplicating all the entries inside
* pevent->funclist.
*/
-int pevent_set_function_resolver(struct pevent *pevent,
- pevent_func_resolver_t *func, void *priv)
+int tep_set_function_resolver(struct tep_handle *pevent,
+ tep_func_resolver_t *func, void *priv)
{
struct func_resolver *resolver = malloc(sizeof(*resolver));
@@ -471,20 +457,20 @@ int pevent_set_function_resolver(struct pevent *pevent,
}
/**
- * pevent_reset_function_resolver - reset alternative function resolver
+ * tep_reset_function_resolver - reset alternative function resolver
* @pevent: handle for the pevent
*
* Stop using whatever alternative resolver was set, use the default
* one instead.
*/
-void pevent_reset_function_resolver(struct pevent *pevent)
+void tep_reset_function_resolver(struct tep_handle *pevent)
{
free(pevent->func_resolver);
pevent->func_resolver = NULL;
}
static struct func_map *
-find_func(struct pevent *pevent, unsigned long long addr)
+find_func(struct tep_handle *pevent, unsigned long long addr)
{
struct func_map *map;
@@ -503,7 +489,7 @@ find_func(struct pevent *pevent, unsigned long long addr)
}
/**
- * pevent_find_function - find a function by a given address
+ * tep_find_function - find a function by a given address
* @pevent: handle for the pevent
* @addr: the address to find the function with
*
@@ -511,7 +497,7 @@ find_func(struct pevent *pevent, unsigned long long addr)
* address. Note, the address does not have to be exact, it
* will select the function that would contain the address.
*/
-const char *pevent_find_function(struct pevent *pevent, unsigned long long addr)
+const char *tep_find_function(struct tep_handle *pevent, unsigned long long addr)
{
struct func_map *map;
@@ -523,16 +509,16 @@ const char *pevent_find_function(struct pevent *pevent, unsigned long long addr)
}
/**
- * pevent_find_function_address - find a function address by a given address
+ * tep_find_function_address - find a function address by a given address
* @pevent: handle for the pevent
* @addr: the address to find the function with
*
* Returns the address the function starts at. This can be used in
- * conjunction with pevent_find_function to print both the function
+ * conjunction with tep_find_function to print both the function
* name and the function offset.
*/
unsigned long long
-pevent_find_function_address(struct pevent *pevent, unsigned long long addr)
+tep_find_function_address(struct tep_handle *pevent, unsigned long long addr)
{
struct func_map *map;
@@ -544,7 +530,7 @@ pevent_find_function_address(struct pevent *pevent, unsigned long long addr)
}
/**
- * pevent_register_function - register a function with a given address
+ * tep_register_function - register a function with a given address
* @pevent: handle for the pevent
* @function: the function name to register
* @addr: the address the function starts at
@@ -553,8 +539,8 @@ pevent_find_function_address(struct pevent *pevent, unsigned long long addr)
* This registers a function name with an address and module.
* The @func passed in is duplicated.
*/
-int pevent_register_function(struct pevent *pevent, char *func,
- unsigned long long addr, char *mod)
+int tep_register_function(struct tep_handle *pevent, char *func,
+ unsigned long long addr, char *mod)
{
struct func_list *item = malloc(sizeof(*item));
@@ -589,12 +575,12 @@ out_free:
}
/**
- * pevent_print_funcs - print out the stored functions
+ * tep_print_funcs - print out the stored functions
* @pevent: handle for the pevent
*
* This prints out the stored functions.
*/
-void pevent_print_funcs(struct pevent *pevent)
+void tep_print_funcs(struct tep_handle *pevent)
{
int i;
@@ -636,7 +622,7 @@ static int printk_cmp(const void *a, const void *b)
return 0;
}
-static int printk_map_init(struct pevent *pevent)

This diff is incomplete. Download the complete patch.

tools/lib/traceevent/event-parse.h

View file

This diff is incomplete. Download the complete patch.

tools/lib/traceevent/event-plugin.c

View file

This diff is incomplete. Download the complete patch.

tools/lib/traceevent/event-utils.h

View file

This diff is incomplete. Download the complete patch.

tools/lib/traceevent/kbuffer-parse.c

View file

This diff is incomplete. Download the complete patch.

tools/lib/traceevent/parse-filter.c

View file

This diff is incomplete. Download the complete patch.

tools/lib/traceevent/parse-utils.c

View file

This diff is incomplete. Download the complete patch.

tools/lib/traceevent/plugin_cfg80211.c

View file

This diff is incomplete. Download the complete patch.

tools/lib/traceevent/plugin_function.c

View file

This diff is incomplete. Download the complete patch.

tools/lib/traceevent/plugin_hrtimer.c

View file

This diff is incomplete. Download the complete patch.

tools/lib/traceevent/plugin_jbd2.c

View file

This diff is incomplete. Download the complete patch.

tools/lib/traceevent/plugin_kmem.c

View file

This diff is incomplete. Download the complete patch.

tools/lib/traceevent/plugin_kvm.c

View file

This diff is incomplete. Download the complete patch.

tools/lib/traceevent/plugin_mac80211.c

View file

This diff is incomplete. Download the complete patch.

tools/lib/traceevent/plugin_sched_switch.c

View file

This diff is incomplete. Download the complete patch.

tools/lib/traceevent/plugin_scsi.c

View file

This diff is incomplete. Download the complete patch.

tools/lib/traceevent/plugin_xen.c

View file

This diff is incomplete. Download the complete patch.

tools/lib/traceevent/trace-seq.c

View file

This diff is incomplete. Download the complete patch.

tools/perf/Documentation/perf-annotate.txt

View file

This diff is incomplete. Download the complete patch.

tools/perf/Documentation/perf-report.txt

View file

This diff is incomplete. Download the complete patch.

tools/perf/Makefile

View file

This diff is incomplete. Download the complete patch.

tools/perf/arch/arm64/util/arm-spe.c

View file

This diff is incomplete. Download the complete patch.

tools/perf/arch/powerpc/util/sym-handling.c

View file

This diff is incomplete. Download the complete patch.

tools/perf/arch/s390/util/auxtrace.c

View file

This diff is incomplete. Download the complete patch.

tools/perf/arch/x86/Makefile

View file

This diff is incomplete. Download the complete patch.

tools/perf/builtin-annotate.c

View file

This diff is incomplete. Download the complete patch.

tools/perf/builtin-kmem.c

View file

This diff is incomplete. Download the complete patch.

tools/perf/builtin-report.c

View file

This diff is incomplete. Download the complete patch.

tools/perf/builtin-script.c

View file

This diff is incomplete. Download the complete patch.

tools/perf/builtin-trace.c

View file

This diff is incomplete. Download the complete patch.

tools/perf/check-headers.sh

View file

This diff is incomplete. Download the complete patch.

tools/perf/examples/bpf/augmented_syscalls.c

View file

This diff is incomplete. Download the complete patch.

tools/perf/examples/bpf/hello.c

View file

This diff is incomplete. Download the complete patch.

tools/perf/examples/bpf/sys_enter_openat.c

View file

This diff is incomplete. Download the complete patch.

tools/perf/include/bpf/bpf.h

View file

This diff is incomplete. Download the complete patch.

tools/perf/include/bpf/stdio.h

View file

This diff is incomplete. Download the complete patch.

tools/perf/pmu-events/arch/arm64/ampere/emag/core-imp-def.json

View file

This diff is incomplete. Download the complete patch.

tools/perf/pmu-events/arch/arm64/mapfile.csv

View file

This diff is incomplete. Download the complete patch.

tools/perf/tests/bitmap.c

View file

This diff is incomplete. Download the complete patch.

tools/perf/tests/code-reading.c

View file

This diff is incomplete. Download the complete patch.

tools/perf/tests/kmod-path.c

View file

This diff is incomplete. Download the complete patch.

tools/perf/tests/mem2node.c

View file

This diff is incomplete. Download the complete patch.

tools/perf/ui/browsers/annotate.c

View file

This diff is incomplete. Download the complete patch.

tools/perf/util/Build

View file

This diff is incomplete. Download the complete patch.

tools/perf/util/annotate.c

View file

This diff is incomplete. Download the complete patch.

tools/perf/util/annotate.h

View file

This diff is incomplete. Download the complete patch.

tools/perf/util/auxtrace.c

View file

This diff is incomplete. Download the complete patch.

tools/perf/util/auxtrace.h

View file

This diff is incomplete. Download the complete patch.

tools/perf/util/bpf-loader.c

View file

This diff is incomplete. Download the complete patch.

tools/perf/util/bpf-loader.h

View file

This diff is incomplete. Download the complete patch.

tools/perf/util/compress.h

View file

This diff is incomplete. Download the complete patch.

tools/perf/util/data-convert-bt.c

View file

This diff is incomplete. Download the complete patch.

tools/perf/util/dso.c

View file

This diff is incomplete. Download the complete patch.

tools/perf/util/dso.h

View file

This diff is incomplete. Download the complete patch.

tools/perf/util/event.c

View file

This diff is incomplete. Download the complete patch.

tools/perf/util/evlist.c

View file

This diff is incomplete. Download the complete patch.

tools/perf/util/evsel.c

View file

This diff is incomplete. Download the complete patch.

tools/perf/util/evsel.h

View file

This diff is incomplete. Download the complete patch.

tools/perf/util/header.c

View file

This diff is incomplete. Download the complete patch.

tools/perf/util/llvm-utils.c

View file

This diff is incomplete. Download the complete patch.

tools/perf/util/llvm-utils.h

View file

This diff is incomplete. Download the complete patch.

tools/perf/util/lzma.c

View file

This diff is incomplete. Download the complete patch.

tools/perf/util/machine.c

View file

This diff is incomplete. Download the complete patch.

tools/perf/util/machine.h

View file

This diff is incomplete. Download the complete patch.

tools/perf/util/map.c

View file

This diff is incomplete. Download the complete patch.

tools/perf/util/map.h

View file

This diff is incomplete. Download the complete patch.

tools/perf/util/mmap.c

View file

This diff is incomplete. Download the complete patch.

tools/perf/util/mmap.h

View file

This diff is incomplete. Download the complete patch.

tools/perf/util/namespaces.c

View file

This diff is incomplete. Download the complete patch.

tools/perf/util/parse-events.c

View file

This diff is incomplete. Download the complete patch.

tools/perf/util/python.c

View file

This diff is incomplete. Download the complete patch.

tools/perf/util/s390-cpumsf-kernel.h

View file

This diff is incomplete. Download the complete patch.

tools/perf/util/s390-cpumsf.c

View file

This diff is incomplete. Download the complete patch.

tools/perf/util/s390-cpumsf.h

View file

This diff is incomplete. Download the complete patch.

tools/perf/util/scripting-engines/trace-event-perl.c

View file

This diff is incomplete. Download the complete patch.

tools/perf/util/scripting-engines/trace-event-python.c

View file

This diff is incomplete. Download the complete patch.

tools/perf/util/setup.py

View file

This diff is incomplete. Download the complete patch.

tools/perf/util/sort.c

View file

This diff is incomplete. Download the complete patch.

tools/perf/util/sort.h

View file

This diff is incomplete. Download the complete patch.

tools/perf/util/trace-event-parse.c

View file

This diff is incomplete. Download the complete patch.

tools/perf/util/trace-event-read.c

View file

This diff is incomplete. Download the complete patch.

tools/perf/util/trace-event-scripting.c

View file

This diff is incomplete. Download the complete patch.

tools/perf/util/trace-event.c

View file

This diff is incomplete. Download the complete patch.

tools/perf/util/trace-event.h

View file

This diff is incomplete. Download the complete patch.

tools/perf/util/zlib.c

View file

This diff is incomplete. Download the complete patch.