Jiri Olsa
d5ceb62b36
perf ordered_events: Add 'struct ordered_events_buffer' layer
...
When ordering events, we use preallocated buffers to store separate
events. Those buffers currently don't have their own struct, but since
they are basically an array of 'struct ordered_event' objects, we use
the first event to hold buffers data - list head, that holds all buffers
together:
struct ordered_events {
...
struct ordered_event *buffer;
...
};
struct ordered_event {
u64 timestamp;
u64 file_offset;
union perf_event *event;
struct list_head list;
};
This is quite convoluted and error prone as demonstrated by free-ing
issue discovered and fixed by Stephane in here [1].
This patch adds the 'struct ordered_events_buffer' object, that holds
the buffer data and frees it up properly.
[1] - https://marc.info/?l=linux-kernel&m=153376761329335&w=2
Reported-by: Stephane Eranian <eranian@google.com>
Signed-off-by: Jiri Olsa <jolsa@kernel.org>
Tested-by: Stephane Eranian <eranian@google.com>
Acked-by: Namhyung Kim <namhyung@kernel.org>
Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Cc: Andi Kleen <andi@firstfloor.org>
Cc: David Ahern <dsahern@gmail.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Link: http://lkml.kernel.org/r/20180907102455.7030-1-jolsa@kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
2018-09-19 10:24:57 -03:00
..
arch
perf annotate: Handle arm64 move instructions
2018-08-30 15:52:25 -03:00
bench
tools arch: Update arch/x86/lib/memcpy_64.S copy used in 'perf bench mem memcpy'
2018-07-30 12:36:51 -03:00
Documentation
perf Documentation: Fix out-of-tree asciidoctor man page generation
2018-09-18 10:17:16 -03:00
examples /bpf
perf augmented_syscalls: Avoid optimization to pass older BPF validators
2018-09-03 15:29:53 -03:00
include /bpf
perf bpf: Add syscall_exit() helper
2018-08-30 15:52:20 -03:00
jvmti
perf tools: Fix compilation errors on gcc8
2018-07-11 09:39:57 -04:00
pmu-events
perf vendor events arm64: Enable JSON events for eMAG
2018-08-08 15:55:43 -03:00
python
scripts
perf scripts python: Add Python 3 support to EventClass.py
2018-07-11 10:01:50 -03:00
tests
perf test: Add watchpoint test
2018-09-18 17:21:13 -03:00
trace
perf trace beauty: Reorganize 'struct sockaddr *' beautifier
2018-08-30 15:52:20 -03:00
ui
perf annotate: Add support to toggle percent type
2018-08-08 15:55:52 -03:00
util
perf ordered_events: Add 'struct ordered_events_buffer' layer
2018-09-19 10:24:57 -03:00
.gitignore
Build
builtin-annotate.c
perf annotate: Add --percent-type option
2018-08-08 15:55:53 -03:00
builtin-bench.c
builtin-buildid-cache.c
perf buildid-cache: Warn --purge-all failures
2018-05-15 10:32:16 -03:00
builtin-buildid-list.c
builtin-c2c.c
perf c2c report: Fix crash for empty browser
2018-07-31 10:53:20 -03:00
builtin-config.c
builtin-data.c
builtin-diff.c
perf hists: Clarify callchain disabling when available
2018-07-24 14:37:33 -03:00
builtin-evlist.c
builtin-ftrace.c
builtin-help.c
perf tools: Rename HAVE_SYSCALL_TABLE to HAVE_SYSCALL_TABLE_SUPPORT
2018-04-12 10:33:31 -03:00
builtin-inject.c
perf thread: Make thread__find_map() return the map
2018-04-26 13:47:08 -03:00
builtin-kallsyms.c
perf machine: Ditch find_kernel_function variants
2018-04-30 12:20:54 -03:00
builtin-kmem.c
tools lib traceevent, perf tools: Rename 'enum pevent_flag' to 'enum tep_flag'
2018-08-13 15:22:18 -03:00
builtin-kvm.c
perf tools: Ditch the symbol_conf.nr_events global
2018-06-04 10:28:52 -03:00
builtin-list.c
builtin-lock.c
builtin-mem.c
perf mem: Allow all record/report options
2018-04-18 15:35:48 -03:00
builtin-probe.c
perf tools: No need to check if the argument to __get() function is NULL
2018-06-04 10:28:50 -03:00
builtin-record.c
perf tools: Switch 'session' argument to 'evlist' in perf_event__synthesize_attrs()
2018-08-30 15:52:21 -03:00
builtin-report.c
tools lib traceevent, perf tools: Rename pevent_set_* APIs
2018-08-13 15:22:10 -03:00
builtin-sched.c
perf sched: Use sched->show_callchain where appropriate
2018-06-05 10:09:54 -03:00
builtin-script.c
perf stat: Pass a 'struct perf_stat_config' argument to global print functions
2018-08-30 15:52:23 -03:00
builtin-stat.c
perf stat: Move the display functions to stat-display.c
2018-08-30 15:52:25 -03:00
builtin-timechart.c
perf thread: Make thread__find_symbol() return the symbol searched
2018-04-26 13:47:09 -03:00
builtin-top.c
perf hists: Clarify callchain disabling when available
2018-07-24 14:37:33 -03:00
builtin-trace.c
perf trace: Use the raw_syscalls:sys_enter for the augmented syscalls
2018-09-04 16:51:12 -03:00
builtin-version.c
perf version: Print status for syscall_table
2018-04-12 10:33:34 -03:00
builtin.h
check-headers.sh
perf tools: Move syscall_64.tbl check into check-headers.sh
2018-08-14 15:10:40 -03:00
command-list.txt
CREDITS
design.txt
Makefile
perf tools: Disable parallelism for 'make clean'
2018-08-20 08:54:58 -03:00
Makefile.config
perf build: Fix installation directory for eBPF
2018-07-31 10:54:50 -03:00
Makefile.perf
perf bpf: Add linux/socket.h to the headers accessible to bpf proggies
2018-08-30 15:52:20 -03:00
MANIFEST
perf-archive.sh
perf-completion.sh
perf-read-vdso.c
perf-sys.h
perf-with-kcore.sh
perf.c
perf tools: Remove dead quote.[ch] code
2018-06-04 10:28:50 -03:00
perf.h
perf tools: Allow overriding MAX_NR_CPUS at compile time
2018-08-01 12:33:24 -03:00