linux_old1/arch/s390/kernel
Daniel Borkmann 7e3f977edd perf, events: add non-linear data support for raw records
This patch adds support for non-linear data on raw records. It
extends raw records to have one or multiple fragments that will
be written linearly into the ring slot, where each fragment can
optionally have a custom callback handler to walk and extract
complex, possibly non-linear data.

If a callback handler is provided for a fragment, then the new
__output_custom() will be used instead of __output_copy() for
the perf_output_sample() part. perf_prepare_sample() does all
the size calculation only once, so perf_output_sample() doesn't
need to redo the same work anymore, meaning real_size and padding
will be cached in the raw record. The raw record becomes 32 bytes
in size without holes; to not increase it further and to avoid
doing unnecessary recalculations in fast-path, we can reuse
next pointer of the last fragment, idea here is borrowed from
ZERO_OR_NULL_PTR(), which should keep the perf_output_sample()
path for PERF_SAMPLE_RAW minimal.

This facility is needed for BPF's event output helper as a first
user that will, in a follow-up, add an additional perf_raw_frag
to its perf_raw_record in order to be able to more efficiently
dump skb context after a linear head meta data related to it.
skbs can be non-linear and thus need a custom output function to
dump buffers. Currently, the skb data needs to be copied twice;
with the help of __output_custom() this work only needs to be
done once. Future users could be things like XDP/BPF programs
that work on different context though and would thus also have
a different callback function.

The few users of raw records are adapted to initialize their frag
data from the raw record itself, no change in behavior for them.
The code is based upon a PoC diff provided by Peter Zijlstra [1].

  [1] http://thread.gmane.org/gmane.linux.network/421294

Suggested-by: Peter Zijlstra <peterz@infradead.org>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Acked-by: Alexei Starovoitov <ast@kernel.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
2016-07-15 14:23:56 -07:00
..
vdso32 s390/vdso: optimize getcpu system call 2016-01-11 13:01:24 +01:00
vdso64 s390/vdso: optimize getcpu system call 2016-01-11 13:01:24 +01:00
.gitignore s390: add various .gitignore files. 2012-05-16 14:42:41 +02:00
Makefile s390: get rid of CONFIG_SCHED_MC and CONFIG_SCHED_BOOK 2015-12-30 10:34:57 +01:00
asm-offsets.c s390/mm: split arch/s390/mm/pgtable.c 2016-03-08 15:00:15 +01:00
audit.c
audit.h
base.S s390/kdump: fix nosmt kernel parameter 2015-06-25 09:39:26 +02:00
cache.c s390/cache: remove superfluous locking 2016-05-10 13:24:49 +02:00
compat_audit.c
compat_linux.c groups: Consolidate the setgroups permission checks 2014-12-05 17:19:27 -06:00
compat_linux.h s390: add support for vector extension 2014-10-09 09:14:13 +02:00
compat_ptrace.h [S390] ptrace cleanup 2011-01-05 12:47:31 +01:00
compat_signal.c s390/compat: correct restore of high gprs on signal return 2016-02-22 09:29:35 +01:00
compat_wrapper.c s390: wire up copy_file_range syscall 2016-01-19 12:14:02 +01:00
cpcmd.c s390: Use pr_warn instead of pr_warning 2016-03-07 13:12:04 +01:00
crash_dump.c s390: make couple of variables and functions static 2016-05-10 13:24:50 +02:00
debug.c s390: Use pr_warn instead of pr_warning 2016-03-07 13:12:04 +01:00
diag.c s390/diag: add a s390 prefix to the diagnose trace point 2015-11-09 09:10:47 +01:00
dis.c s390/dis: use correct escape sequence for '%' character 2016-03-02 06:44:25 -06:00
dumpstack.c s390/dumpstack: implement and use return_address() 2016-05-04 16:29:45 +02:00
early.c locking/lockdep: Eliminate lockdep_init() 2016-02-09 12:03:25 +01:00
ebcdic.c s390/comments: unify copyright messages and remove file names 2012-07-20 11:15:04 +02:00
entry.S s390: fix floating pointer register corruption (again) 2016-03-10 14:35:42 +01:00
entry.h s390: add missing declarations 2016-05-10 13:24:51 +02:00
ftrace.c s390: remove all usages of PSW_ADDR_INSN 2016-01-19 12:14:03 +01:00
head.S s390/facilities: make use of generated facility list 2015-12-18 14:59:21 +01:00
head64.S s390/cpumf: Fix lpp detection 2016-03-08 10:38:06 +01:00
head_kdump.S s390: remove 31 bit support 2015-03-25 11:49:33 +01:00
idle.c s390/idle: convert open coded idle time seqcount 2014-12-08 09:42:32 +01:00
ipl.c Revert "s390/kdump: Clear subchannel ID to signal non-CCW/SCSI IPL" 2016-06-28 09:24:27 +02:00
irq.c s390: add current_stack_pointer() helper function 2016-02-23 08:56:18 +01:00
jump_label.c Merge branch 'locking-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip 2015-09-03 15:46:07 -07:00
kprobes.c s390: remove all usages of PSW_ADDR_INSN 2016-01-19 12:14:03 +01:00
lgr.c s390/sysinfo,stsi: change return code handling 2012-09-26 15:45:12 +02:00
machine_kexec.c s390/kexec: consolidate crash_map/unmap_reserved_pages() and arch_kexec_protect(unprotect)_crashkres() 2016-05-23 17:04:14 -07:00
mcount.S s390/ftrace: hotpatch support for function tracing 2015-01-29 09:19:25 +01:00
module.c module: s390: keep mod_arch_specific for livepatch modules 2016-04-01 15:00:11 +02:00
nmi.c s390/nmi: reduce size of percpu variable 2015-10-27 09:33:57 +01:00
os_info.c s390/dump: streamline oldmem copy functions 2015-11-27 09:24:12 +01:00
perf_cpum_cf.c s390/cpum_cf: use perf software context for hardware counters 2016-06-16 12:08:49 +02:00
perf_cpum_cf_events.c s390/cpum_cf: Export event names in sysfs 2013-12-16 14:37:50 +01:00
perf_cpum_sf.c perf, events: add non-linear data support for raw records 2016-07-15 14:23:56 -07:00
perf_event.c perf core: Pass max stack as a perf_callchain_entry context 2016-05-16 23:11:50 -03:00
pgm_check.S s390: remove 31 bit support 2015-03-25 11:49:33 +01:00
process.c exit_thread: accept a task parameter to be exited 2016-05-20 17:58:30 -07:00
processor.c s390: add missing include statements 2016-05-10 13:24:52 +02:00
ptrace.c s390: remove all usages of PSW_ADDR_INSN 2016-01-19 12:14:03 +01:00
reipl.S s390/dump: rework CPU register dump code 2015-11-27 09:24:14 +01:00
relocate_kernel.S s390: remove "64" suffix from a couple of files 2015-03-25 11:49:34 +01:00
runtime_instr.c s390: remove runtime instrumentation interrupts 2015-11-03 14:40:51 +01:00
s390_ksyms.c s390/fpu: split fpu-internal.h into fpu internals, api, and type headers 2015-10-16 09:41:12 +02:00
sclp.c s390/sclp: Add VT220 support to early sclp console 2015-11-27 09:24:17 +01:00
setup.c s390/fpu: allocate 'struct fpu' with the task_struct 2016-04-21 09:51:15 +02:00
signal.c s390: remove all usages of PSW_ADDR_AMODE 2016-01-19 12:14:02 +01:00
smp.c sched: Allow per-cpu kernel threads to run on online && !active 2016-05-06 14:58:22 +02:00
stacktrace.c s390/dumpstack: merge all four stack tracers 2016-02-23 08:56:20 +01:00
suspend.c PCI: Include <linux/pci.h>, not <asm/pci.h> 2015-06-08 07:55:03 -05:00
swsusp.S s390/hibernate: fix save and restore of vector registers 2015-09-17 13:43:41 +02:00
sys_s390.c s390: remove 31 bit support 2015-03-25 11:49:33 +01:00
syscalls.S s390: wire up preadv2/pwritev2 syscalls 2016-04-01 08:42:38 +02:00
sysinfo.c s390/sysinfo: add missing SYSIB 1.2.2 multithreading fields 2016-01-11 12:27:00 +01:00
time.c param: convert some "on"/"off" users to strtobool 2016-03-17 15:09:34 -07:00
topology.c param: convert some "on"/"off" users to strtobool 2016-03-17 15:09:34 -07:00
trace.c s390/diag: avoid lockdep recursion 2016-02-11 13:05:56 +01:00
traps.c s390/fault: merge report_user_fault implementations 2016-03-02 06:44:27 -06:00
uprobes.c s390/uprobes: fix address space annotation 2015-03-25 11:49:47 +01:00
vdso.c vdso: make arch_setup_additional_pages wait for mmap_sem for write killable 2016-05-23 17:04:14 -07:00
vmlinux.lds.S arch, ftrace: for KASAN put hard/soft IRQ entries into separate sections 2016-03-25 16:37:42 -07:00
vtime.c s390: add missing declarations 2016-05-10 13:24:51 +02:00